From patchwork Thu Jul 19 16:57:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 142359 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1961055ljj; Thu, 19 Jul 2018 09:57:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdUmO8v6LuzFQHy4tYpMhM7/cdvH0yTuOqgzHiU/ifIlTtlaYE9nNnQoG1IN1PS8XExASvd X-Received: by 2002:adf:81a3:: with SMTP id 32-v6mr8608478wra.9.1532019445000; Thu, 19 Jul 2018 09:57:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532019444; cv=none; d=google.com; s=arc-20160816; b=HcKKUWRIjy8Sa6klgEv3m+Yq0S3N+4v9iMVqkyJclDME4hq7elyjaIY3esMTk3zjU2 2orL9z+BBKvOFcbwC7mTvSEpj7Bp33HwdzpVJVE3txm+IyM22aOV5DW6/byFirWFJIXb jQWX4FrOGofxz+JxyvkEhoxx733WFNQDqMSSyn0R0COGczcR9/J+10YJIVGiyCOBLV5g 3qJpP6cmX+rifDgsdyjznUJknBhbq2cWvYLT8t+8BusHpA1VI7GVq0VjaobCNkprf7mg rPSRXtUpwWUMkUIgU4RYJmo+/UGvBoe8GEkW+lIEAG+k6YhF1YXTdR4hW8MX6uzM1wtN wqvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=8/ZkbYN2A0QxgmV8lcljJm8bqsaI20OfIGVBGZ+fAjs=; b=U4ASDXDAB2R13/0zbAbhrbWj1d/AnX5gYxQu/XLePKekMdXeL3EuwWEVtCQeQI95D5 m0emkk0lwsr5OZprQISjgwy+NwbfHDOXJpWmyXrTroP9JZuB6ox/2tO9iZSWB95qJDvS qL4zFtDso/si/deKKMdCDhboRzBii+5Np7Y88V61xfj+wEq1FgsDg0WXR2OuMlmbYzgN wmsQ4JoeEGkKOLAJPqvg+QcZBCt+H5B/dMfyZarVJK5qlR+2Rh7gTm3RDrQoOld/Opse tQ+UecGapJ4QylOoB1CgpOZSnchvqEKM0+ICa5bBxR8ZG7vP5Oa/0zmJdoqHX8jHFoGK OX7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=SuzGEdtc; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id j1-v6si4991019wrc.453.2018.07.19.09.57.24; Thu, 19 Jul 2018 09:57:24 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=SuzGEdtc; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D678C26774B; Thu, 19 Jul 2018 18:57:12 +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 DA4B526774B; Thu, 19 Jul 2018 18:57:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 4EF95267749 for ; Thu, 19 Jul 2018 18:57:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=C30Tdzf46CfBONdVV30e6o03BBFMAKrZ/46YqgKSy9Q=; b=SuzGEdtcMQLm FJo/qOiGjdn77S5u6jlkGjIDjLvqBFcFnfE4jdDnIyKzY5r3YuMd36AMC1Oj9LOPB7Blwzle7s1RQ lSCCMZSoOKvqSZwODKPMJ9GhQgJNYif0p5pSEYzrOC9ePCdgwbV3pPv/D8+tU7FRUnN50UY99255E gcixQ=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgCEi-0007In-1l; Thu, 19 Jul 2018 16:57:04 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1fgCEh-0005Pl-Ju; Thu, 19 Jul 2018 17:57:03 +0100 From: Mark Brown To: Hans de Goede In-Reply-To: <20180718205542.12364-5-hdegoede@redhat.com> Message-Id: Date: Thu, 19 Jul 2018 17:57:03 +0100 Cc: Oder Chiou , alsa-devel@alsa-project.org, Pierre-Louis Bossart , Liam Girdwood , Mark Brown , Carlo Caione , Bard Liao Subject: [alsa-devel] Applied "ASoC: Intel: bytcr_rt5651: Add IN2 input mapping" to the asoc tree 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 The patch ASoC: Intel: bytcr_rt5651: Add IN2 input mapping has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From ac275ee5aa67abe9b65d66071ee333c6b0905b93 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 18 Jul 2018 22:55:40 +0200 Subject: [PATCH] ASoC: Intel: bytcr_rt5651: Add IN2 input mapping During the recent cleanup series 3 of the 6 input mappings where removed from the bytcr_rt5651 machine driver because testing showed that none of them were used. However some devices do actually have their internal mic on IN2 (and only IN2, not IN1 and IN2), this did not show during previous tests due to a bug in the userspace UCM input device switching code. This commit re-adds the IN2 mapping for devices with the internal mic. on IN2 and the headser mic on IN3 and enables this mapping on devices with their internal mic on IN2. This commit also changes the default internal mic input to IN2, because all my 7 test devices have their mic there. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown --- sound/soc/intel/boards/bytcr_rt5651.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) -- 2.18.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index 53ac97c15fc6..d85530b1cc8e 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -44,6 +44,7 @@ enum { BYT_RT5651_DMIC_MAP, BYT_RT5651_IN1_MAP, + BYT_RT5651_IN2_MAP, BYT_RT5651_IN1_IN2_MAP, }; @@ -93,9 +94,9 @@ struct byt_rt5651_private { struct snd_soc_jack jack; }; -/* Default: jack-detect on JD1_1, internal mic on in1, headsetmic on in3 */ +/* Default: jack-detect on JD1_1, internal mic on in2, headsetmic on in3 */ static unsigned long byt_rt5651_quirk = BYT_RT5651_DEFAULT_QUIRKS | - BYT_RT5651_IN1_MAP; + BYT_RT5651_IN2_MAP; static void log_quirks(struct device *dev) { @@ -103,6 +104,8 @@ static void log_quirks(struct device *dev) dev_info(dev, "quirk DMIC_MAP enabled"); if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP) dev_info(dev, "quirk IN1_MAP enabled"); + if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN2_MAP) + dev_info(dev, "quirk IN2_MAP enabled"); if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_IN2_MAP) dev_info(dev, "quirk IN1_IN2_MAP enabled"); if (BYT_RT5651_JDSRC(byt_rt5651_quirk)) { @@ -270,6 +273,12 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = { {"IN3P", NULL, "Headset Mic"}, }; +static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = { + {"Internal Mic", NULL, "micbias1"}, + {"IN2P", NULL, "Internal Mic"}, + {"IN3P", NULL, "Headset Mic"}, +}; + static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = { {"Internal Mic", NULL, "micbias1"}, {"IN1P", NULL, "Internal Mic"}, @@ -364,7 +373,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"), }, .driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS | - BYT_RT5651_IN1_MAP | + BYT_RT5651_IN2_MAP | BYT_RT5651_HP_LR_SWAPPED), }, { @@ -375,7 +384,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "D2D3_Vi8A1"), }, .driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS | - BYT_RT5651_IN1_MAP | + BYT_RT5651_IN2_MAP | BYT_RT5651_HP_LR_SWAPPED), }, { @@ -468,6 +477,10 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime) custom_map = byt_rt5651_intmic_in1_map; num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_map); break; + case BYT_RT5651_IN2_MAP: + custom_map = byt_rt5651_intmic_in2_map; + num_routes = ARRAY_SIZE(byt_rt5651_intmic_in2_map); + break; case BYT_RT5651_IN1_IN2_MAP: custom_map = byt_rt5651_intmic_in1_in2_map; num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map); @@ -825,7 +838,7 @@ struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) { - const char * const mic_name[] = { "dmic", "in1", "in12" }; + const char * const mic_name[] = { "dmic", "in1", "in2", "in12" }; struct byt_rt5651_private *priv; struct snd_soc_acpi_mach *mach; struct device *codec_dev;