From patchwork Thu May 31 11:06:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 137362 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp6449601lji; Thu, 31 May 2018 04:06:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL1bJLQ9o28oMfUj8CLVSTdOQItzXU4dFhvMCdimVe3wLnhkKjlGEE6pG7pRDloLEUloqVw X-Received: by 2002:adf:9e8c:: with SMTP id a12-v6mr4594786wrf.170.1527764796123; Thu, 31 May 2018 04:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527764796; cv=none; d=google.com; s=arc-20160816; b=veUeixndYE/NAjsI9ChkMBIcLSR11GNlpdFTHCO0hBccuP5mjODDlW74meUashi0eD 6dwMlFYjvajd9evdAYKxS43GDOmi58lVr+PsuXXxb++JtJgkZns9CQTFfKLqtv6oJB00 wxjtMFiaqR8DYsbyeXQFq5iwF/Z79+yY4iRNxiASQjRpzeE5hx09Sj5YLs/L5J8LQYT4 eLe93LkLh2W7IsntnuEX9EoD5Wx74J1kZtOQRNfdmxK1U6N7HDqrlPLO6sZw2aC1jvK7 qwqRrE7YIRy3VVKgYA1MVpy1Yxde4MbNTIixLE0CWf/u0ek04Lr3SwM/ycK9RlkqDPfz Vuuw== 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=u4lRWm8t1+mvdL5yoZFkYovUOCCdFqOYP86Y4qJhWVM=; b=Z5k5mzSB9QYIj5ch9Tiyl16Q7CtoijeJJzAZEHjqiIry1rS78932uV91KxPYQuLAj8 9ROc5rjWZ7K62lN0kbHp9i7I3TzMp2JasdvN+ujMvQBbeZxISOD7Mg0aTEyl3ReQKD3F aLHhNVTFNMh71d8LKvVZWXlPWq8Q6OyYU7LMF0payWtyNsxsLaa3E0sVepscTJrsDby7 u3DqcVfd5ntbOPXVko/mNKYxu2noK+3MGPOMGhZrq+fu+IiAJtIC7bfFZd60QnbYvmXN +SOnGFMt31eTZauyoD6U341HLnO1w36Rk3MrtHojaR88hJTlods6yiHgfXsIhifescyj QnAg== 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=OoxTYbfE; 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 m13-v6si32661559wrg.431.2018.05.31.04.06.35; Thu, 31 May 2018 04:06:36 -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=OoxTYbfE; 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 5F560267904; Thu, 31 May 2018 13:06:34 +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 F02AA267909; Thu, 31 May 2018 13:06:30 +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 98276267901 for ; Thu, 31 May 2018 13:06:28 +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=wZKxbYAc7SdvNvO5QORhoOym9RSaWCFaBoTIQrcbajc=; b=OoxTYbfELSyG lASLZbtJ7+5+P/OPkWPugKGStvp2eXIEX1XL94k4IscfDsyu8uImhwOHPvQOy9Nn7HP7ACZ7ZQmQ4 LB67yjTBqr3muDuDUHhfjiMH1Uq8LBZrTylIGVH12SKX/0mSKAvgraKcSUmZAVEv7C3jKbgTUx+Rn sXYdU=; 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 1fOLPL-0000Aq-FJ; Thu, 31 May 2018 11:06:15 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1fOLPK-0001vO-Jm; Thu, 31 May 2018 12:06:14 +0100 From: Mark Brown To: Hans de Goede In-Reply-To: <20180518193506.8251-1-hdegoede@redhat.com> Message-Id: Date: Thu, 31 May 2018 12:06:14 +0100 Cc: Oder Chiou , alsa-devel@alsa-project.org, Takashi Iwai , Liam Girdwood , Pierre-Louis Bossart , Mark Brown , Bard Liao Subject: [alsa-devel] Applied "ASoC: Intel: bytcr_rt5651: Set card long_name based on quirks" 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: Set card long_name based on quirks 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 64484ccee7af53f08cca2ee3853cb8e18914d8b2 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 18 May 2018 21:35:06 +0200 Subject: [PATCH] ASoC: Intel: bytcr_rt5651: Set card long_name based on quirks Many X86 devices using a BYT SoC + RT5651 codec are cheap devices with generic DMI strings, causing snd_soc_set_dmi_name() to fail to set a long_name, making it impossible for userspace to have a correct UCM profile which knowns which input is connected to the internal mic, which input is connected to the hsmic (for correct jack-based switching) and which inputs are unused. Our quirks already specify which inputs the internal and headset mic are connected to. This commit sets a long_name based on the quirks so that userspace can have UCM profiles doing the right thing based on the long_name. Note that if we ever encounter the need for a special UCM profile for some device we can add a quirk to set a specific long_name for the device, Signed-off-by: Hans de Goede Signed-off-by: Mark Brown --- sound/soc/intel/boards/bytcr_rt5651.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.17.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 3c7d93520c52..1be788e04193 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -706,6 +706,7 @@ static struct snd_soc_card byt_rt5651_card = { static char byt_rt5651_codec_name[SND_ACPI_I2C_ID_LEN]; static char byt_rt5651_codec_aif_name[12]; /* = "rt5651-aif[1|2]" */ static char byt_rt5651_cpu_dai_name[10]; /* = "ssp[0|2]-port" */ +static char byt_rt5651_long_name[40]; /* = "bytcr-rt5651-*-spk-*-mic" */ static bool is_valleyview(void) { @@ -726,6 +727,10 @@ 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 intmic_name[] = + { "dmic", "in1", "in2", "in12", "in1", "in2" }; + const char * const hsmic_name[] = + { "in2", "in2", "in1", "in3", "in3", "in3" }; struct byt_rt5651_private *priv; struct snd_soc_acpi_mach *mach; const char *i2c_name = NULL; @@ -870,6 +875,12 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) } } + snprintf(byt_rt5651_long_name, sizeof(byt_rt5651_long_name), + "bytcr-rt5651-%s-intmic-%s-hsmic", + intmic_name[BYT_RT5651_MAP(byt_rt5651_quirk)], + hsmic_name[BYT_RT5651_MAP(byt_rt5651_quirk)]); + byt_rt5651_card.long_name = byt_rt5651_long_name; + ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5651_card); if (ret_val) {