From patchwork Thu Nov 30 10:25:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1870045 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Sgsmn0TxTz1yST for ; Thu, 30 Nov 2023 21:26:32 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1r8eFP-00055D-0n; Thu, 30 Nov 2023 10:26:19 +0000 Received: from mail-pl1-f180.google.com ([209.85.214.180]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1r8eFG-00053g-8r for kernel-team@lists.ubuntu.com; Thu, 30 Nov 2023 10:26:10 +0000 Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1ce3084c2d1so7181215ad.3 for ; Thu, 30 Nov 2023 02:26:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701339968; x=1701944768; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vncnhGzGTbwSaKA0HJXjJAj9Uzh/ghFCzTlJFId0MAw=; b=bXrXfiARWSq0CibtQ+iPbwdPEo5ohwz4N20DKyKI+xBAtnndH/lgY1e50F+b2U/SEm cnvweV/Dtr5ORdF4//dOzZid/E1yfuryBbhFkeL1F+i2uWuym5dyBmQILk1bqlA2x/jr yoiMJEJQdiTyoibu0pE6wT56P1aNPfc1EkBu9oZorJgG30HIp+5obVaPYFarZMm81Wxc flAFc5844WcwXhVqSw5Abeewl1NoRVTGif0756RRgkXq7CbMYRmtUJnHEFudxUw1duVs 6rDCNxGKoxAM6FzFmrTCC4wNi98cugqtpAH2WImz5Y+lhoasMswxfI3om5x5H4wJ/JFG PQSQ== X-Gm-Message-State: AOJu0Yw+sOSsWqzNW4XHwJL18oVR5Y2yndBBWxA4V8dtD2tMJ7pDyvNI XmdN6PLicWzpFLutTpAaUHhAiHCV1eLwzQ== X-Google-Smtp-Source: AGHT+IHRCvqx6/fCAIPpX+swp0zCuI6rwqVVJTsCR/2o2RXMO3xB1cx7wJ6fgk/0fHNDwV3tUga8uQ== X-Received: by 2002:a17:902:8488:b0:1c9:cc88:502c with SMTP id c8-20020a170902848800b001c9cc88502cmr21449732plo.69.1701339968231; Thu, 30 Nov 2023 02:26:08 -0800 (PST) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id ji2-20020a170903324200b001cfbd3f38dcsm991736plb.225.2023.11.30.02.26.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 02:26:07 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/3][Noble] ASoC: Intel: soc-acpi-intel-mtl-match: add rt713 rt1316 config Date: Thu, 30 Nov 2023 18:25:28 +0800 Message-Id: <20231130102530.2420607-2-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231130102530.2420607-1-vicamo.yang@canonical.com> References: <20231130102530.2420607-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.180; envelope-from=vicamo@gmail.com; helo=mail-pl1-f180.google.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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Bard Liao BugLink: https://bugs.launchpad.net/bugs/2042090 Adding rt713 jack + rt1316 amp + rt1713 dmic configuration support. Reviewed-by: Rander Wang Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231012190826.142619-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit e70ca580e9c8d59bc8cf70cb15546da5aecff3a0) Signed-off-by: You-Sheng Yang --- .../intel/common/soc-acpi-intel-mtl-match.c | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c index 92498d1d6c8d7..04c50d512d206 100644 --- a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c @@ -144,6 +144,24 @@ static const struct snd_soc_acpi_adr_device rt1712_3_single_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt713_0_single_adr[] = { + { + .adr = 0x000031025D071301ull, + .num_endpoints = 1, + .endpoints = &single_endpoint, + .name_prefix = "rt713" + } +}; + +static const struct snd_soc_acpi_adr_device rt1713_3_single_adr[] = { + { + .adr = 0x000331025D171301ull, + .num_endpoints = 1, + .endpoints = &single_endpoint, + .name_prefix = "rt713-dmic" + } +}; + static const struct snd_soc_acpi_adr_device mx8373_0_adr[] = { { .adr = 0x000023019F837300ull, @@ -186,6 +204,24 @@ static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt1316_1_group2_adr[] = { + { + .adr = 0x000131025D131601ull, + .num_endpoints = 1, + .endpoints = &spk_l_endpoint, + .name_prefix = "rt1316-1" + } +}; + +static const struct snd_soc_acpi_adr_device rt1316_2_group2_adr[] = { + { + .adr = 0x000230025D131601ull, + .num_endpoints = 1, + .endpoints = &spk_r_endpoint, + .name_prefix = "rt1316-2" + } +}; + static const struct snd_soc_acpi_adr_device rt1318_1_group1_adr[] = { { .adr = 0x000130025D131801ull, @@ -303,6 +339,30 @@ static const struct snd_soc_acpi_link_adr mtl_sdw_rt1318_l12_rt714_l0[] = { {} }; +static const struct snd_soc_acpi_link_adr mtl_rt713_l0_rt1316_l12_rt1713_l3[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt713_0_single_adr), + .adr_d = rt713_0_single_adr, + }, + { + .mask = BIT(1), + .num_adr = ARRAY_SIZE(rt1316_1_group2_adr), + .adr_d = rt1316_1_group2_adr, + }, + { + .mask = BIT(2), + .num_adr = ARRAY_SIZE(rt1316_2_group2_adr), + .adr_d = rt1316_2_group2_adr, + }, + { + .mask = BIT(3), + .num_adr = ARRAY_SIZE(rt1713_3_single_adr), + .adr_d = rt1713_3_single_adr, + }, + {} +}; + static const struct snd_soc_acpi_adr_device mx8363_2_adr[] = { { .adr = 0x000230019F836300ull, @@ -363,6 +423,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-mtl-rt715-rt711-rt1308-mono.tplg", }, + { + .link_mask = GENMASK(3, 0), + .links = mtl_rt713_l0_rt1316_l12_rt1713_l3, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-mtl-rt713-l0-rt1316-l12-rt1713-l3.tplg", + }, { .link_mask = BIT(3) | BIT(0), .links = mtl_712_only, From patchwork Thu Nov 30 10:25:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1870047 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Sgsn237tZz1yST for ; Thu, 30 Nov 2023 21:26:46 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1r8eFg-0005Am-OB; Thu, 30 Nov 2023 10:26:36 +0000 Received: from mail-pl1-f175.google.com ([209.85.214.175]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1r8eFI-000543-1j for kernel-team@lists.ubuntu.com; Thu, 30 Nov 2023 10:26:14 +0000 Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1cfcc9b3b5cso7575445ad.0 for ; Thu, 30 Nov 2023 02:26:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701339969; x=1701944769; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nAGA2L6IfIPXeFnHS+y0qmIHgK3Vg8sihjgdy9l1+mE=; b=Pl2pOHZNKtRCTHX5NZ9zmM0i7gQob/F3E7LH0vKIi6k2ids4F3KdYMI26DcacIRi+a r3bQ5LqVZgbltRNs7rXOKcHq56HoTn/5qFnUNmV9rLStQsEKnoLWDR2ONJiI5Hklr1xX LnPgR9vqnesepiZAmbaktj+x+BVYM+tSlDZpl9yiUMxaGEovGQQBO1YwHFWlh7K8ld28 8Hkk9s20Nqix5nLLP6xNHwB3AwniFHf4EQqtQOX4DJpPjN338TxSzHgG3wonnTrWL2qo CZ8KGFiua3XiYbti4WAr9j5dg6zoa/N5A+WlcGinA37tPNVWSo9xmNmoZ77gx+8zX2jq xKMQ== X-Gm-Message-State: AOJu0Yw7qQLTKVjbZzSi6ka2fioUqnHVRTL8sJEA1VPDX/66ebgRcX7E JIrjspizzQptcZcRm9wCzV1uY29y0W8R2g== X-Google-Smtp-Source: AGHT+IH+kMxd2vK2c2jLRC+DxLyN5CAxyfnhlBmWTZ7a3B87KphbeXvEiyaAINdkvqiTQHqS8gDhRw== X-Received: by 2002:a17:902:f54b:b0:1cf:e203:1856 with SMTP id h11-20020a170902f54b00b001cfe2031856mr11641958plf.14.1701339969575; Thu, 30 Nov 2023 02:26:09 -0800 (PST) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id ji2-20020a170903324200b001cfbd3f38dcsm991736plb.225.2023.11.30.02.26.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 02:26:09 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/3][Noble] ASoC: Intel: sof_sdw_rt712_sdca: construct cards->components by name_prefix Date: Thu, 30 Nov 2023 18:25:29 +0800 Message-Id: <20231130102530.2420607-3-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231130102530.2420607-1-vicamo.yang@canonical.com> References: <20231130102530.2420607-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.175; envelope-from=vicamo@gmail.com; helo=mail-pl1-f175.google.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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Bard Liao BugLink: https://bugs.launchpad.net/bugs/2042090 sof_sdw_rt712_sdca is used by rt712 and rt713. Using different cards->components string allow UCM distinguish the two codecs. Reviewed-by: Rander Wang Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231012190826.142619-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown (backported from commit 5124d08d0ea49c7f4dda989827d0959e58a22150) [vicamo: fix use of snd_soc_rtd_to_codec] Signed-off-by: You-Sheng Yang --- sound/soc/intel/boards/sof_sdw_rt712_sdca.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw_rt712_sdca.c b/sound/soc/intel/boards/sof_sdw_rt712_sdca.c index 84c8025d24e3f..298df62e6aad5 100644 --- a/sound/soc/intel/boards/sof_sdw_rt712_sdca.c +++ b/sound/soc/intel/boards/sof_sdw_rt712_sdca.c @@ -80,10 +80,12 @@ int sof_sdw_rt712_spk_init(struct snd_soc_card *card, static int rt712_sdca_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; + struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); + struct snd_soc_component *component = codec_dai->component; card->components = devm_kasprintf(card->dev, GFP_KERNEL, - "%s mic:rt712-sdca-dmic", - card->components); + "%s mic:%s", + card->components, component->name_prefix); if (!card->components) return -ENOMEM; From patchwork Thu Nov 30 10:25:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1870046 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Sgsmv0HWqz1yST for ; Thu, 30 Nov 2023 21:26:38 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1r8eFX-00055x-8w; Thu, 30 Nov 2023 10:26:27 +0000 Received: from mail-pl1-f180.google.com ([209.85.214.180]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1r8eFJ-00054I-9F for kernel-team@lists.ubuntu.com; Thu, 30 Nov 2023 10:26:14 +0000 Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1cfafe3d46bso7769655ad.0 for ; Thu, 30 Nov 2023 02:26:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701339971; x=1701944771; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N+xsPHQNFfz5eBiGJQozLzULK1QD+U1xBtOp9Hg0MC8=; b=rGmz7XW13u+3wLukAahMjSe0ApVU+j+g0Us58fw3XK/PUyouGEUVhSVm2auwPLt5Kq sQm7by02Eoq6ww5m6f9Kq+qvdIjrF/VRph8QTrmVsvqp3Qjk9+V8K3EWbjw46+abcPx/ fcDVKdGkHo6G43qDFczk3ao6vlIniGCwhbQeolXXNCV0odRumn+h5f2EZad5voU+UCbg bZrsQ+QK/C02KhkHBqdxFNpJ5iw2NxCr3KLrirITqPRD+0Sb0AfKfY00F4jb2dSnMK8D u+iCSM1rXIdv2bXxMWaS+fdNxyd4SEYxqHDe/on3ZvLjJrORkWRylgQjYUZ1qkkgKAho ft/g== X-Gm-Message-State: AOJu0Yx2EjkWM5EcVHD9+7I4O6fGj/iOp5yGJXcHh7RQ0GkCLOkxMXj8 hByZKKWRrRRW9yGFqGm+DvfieryPHBLUEA== X-Google-Smtp-Source: AGHT+IEfmBaEleV9CL0rWjjTje+yCz0ZKTTWwQ7sL53GVu2i56dS1xIiscKFi5LbYih3LGWyRAq2sg== X-Received: by 2002:a17:902:e804:b0:1d0:1f49:16f with SMTP id u4-20020a170902e80400b001d01f49016fmr4708036plg.0.1701339971206; Thu, 30 Nov 2023 02:26:11 -0800 (PST) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id ji2-20020a170903324200b001cfbd3f38dcsm991736plb.225.2023.11.30.02.26.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 02:26:10 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/3][Noble] ASoC: Intel: soc-acpi: rt713+rt1316, no sdw-dmic config Date: Thu, 30 Nov 2023 18:25:30 +0800 Message-Id: <20231130102530.2420607-4-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231130102530.2420607-1-vicamo.yang@canonical.com> References: <20231130102530.2420607-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.180; envelope-from=vicamo@gmail.com; helo=mail-pl1-f180.google.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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Mac Chiang BugLink: https://bugs.launchpad.net/bugs/2042090 This is additional HW board: rt713+rt1316 without rt713-dmic configuration: SDW0: rt713 audio jack SDW1: rt1316 spk_amp_l SDW2: rt1316 spk_amp_r Signed-off-by: Mac Chiang Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127133448.18449-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit 817178e7674bd8ca35344b2212a3105ed75559e5 linux-next) Signed-off-by: You-Sheng Yang --- .../intel/common/soc-acpi-intel-mtl-match.c | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c index 04c50d512d206..c237114a079a6 100644 --- a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c @@ -363,6 +363,25 @@ static const struct snd_soc_acpi_link_adr mtl_rt713_l0_rt1316_l12_rt1713_l3[] = {} }; +static const struct snd_soc_acpi_link_adr mtl_rt713_l0_rt1316_l12[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt713_0_single_adr), + .adr_d = rt713_0_single_adr, + }, + { + .mask = BIT(1), + .num_adr = ARRAY_SIZE(rt1316_1_group2_adr), + .adr_d = rt1316_1_group2_adr, + }, + { + .mask = BIT(2), + .num_adr = ARRAY_SIZE(rt1316_2_group2_adr), + .adr_d = rt1316_2_group2_adr, + }, + {} +}; + static const struct snd_soc_acpi_adr_device mx8363_2_adr[] = { { .adr = 0x000230019F836300ull, @@ -429,6 +448,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-mtl-rt713-l0-rt1316-l12-rt1713-l3.tplg", }, + { + .link_mask = GENMASK(2, 0), + .links = mtl_rt713_l0_rt1316_l12, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-mtl-rt713-l0-rt1316-l12.tplg", + }, { .link_mask = BIT(3) | BIT(0), .links = mtl_712_only,