From patchwork Fri Oct 16 01:22:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1383010 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CC7gq1gVGz9sSs; Fri, 16 Oct 2020 12:23:03 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kTESQ-0000b9-Ip; Fri, 16 Oct 2020 01:22:58 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kTESN-0000Ze-ML for kernel-team@lists.ubuntu.com; Fri, 16 Oct 2020 01:22:55 +0000 Received: from [123.114.59.45] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kTESM-0007DY-Gg for kernel-team@lists.ubuntu.com; Fri, 16 Oct 2020 01:22:55 +0000 From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.6][PATCH 06/15] ASoC: Intel: add codec name prefix to ACPI machine description Date: Fri, 16 Oct 2020 09:22:28 +0800 Message-Id: <20201016012237.16530-7-hui.wang@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201016012237.16530-1-hui.wang@canonical.com> References: <20201016012237.16530-1-hui.wang@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Pierre-Louis Bossart BugLink: https://bugs.launchpad.net/bugs/1900069 The current SOF machine driver adds a name prefix for each codec, mainly to differentiate ALSA controls for left and right amplifiers. This is a good idea, but the machine driver duplicates some of the information that already exists in ACPI descriptors, so add those prefixes there. Follow-up patches will make use of the information encoded in these tables and remove duplication. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200923080514.3242858-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown (backported from commit f93808308aab34071259fa8cffbda273bc346ea7 linux-next) Signed-off-by: Hui Wang --- include/sound/soc-acpi.h | 2 ++ sound/soc/intel/common/soc-acpi-intel-cml-match.c | 7 +++++++ sound/soc/intel/common/soc-acpi-intel-icl-match.c | 7 +++++++ sound/soc/intel/common/soc-acpi-intel-tgl-match.c | 10 ++++++++++ 4 files changed, 26 insertions(+) diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h index 392e953d561e..ca4833e0aa54 100644 --- a/include/sound/soc-acpi.h +++ b/include/sound/soc-acpi.h @@ -93,11 +93,13 @@ struct snd_soc_acpi_endpoint { * @adr: 64 bit ACPI _ADR value * @num_endpoints: number of endpoints for this device * @endpoints: array of endpoints + * @name_prefix: string used for codec controls */ struct snd_soc_acpi_adr_device { const u64 adr; const u8 num_endpoints; const struct snd_soc_acpi_endpoint *endpoints; + const char *name_prefix; }; /** diff --git a/sound/soc/intel/common/soc-acpi-intel-cml-match.c b/sound/soc/intel/common/soc-acpi-intel-cml-match.c index fd2fdc0f52ba..928ce9dae528 100644 --- a/sound/soc/intel/common/soc-acpi-intel-cml-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-cml-match.c @@ -85,6 +85,7 @@ static const struct snd_soc_acpi_adr_device rt700_1_adr[] = { .adr = 0x000110025D070000, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt700" } }; @@ -102,6 +103,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { .adr = 0x000010025D071100, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt711" } }; @@ -110,6 +112,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = { .adr = 0x000110025D130800, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt1308-1" } }; @@ -118,6 +121,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_adr[] = { .adr = 0x000210025D130800, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt1308-2" } }; @@ -126,6 +130,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = { .adr = 0x000110025D130800, .num_endpoints = 1, .endpoints = &spk_l_endpoint, + .name_prefix = "rt1308-1" } }; @@ -134,6 +139,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = { .adr = 0x000210025D130800, .num_endpoints = 1, .endpoints = &spk_r_endpoint, + .name_prefix = "rt1308-2" } }; @@ -142,6 +148,7 @@ static const struct snd_soc_acpi_adr_device rt715_3_adr[] = { .adr = 0x000310025D071500, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt715" } }; diff --git a/sound/soc/intel/common/soc-acpi-intel-icl-match.c b/sound/soc/intel/common/soc-acpi-intel-icl-match.c index ef8500349f2f..c4196bf06281 100644 --- a/sound/soc/intel/common/soc-acpi-intel-icl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-icl-match.c @@ -59,6 +59,7 @@ static const struct snd_soc_acpi_adr_device rt700_0_adr[] = { .adr = 0x000010025D070000, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt700" } }; @@ -76,6 +77,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { .adr = 0x000010025D071100, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt711" } }; @@ -84,6 +86,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_adr[] = { .adr = 0x000110025D130800, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt1308-1" } }; @@ -92,6 +95,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_adr[] = { .adr = 0x000210025D130800, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt1308-2" } }; @@ -100,6 +104,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = { .adr = 0x000110025D130800, .num_endpoints = 1, .endpoints = &spk_l_endpoint, + .name_prefix = "rt1308-1" } }; @@ -108,6 +113,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = { .adr = 0x000210025D130800, .num_endpoints = 1, .endpoints = &spk_r_endpoint, + .name_prefix = "rt1308-2" } }; @@ -116,6 +122,7 @@ static const struct snd_soc_acpi_adr_device rt715_3_adr[] = { .adr = 0x000310025D071500, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt715" } }; diff --git a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c index 4a7e20e5cec1..439c638c20f3 100644 --- a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c @@ -40,6 +40,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { .adr = 0x000010025D071100, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt711" } }; @@ -48,11 +49,13 @@ static const struct snd_soc_acpi_adr_device rt1308_1_dual_adr[] = { .adr = 0x000120025D130800, .num_endpoints = 1, .endpoints = &spk_l_endpoint, + .name_prefix = "rt1308-1" }, { .adr = 0x000122025D130800, .num_endpoints = 1, .endpoints = &spk_r_endpoint, + .name_prefix = "rt1308-2" } }; @@ -61,6 +64,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = { .adr = 0x000120025D130800, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt1308-1" } }; @@ -69,6 +73,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = { .adr = 0x000120025D130800, .num_endpoints = 1, .endpoints = &spk_l_endpoint, + .name_prefix = "rt1308-1" } }; @@ -77,6 +82,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = { .adr = 0x000220025D130800, .num_endpoints = 1, .endpoints = &spk_r_endpoint, + .name_prefix = "rt1308-2" } }; @@ -85,6 +91,7 @@ static const struct snd_soc_acpi_adr_device rt715_3_adr[] = { .adr = 0x000320025D071500, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt715" } }; @@ -93,11 +100,13 @@ static const struct snd_soc_acpi_adr_device mx8373_1_adr[] = { .adr = 0x000123019F837300, .num_endpoints = 1, .endpoints = &spk_l_endpoint, + .name_prefix = "Right" }, { .adr = 0x000127019F837300, .num_endpoints = 1, .endpoints = &spk_r_endpoint, + .name_prefix = "Left" } }; @@ -106,6 +115,7 @@ static const struct snd_soc_acpi_adr_device rt5682_0_adr[] = { .adr = 0x000021025D568200, .num_endpoints = 1, .endpoints = &single_endpoint, + .name_prefix = "rt5682" } };