From patchwork Thu Oct 2 10:29:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 5017601 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 05BD29F32B for ; Thu, 2 Oct 2014 10:30:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3F0E82012D for ; Thu, 2 Oct 2014 10:30:12 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 13934201FE for ; Thu, 2 Oct 2014 10:30:11 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D22AD261692; Thu, 2 Oct 2014 12:30:07 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id E7DE2261560; Thu, 2 Oct 2014 12:29:37 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 04D3C261563; Thu, 2 Oct 2014 12:29:36 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by alsa0.perex.cz (Postfix) with ESMTP id 12760261554 for ; Thu, 2 Oct 2014 12:29:23 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 02 Oct 2014 03:19:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,638,1406617200"; d="scan'208";a="599743076" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.51]) by fmsmga001.fm.intel.com with ESMTP; 02 Oct 2014 03:29:18 -0700 From: Jarkko Nikula To: alsa-devel@alsa-project.org Date: Thu, 2 Oct 2014 13:29:08 +0300 Message-Id: <1412245749-17983-1-git-send-email-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.1.0 Cc: Jan-Michael Brummer , Mark Brown , Jarkko Nikula , Liam Girdwood Subject: [alsa-devel] [PATCH 1/2] ASoC: Intel: byt-rt5640: Add quirk for Dell Venue 8 Pro tablet X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP It was found with help of Jan-Michael Brummer that Dell Venue 8 Pro tablet has a digital microphone connected to DMIC2 interface of the RT564x. This patch adds a DAPM route to DMIC2 and a quirk using it for that tablet. Signed-off-by: Jarkko Nikula Reported-by: Jan-Michael Brummer --- Hi Jan. Could you give a second test to this patch? I noticed I had a few lines missing from the version I sent you yesterday. If this still works please reply with your Tested-by:. Mark: I don't have this hw but Jan helped me to debug the right configuration and sent the needed machine information for the DMI quirk. --- sound/soc/intel/byt-rt5640.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c index 8392c160d9e2..a9619b4201f9 100644 --- a/sound/soc/intel/byt-rt5640.c +++ b/sound/soc/intel/byt-rt5640.c @@ -49,6 +49,10 @@ static const struct snd_soc_dapm_route byt_rt5640_intmic_dmic1_map[] = { {"DMIC1", NULL, "Internal Mic"}, }; +static const struct snd_soc_dapm_route byt_rt5640_intmic_dmic2_map[] = { + {"DMIC2", NULL, "Internal Mic"}, +}; + static const struct snd_soc_dapm_route byt_rt5640_intmic_in1_map[] = { {"Internal Mic", NULL, "MICBIAS1"}, {"IN1P", NULL, "Internal Mic"}, @@ -56,6 +60,7 @@ static const struct snd_soc_dapm_route byt_rt5640_intmic_in1_map[] = { enum { BYT_RT5640_DMIC1_MAP, + BYT_RT5640_DMIC2_MAP, BYT_RT5640_IN1_MAP, }; @@ -111,6 +116,15 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { }, .driver_data = (unsigned long *)BYT_RT5640_IN1_MAP, }, + { + .callback = byt_rt5640_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "DellInc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Venue 8 Pro 5830"), + }, + .driver_data = (unsigned long *)(BYT_RT5640_DMIC2_MAP | + BYT_RT5640_DMIC_EN), + }, {} }; @@ -138,6 +152,10 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime) custom_map = byt_rt5640_intmic_in1_map; num_routes = ARRAY_SIZE(byt_rt5640_intmic_in1_map); break; + case BYT_RT5640_DMIC2_MAP: + custom_map = byt_rt5640_intmic_dmic2_map; + num_routes = ARRAY_SIZE(byt_rt5640_intmic_dmic2_map); + break; default: custom_map = byt_rt5640_intmic_dmic1_map; num_routes = ARRAY_SIZE(byt_rt5640_intmic_dmic1_map);