From patchwork Fri Nov 19 11:45:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557056 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=FSToD3xd; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZdB6yH6z9sR4 for ; Fri, 19 Nov 2021 22:46:38 +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 1mo2Lg-0000aH-Q5; Fri, 19 Nov 2021 11:46:32 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2Le-0000ZP-DH for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:46:30 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 1AE2F3FFE5 for ; Fri, 19 Nov 2021 11:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322390; bh=lk3BpVOaObE9gJatJkI6ChitdlG4+TTLCJf8sZfMSYw=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FSToD3xdpfoVcdNzzq6p3Du/GB4iuoiPaHp3oH7+ebRDvwWrgbuRs/vjBSu5WJCVK qOXLiJnJXienI3q34jcmINQs8EKBBmaFwwNLtwT9/EWALIJGMUb4DcZf4wMlCFicp9 qiiUgG7afNTQoE+Ufu3mmKIggb8BgJF6X4xcXQsSicNyo84me6UtoUeEZjw3Vl2vln yVSzx83Gqowk6r7Df9gyi1VMYg3j5+2+Nc0PRvguO7BTTZZMcYP1RAI2T6T1LmzV/G vI74aOPbFSvQa6bgAXSvhFdJP5+fQ9MIPaiM7NCcfREJOlUNdRzLcaH8BOepaS2fPH iE9iOOn262Uyg== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 01/17] ASoC: Intel: sof_sdw: Add support for SKU 0AF3 product Date: Fri, 19 Nov 2021 19:45:32 +0800 Message-Id: <20211119114605.19838-2-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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: Gongjun Song BugLink: https://bugs.launchpad.net/bugs/1951563 This product supports SoundWire capture from local microphones and two SoundWire amplifiers(no headset codec). Signed-off-by: Gongjun Song Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211105022646.26305-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit 8f4fa45982b3f2daf5b3626ca0f12bde735f31ff linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 53c625f23b61..2521834293ae 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -227,6 +227,16 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { SOF_BT_OFFLOAD_SSP(2) | SOF_SSP_BT_OFFLOAD_PRESENT), }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0AF3"), + }, + /* No Jack */ + .driver_data = (void *)(SOF_SDW_TGL_HDMI | + SOF_SDW_FOUR_SPK), + }, {} }; From patchwork Fri Nov 19 11:45:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557058 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=udqqeONH; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZdH3blRz9sPf for ; Fri, 19 Nov 2021 22:46:43 +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 1mo2Ll-0000dk-7J; Fri, 19 Nov 2021 11:46:37 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2Li-0000c3-QW for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:46:34 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 7A2703FFE5 for ; Fri, 19 Nov 2021 11:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322394; bh=hVf20aEv2FdK+X1NXRcbiJU0aQtP3ZmVRScmDqJSjUU=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=udqqeONH91791ptxUV3dhDEVm1umTbzqYxChJqr9LuL+Lk7xU6r/maCDcl5nhjLux ctMRbagdcrRhR81rkLdNowAHDm6CqkFao8rRCD01e1oUrsBHdngZy7swWwypvIpN0m biDDcsW3HB6az4RPjnDRqekeDsqbfuYjUTrS46K1ItrGO5DsgoWDAuFqjuW9JeUit6 yoW8fGPRrHeWfSFeQVpcpluFCpKSmlkahz0jb2IR5hGvqYGm85LBQbLdMDoxLMSXI6 ilUrq1zxhTIRP7eIvcP+FAr7n0HR8cuk0DrrIYrP5EZaklnGgy8QLCTixNlL/G7jGH K1toN/oBcoySQ== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 02/17] ASoC: Intel: soc-acpi: add SKU 0AF3 SoundWire configuration Date: Fri, 19 Nov 2021 19:45:33 +0800 Message-Id: <20211119114605.19838-3-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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: Gongjun Song BugLink: https://bugs.launchpad.net/bugs/1951563 New product audio hardware configuration is rt714 on link0, two rt1316s on link1 and link2 Signed-off-by: Gongjun Song Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211105022646.26305-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit a1797d61cb35848432867a5bc294ce43058b5ead linux-next) Signed-off-by: Hui Wang --- .../intel/common/soc-acpi-intel-adl-match.c | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index a0f6a69c7038..4ce7859a67d9 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -209,6 +209,25 @@ static const struct snd_soc_acpi_link_adr adl_sdca_3_in_1[] = { {} }; +static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link12_rt714_link0[] = { + { + .mask = BIT(1), + .num_adr = ARRAY_SIZE(rt1316_1_group1_adr), + .adr_d = rt1316_1_group1_adr, + }, + { + .mask = BIT(2), + .num_adr = ARRAY_SIZE(rt1316_2_group1_adr), + .adr_d = rt1316_2_group1_adr, + }, + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt714_0_adr), + .adr_d = rt714_0_adr, + }, + {} +}; + static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link2_rt714_link0[] = { { .mask = BIT(2), @@ -321,6 +340,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l13-rt714-l2.tplg", }, + { + .link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */ + .links = adl_sdw_rt1316_link12_rt714_link0, + .drv_name = "sof_sdw", + .sof_fw_filename = "sof-adl.ri", + .sof_tplg_filename = "sof-adl-rt1316-l12-rt714-l0.tplg", + }, { .link_mask = 0x5, /* 2 active links required */ .links = adl_sdw_rt1316_link2_rt714_link0, From patchwork Fri Nov 19 11:45:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557059 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Z1276wRq; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZdP4dhjz9sPf for ; Fri, 19 Nov 2021 22:46:49 +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 1mo2Lq-0000jM-La; Fri, 19 Nov 2021 11:46:42 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2Ln-0000fU-AD for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:46:39 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id F3A8D3FFE5 for ; Fri, 19 Nov 2021 11:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322398; bh=iiGYAIwesnni5bD9WjJBNnpc8PbPtsPWMiureJznKsk=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Z1276wRq2ELvSVtpmBdCj8WFCvew+FteDHHV7gNS6ND9pMd9k40AR5lWxGtpQ5E11 Ni+ckHX6I+Kn+fAKfAqLuHlyC8+qUGstoPaRP9nl/8OhoW0bil712CkFX1pV75dX9z cFF6MPC7+AJqqbI+2x5L+TlrcG++Ylfaes5wyls/ZDSjY7U1QR1OgVGOJiMBkT5+gg FjIFtiZCyCXOFcCoYYvdJnZFwTK/0GTMhU9FQJ2hBQP5p3oN4Lygb6x5Ssq9b5tWHi Co5CfE/hbE35482jpBCQGseS7demGZ6gD5hwYIv6KmlwbfTDkj5DgALlYPVC87l+rz U09KAVkZhLRtg== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 03/17] ASoC: Intel: sof_sdw: Add support for SKU 0B00 and 0B01 products Date: Fri, 19 Nov 2021 19:45:34 +0800 Message-Id: <20211119114605.19838-4-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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: Gongjun Song BugLink: https://bugs.launchpad.net/bugs/1951563 Both products support a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Signed-off-by: Gongjun Song Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211105022646.26305-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit cf304329e4afb97ffabce232eadaba94f025641d linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 2521834293ae..04dcdcfbb705 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -237,6 +237,26 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { .driver_data = (void *)(SOF_SDW_TGL_HDMI | SOF_SDW_FOUR_SPK), }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B00") + }, + .driver_data = (void *)(SOF_SDW_TGL_HDMI | + RT711_JD2 | + SOF_SDW_FOUR_SPK), + }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B01") + }, + .driver_data = (void *)(SOF_SDW_TGL_HDMI | + RT711_JD2 | + SOF_SDW_FOUR_SPK), + }, {} }; From patchwork Fri Nov 19 11:45:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557060 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=JQuFFnHq; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZdS4dSDz9sPf for ; Fri, 19 Nov 2021 22:46:52 +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 1mo2Lt-0000lm-LC; Fri, 19 Nov 2021 11:46:45 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2Lq-0000jJ-Hy for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:46:42 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 9A8113FFE5 for ; Fri, 19 Nov 2021 11:46:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322402; bh=PygqmsJy5WIBp8Te0Sp2aCrb5qY0Zehcb39P+pAk7n4=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JQuFFnHqW4eK3YCyWNrTizqRXbIXzjEbo4luk6Qoj3K1yhAVaXI/LNgjb6Z3T7lTw PfsarVyyh3p5UXqskKjTyN4xOqYNT1tERMaUT9CEgS1UXAOGXUrXdeZPhY4FK1pP4J coGQ4BysML8OqrSuM5z5kgYAfZvDHWeUE48zpZPqV7sDoqgwF+aOzdb6426eeDm87G +oYcTCgZpbQ02PlDsMo7nrhUdyvhoP39+xfhqbDI4zqYYT3JYNFq7hjPRj8Yj0esKE MwE99epiL+kq3dLEdL9OMmJ7Hb+y7P7Rzp07VgOyqZ98933JdN2mMAFVBJPhAQkeMe aMzZjLB2WdN8Q== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 04/17] ASoC: Intel: sof_sdw: Add support for SKU 0B11 product Date: Fri, 19 Nov 2021 19:45:35 +0800 Message-Id: <20211119114605.19838-5-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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: Gongjun Song BugLink: https://bugs.launchpad.net/bugs/1951563 This product supports a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Signed-off-by: Gongjun Song Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211105022646.26305-5-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit 6fef4c2f458680399b7c512cb810c1e1784d7444 linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 04dcdcfbb705..4e498ecc8a78 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -257,6 +257,16 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { RT711_JD2 | SOF_SDW_FOUR_SPK), }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B11") + }, + .driver_data = (void *)(SOF_SDW_TGL_HDMI | + RT711_JD2 | + SOF_SDW_FOUR_SPK), + }, {} }; From patchwork Fri Nov 19 11:45:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557061 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=JLaIClOY; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZdb6ppjz9sPf for ; Fri, 19 Nov 2021 22:46:59 +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 1mo2Lz-0000rt-KQ; Fri, 19 Nov 2021 11:46:51 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2Lv-0000ns-NS for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:46:47 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id EDF9D3FFE5 for ; Fri, 19 Nov 2021 11:46:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322407; bh=Kwrf9w6ylVjXji5f7n0sguK1PiKMdIclxPzmYAxDqEE=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JLaIClOYuFSAkA4vJp2ZU4/rcxzHCPDqiByImpDYzml/L2SAbCWXBmhebQ+Ufxvny vH6u4AvfFQpPwkBQhYBQy3AQbIzdJkxOsbDtB6BsgbBg+O3C5Bqu/Ss1cqqdq61LMq 9z/Sp1N15nAORk0PdR9z63E6lTpcWhJrgH0tbBEShH/AhOiKZWdSwDAypvIDtdIRc3 OU9LhZyJO/X/zw9r7tOpexoetr0tADRfbE5lASgnH95DWTY/JeFSGxUdQ09z8vd512 qF3bwtqoVOmXHcOZCwUf8IkBRt6VDJsvIyqwwkMv+6MzyZV18ReBDhAYD217sGUdap KdhdjXkU7UBOA== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 05/17] ASoC: Intel: sof_sdw: Add support for SKU 0B13 product Date: Fri, 19 Nov 2021 19:45:36 +0800 Message-Id: <20211119114605.19838-6-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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: Gongjun Song BugLink: https://bugs.launchpad.net/bugs/1951563 This product supports SoundWire capture from local microphones and one SoundWire amplifier(no headset codec). Signed-off-by: Gongjun Song Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211105022646.26305-6-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit 6448d0596e48dbc16a910f04ffc248c3f3c0a65c linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 4e498ecc8a78..17441ae2defd 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -267,6 +267,15 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { RT711_JD2 | SOF_SDW_FOUR_SPK), }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B13"), + }, + /* No Jack */ + .driver_data = (void *)SOF_SDW_TGL_HDMI, + }, {} }; From patchwork Fri Nov 19 11:45:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557062 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=KKZSmtxF; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZdl3ZcWz9sPf for ; Fri, 19 Nov 2021 22:47:07 +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 1mo2M5-00011E-Qc; Fri, 19 Nov 2021 11:46:57 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2M0-0000s3-B2 for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:46:52 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id BF6B03FFE5 for ; Fri, 19 Nov 2021 11:46:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322411; bh=ZXoCrIflnf82C2INX7mP3vTTz3m7Mibd//y9dhfzfnM=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KKZSmtxFK0QpBlQ8LdEK1qGPTO80RRC+8UZS4gvO0olsotW7Eps5KBOFhY/zq9yZe X48HjiY9/h3VCN1A7stPPXoNqWH5i0B1HIxmdY8aKbHWqqZkWxjoJ41MOpd6C6f88g dPqyYpFurxtsVq08pz2G44TN7n8TkS57pItFzYpZO4c48K4GUFy30F0epZiQMe09DT L3a1UPHyxByjVKTeJtd6fcNMuVqDVLt9a30eOwjODmH90AeA8M0EaZP7vvqie/CiAx yBeaWGxtWAA9jDubOldMfhg9voHFf/2GK2Diqf5WpylQtp8kUbPLmGgTLXsh+y6pVv 1a1R8c/IqlguA== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 06/17] ASoC: Intel: soc-acpi: add SKU 0B13 SoundWire configuration Date: Fri, 19 Nov 2021 19:45:37 +0800 Message-Id: <20211119114605.19838-7-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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: Gongjun Song BugLink: https://bugs.launchpad.net/bugs/1951563 Product audio hardware configuration is rt1316 on link2, rt714 on link 3. Signed-off-by: Gongjun Song Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211105022646.26305-7-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit 11e18f582c14fdf08f52d99d439d2b82d98ac37d linux-next) Signed-off-by: Hui Wang --- .../intel/common/soc-acpi-intel-adl-match.c | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index 4ce7859a67d9..c1ef176f9760 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -228,6 +228,20 @@ static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link12_rt714_link0[] = {} }; +static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link2_rt714_link3[] = { + { + .mask = BIT(2), + .num_adr = ARRAY_SIZE(rt1316_2_single_adr), + .adr_d = rt1316_2_single_adr, + }, + { + .mask = BIT(3), + .num_adr = ARRAY_SIZE(rt714_3_adr), + .adr_d = rt714_3_adr, + }, + {} +}; + static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link2_rt714_link0[] = { { .mask = BIT(2), @@ -340,6 +354,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l13-rt714-l2.tplg", }, + { + .link_mask = 0xC, /* rt1316 on link2 & rt714 on link3 */ + .links = adl_sdw_rt1316_link2_rt714_link3, + .drv_name = "sof_sdw", + .sof_fw_filename = "sof-adl.ri", + .sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l3.tplg", + }, { .link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */ .links = adl_sdw_rt1316_link12_rt714_link0, From patchwork Fri Nov 19 11:45:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557063 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=taGBUcPR; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZds2WKfz9sPf for ; Fri, 19 Nov 2021 22:47:13 +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 1mo2M9-00014R-QP; Fri, 19 Nov 2021 11:47:01 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2M4-0000yw-Rc for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:46:56 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id A92DF3FFE5 for ; Fri, 19 Nov 2021 11:46:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322416; bh=GmxE8SDjjNuGRcASYGmhUUkqdAKk+jm/In431fN1rIM=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=taGBUcPRDfZW2tdoyP/MgfpclFkBOpSovwCgHzGozfD0t3oiZZ4k/pBHnBQV1uK1P jTO1K8dG5kt2m8d6g9ngQkyHcwf9GSeGrpi7B89LKV/6P4UNoB0z98OwvrMOpBa7RE 494hBMEJstuxnpYUP1zMotXraIU9VtZ3oKVSTH6SUVVfyWdF49iccxNr83CiASAZco 5BYe+LTs7o15rJ9iLk57K2aUZvv1Vcar/fekJIxOoOeACguYUMGgp/1EeKtNgUFLlp uj7PKrod+p9Y/WVK7RQkFiEx/ZpWfENDjLkcEy4M62HJfxS6F6jvA4iddth2z4K5fF qP++hyIoMa83A== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 07/17] ASoC: Intel: sof_sdw: Add support for SKU 0B29 product Date: Fri, 19 Nov 2021 19:45:38 +0800 Message-Id: <20211119114605.19838-8-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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: Gongjun Song BugLink: https://bugs.launchpad.net/bugs/1951563 This product supports a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Signed-off-by: Gongjun Song Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211105022646.26305-8-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit 0c2ed4f03f0bfe2be34efbabbebe9875c3aa9ca9 linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 17441ae2defd..45db7cfa7208 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -276,6 +276,16 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { /* No Jack */ .driver_data = (void *)SOF_SDW_TGL_HDMI, }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B29"), + }, + .driver_data = (void *)(SOF_SDW_TGL_HDMI | + RT711_JD2 | + SOF_SDW_FOUR_SPK), + }, {} }; From patchwork Fri Nov 19 11:45:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557064 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=jD5LBuYS; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZf05ZP7z9sPf for ; Fri, 19 Nov 2021 22:47:20 +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 1mo2MH-0001Jw-DU; Fri, 19 Nov 2021 11:47:09 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2MC-00016W-03 for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:47:04 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id F08DF3FFE5 for ; Fri, 19 Nov 2021 11:46:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322421; bh=k01n/FUQmDSJv6NKDUKOHcSzl/fP3C4eWOKccXeYIC0=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jD5LBuYSAy9kJGyiEVWcpejEQh6XRwj8dVqYrGmZa3eD78w655bhzKURXPEXVZvGA WLI+uy6oi89PRzKGXwAYfKt21abmxv7TsbtzVc4PSigOZQom2vkzMBGL9cFSt0R7Wl zO8GQZiKC5tZkmJGwF2ktNVwsNDbDCfFrjOqV71XWjFNg3oe1nNqTvspYAWiyAg0dj UCHZJps9dkbKcvjECkoP2wHeJx22pmK5BfMd/luFeTZwBYWhn9KlZorWlSlQ3edusD jpzutLb+4ZESQmcFdvKhhUUx7GFI6zN/bbd232a7sCjCLjOXAOATuZT5DyS/4drcPh 9aKaNc7K18PGg== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 08/17] ASoC: Intel: soc-acpi: add SKU 0B29 SoundWire configuration Date: Fri, 19 Nov 2021 19:45:39 +0800 Message-Id: <20211119114605.19838-9-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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: Gongjun Song BugLink: https://bugs.launchpad.net/bugs/1951563 Product audio hardware configuration is rt711 on link2, two rt1316s on link0 and link1, rt714 on link 3. Signed-off-by: Gongjun Song Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211105022646.26305-9-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit 359ace2b9a411c3bd4b89fdc56f8b60e0f6696d2 linux-next) Signed-off-by: Hui Wang --- .../intel/common/soc-acpi-intel-adl-match.c | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index c1ef176f9760..bf859f47ffce 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -74,6 +74,15 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt711_sdca_2_adr[] = { + { + .adr = 0x000230025D071101ull, + .num_endpoints = 1, + .endpoints = &single_endpoint, + .name_prefix = "rt711" + } +}; + static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = { { .adr = 0x000131025D131601ull, /* unique ID is set for some reason */ @@ -101,6 +110,24 @@ static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt1316_0_group2_adr[] = { + { + .adr = 0x000031025D131601ull, + .num_endpoints = 1, + .endpoints = &spk_l_endpoint, + .name_prefix = "rt1316-1" + } +}; + +static const struct snd_soc_acpi_adr_device rt1316_1_group2_adr[] = { + { + .adr = 0x000130025D131601ull, + .num_endpoints = 1, + .endpoints = &spk_r_endpoint, + .name_prefix = "rt1316-2" + } +}; + static const struct snd_soc_acpi_adr_device rt1316_2_single_adr[] = { { .adr = 0x000230025D131601ull, @@ -209,6 +236,30 @@ static const struct snd_soc_acpi_link_adr adl_sdca_3_in_1[] = { {} }; +static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link2_rt1316_link01_rt714_link3[] = { + { + .mask = BIT(2), + .num_adr = ARRAY_SIZE(rt711_sdca_2_adr), + .adr_d = rt711_sdca_2_adr, + }, + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt1316_0_group2_adr), + .adr_d = rt1316_0_group2_adr, + }, + { + .mask = BIT(1), + .num_adr = ARRAY_SIZE(rt1316_1_group2_adr), + .adr_d = rt1316_1_group2_adr, + }, + { + .mask = BIT(3), + .num_adr = ARRAY_SIZE(rt714_3_adr), + .adr_d = rt714_3_adr, + }, + {} +}; + static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link12_rt714_link0[] = { { .mask = BIT(1), @@ -354,6 +405,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l13-rt714-l2.tplg", }, + { + .link_mask = 0xF, /* 4 active links required */ + .links = adl_sdw_rt711_link2_rt1316_link01_rt714_link3, + .drv_name = "sof_sdw", + .sof_fw_filename = "sof-adl.ri", + .sof_tplg_filename = "sof-adl-rt711-l2-rt1316-l01-rt714-l3.tplg", + }, { .link_mask = 0xC, /* rt1316 on link2 & rt714 on link3 */ .links = adl_sdw_rt1316_link2_rt714_link3, From patchwork Fri Nov 19 11:45:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557065 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=r+rai/A4; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZf438d9z9sPf for ; Fri, 19 Nov 2021 22:47:24 +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 1mo2ML-0001RJ-8A; Fri, 19 Nov 2021 11:47:13 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2ME-0001BW-2T for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:47:06 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 39ABB40191 for ; Fri, 19 Nov 2021 11:47:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322424; bh=c4PrZ91pHzrlyo9sh8AKypou7BtkIwdqtrtv4U+ZgP4=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=r+rai/A4rxLfvQumdnUw13ZoR8Id3MX74z+G/I/T1HEPWPviZQ30pZ7YYCBqy4/PW aWX6OmQifH5t1Q4Ss19WOLEegfgk2sj7JmFwuk/0swHA1EZfbGVpDP1MXzFiqeANK+ 0SC/tzMqfuEYtFgDuofFm0hESaldMblxNMGHdGUz4a8sNyHo9CnN5tVx6se7/gAk0F YJB/WsWdRHYnEDo1CzACu91T8eDkkNYfYLC5TC3uv3s/HDA54cq08vujrDGSsm9OXw p/CAvUgOUhczvGD9cU01ZA1LzItzWjrn/CR5Lmkf8tv9HQA1MUdDxopt8cBxtrpHHf 8eMmrrXclD3Zw== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 09/17] ASoC: Intel: sof_sdw: Add support for SKU 0B12 product Date: Fri, 19 Nov 2021 19:45:40 +0800 Message-Id: <20211119114605.19838-10-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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: Gongjun Song BugLink: https://bugs.launchpad.net/bugs/1951563 This product supports a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Signed-off-by: Libin Yang Signed-off-by: Gongjun Song Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211105022646.26305-10-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit f55af7055cd465f6b767a0c1126977d4529c63c8 linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 45db7cfa7208..d998bf4e76ac 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -267,6 +267,16 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { RT711_JD2 | SOF_SDW_FOUR_SPK), }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B12") + }, + .driver_data = (void *)(SOF_SDW_TGL_HDMI | + RT711_JD2 | + SOF_SDW_FOUR_SPK), + }, { .callback = sof_sdw_quirk_cb, .matches = { From patchwork Fri Nov 19 11:45:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557066 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=NGdI1t6R; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZfB4Dj8z9sPf for ; Fri, 19 Nov 2021 22:47:30 +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 1mo2MP-0001Yf-Dy; Fri, 19 Nov 2021 11:47:17 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2MI-0001I9-29 for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:47:10 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 657973FFE5 for ; Fri, 19 Nov 2021 11:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322428; bh=Il+VCm4SooX+bGO4qzm/vmT5eSdBHHrda4OXPX+tNWk=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NGdI1t6RPc+eFTfguakwKZaTn4Tn4QA51YRZUBPG4NGqcCl68M8nh2Ug/tmwVoWeY 0SEQ2UfNIve6eTz9JX6VWdHFyeQc++Pg0KKVJeSvbEzsZywzzfYJC4xsc1kK1c0EAH 7Kqw8prKAx7z/US+GfSGoOgUNpThZ06SXm8P20Sz9qVyP/ZbUUuevlrXFwWCyppWAs 40wQMXvFhSOQvbyoZBLjnWSFW0/JpCEbAZ/EOGnUt5+wPI/09CyzlJoLu5ywRxNxSi F6DJlxkVusqfKz3Kb2HmedAOX3c89xF2m/sU6mCfiVMAJKmYXiWjxyCel8g+FzgdGC KCXtS+uiIQW6g== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 10/17] ASoC: intel: sof_sdw: return the original error number Date: Fri, 19 Nov 2021 19:45:41 +0800 Message-Id: <20211119114605.19838-11-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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/1951563 We don't want to convert create_sdw_dailink()'s return value to -ENOMEM. Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20211027021824.24776-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit dd31ddd81904070d0a9cafd5499d3210a322f8af linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index d998bf4e76ac..0789f2149ce6 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1137,7 +1137,7 @@ static int sof_card_dai_links_create(struct device *dev, &ignore_pch_dmic); if (ret < 0) { dev_err(dev, "failed to create dai link %d", be_id); - return -ENOMEM; + return ret; } } From patchwork Fri Nov 19 11:45:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557067 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=jlnqnulc; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZfG5GMNz9sPf for ; Fri, 19 Nov 2021 22:47:34 +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 1mo2MU-0001fa-BG; Fri, 19 Nov 2021 11:47:22 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2ML-0001RE-MQ for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:47:13 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 8F1CC40191 for ; Fri, 19 Nov 2021 11:47:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322432; bh=t/Wb4vQKUi6JhkXGcaDSitIqTmlVCzx24c64d5jz/nk=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jlnqnulcwwxnpxPfwDPrtVwNu5zfm5SnhSN6PBRj+Nmd/PfsrvB0geH2aYMhtePT0 sEHsx/DtRjDoyMpApwMnldiqQ1C3p0ME7z7FBGwPGXngqSHn+1JhevrWkOwpdUL6LH /SBZQVBFtHuLj5Oq3yojEKaWbXHOMgHec39DMLRYIbZtjmVbLohrBVx+FXpaph56Kn 1LsasCNTsU94kIISX5+ziBrLUZ88yniOjs2EB3nkGGxvjXkxUIu7hryya13f/gQZ8r ZIwslUDDtIk9p278lehbVSJS0wgVPDratn5VVTR9oBXuPgsTpvuFVszjbI5WPMgl+k 5icwt6ZJq2T3g== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 11/17] ASoC: intel: sof_sdw: rename be_index/link_id to link_index Date: Fri, 19 Nov 2021 19:45:42 +0800 Message-Id: <20211119114605.19838-12-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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/1951563 The link_id variable in sof_card_dai_links_create() and be_index argument in create_sdw_dailink() is actually links' index. Rename them to link_index to be consistent. Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211027021824.24776-5-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (backported from commit b63137cf5167b73d9d68a2334b835996bfc3b941 linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 48 +++++++++++++++++--------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 0789f2149ce6..075e0cd1746f 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -822,7 +822,7 @@ static int get_slave_info(const struct snd_soc_acpi_link_adr *adr_link, return 0; } -static int create_sdw_dailink(struct device *dev, int *be_index, +static int create_sdw_dailink(struct device *dev, int *link_index, struct snd_soc_dai_link *dai_links, int sdw_be_num, int sdw_cpu_dai_num, struct snd_soc_dai_link_component *cpus, @@ -925,8 +925,12 @@ static int create_sdw_dailink(struct device *dev, int *be_index, cpus[cpu_dai_index++].dai_name = cpu_name; } - if (*be_index >= sdw_be_num) { - dev_err(dev, " invalid be dai index %d", *be_index); + /* + * We create sdw dai links at first stage, so link index should + * not be larger than sdw_be_num + */ + if (*link_index >= sdw_be_num) { + dev_err(dev, "invalid dai link index %d", *link_index); return -EINVAL; } @@ -937,18 +941,19 @@ static int create_sdw_dailink(struct device *dev, int *be_index, playback = (stream == SNDRV_PCM_STREAM_PLAYBACK); capture = (stream == SNDRV_PCM_STREAM_CAPTURE); - init_dai_link(dev, dai_links + *be_index, *be_index, name, + init_dai_link(dev, dai_links + *link_index, *link_index, name, playback, capture, cpus + *cpu_id, cpu_dai_num, codecs, codec_num, NULL, &sdw_ops); + /* * SoundWire DAILINKs use 'stream' functions and Bank Switch operations * based on wait_for_completion(), tag them as 'nonatomic'. */ - dai_links[*be_index].nonatomic = true; + dai_links[*link_index].nonatomic = true; - ret = set_codec_init_func(link, dai_links + (*be_index)++, + ret = set_codec_init_func(link, dai_links + (*link_index)++, playback, group_id); if (ret < 0) { dev_err(dev, "failed to init codec %d", codec_index); @@ -1029,7 +1034,7 @@ static int sof_card_dai_links_create(struct device *dev, bool group_generated[SDW_MAX_GROUPS]; int ssp_codec_index, ssp_mask; struct snd_soc_dai_link *links; - int num_links, link_id = 0; + int num_links, link_index = 0; char *name, *cpu_name; int total_cpu_dai_num; int sdw_cpu_dai_num; @@ -1129,23 +1134,20 @@ static int sof_card_dai_links_create(struct device *dev, group_generated[endpoint->group_id]) continue; - ret = create_sdw_dailink(dev, &be_id, links, sdw_be_num, + ret = create_sdw_dailink(dev, &link_index, links, sdw_be_num, sdw_cpu_dai_num, cpus, adr_link, &cpu_id, group_generated, codec_conf, codec_conf_count, &codec_conf_index, &ignore_pch_dmic); if (ret < 0) { - dev_err(dev, "failed to create dai link %d", be_id); + dev_err(dev, "failed to create dai link %d", link_index); return ret; } } - /* non-sdw DAI follows sdw DAI */ - link_id = be_id; - /* get BE ID for non-sdw DAI */ - be_id = get_next_be_id(links, be_id); + be_id = get_next_be_id(links, link_index); SSP: /* SSP */ @@ -1186,17 +1188,17 @@ static int sof_card_dai_links_create(struct device *dev, playback = info->direction[SNDRV_PCM_STREAM_PLAYBACK]; capture = info->direction[SNDRV_PCM_STREAM_CAPTURE]; - init_dai_link(dev, links + link_id, be_id, name, + init_dai_link(dev, links + link_index, be_id, name, playback, capture, cpus + cpu_id, 1, ssp_components, 1, NULL, info->ops); - ret = info->init(NULL, links + link_id, info, 0); + ret = info->init(NULL, links + link_index, info, 0); if (ret < 0) return ret; - INC_ID(be_id, cpu_id, link_id); + INC_ID(be_id, cpu_id, link_index); } DMIC: @@ -1207,21 +1209,21 @@ static int sof_card_dai_links_create(struct device *dev, goto HDMI; } cpus[cpu_id].dai_name = "DMIC01 Pin"; - init_dai_link(dev, links + link_id, be_id, "dmic01", + init_dai_link(dev, links + link_index, be_id, "dmic01", 0, 1, // DMIC only supports capture cpus + cpu_id, 1, dmic_component, 1, sof_sdw_dmic_init, NULL); - INC_ID(be_id, cpu_id, link_id); + INC_ID(be_id, cpu_id, link_index); cpus[cpu_id].dai_name = "DMIC16k Pin"; - init_dai_link(dev, links + link_id, be_id, "dmic16k", + init_dai_link(dev, links + link_index, be_id, "dmic16k", 0, 1, // DMIC only supports capture cpus + cpu_id, 1, dmic_component, 1, /* don't call sof_sdw_dmic_init() twice */ NULL, NULL); - INC_ID(be_id, cpu_id, link_id); + INC_ID(be_id, cpu_id, link_index); } HDMI: @@ -1259,12 +1261,12 @@ static int sof_card_dai_links_create(struct device *dev, return -ENOMEM; cpus[cpu_id].dai_name = cpu_name; - init_dai_link(dev, links + link_id, be_id, name, + init_dai_link(dev, links + link_index, be_id, name, 1, 0, // HDMI only supports playback cpus + cpu_id, 1, idisp_components + i, 1, sof_sdw_hdmi_init, NULL); - INC_ID(be_id, cpu_id, link_id); + INC_ID(be_id, cpu_id, link_index); } if (sof_sdw_quirk & SOF_SSP_BT_OFFLOAD_PRESENT) { @@ -1288,7 +1290,7 @@ static int sof_card_dai_links_create(struct device *dev, return -ENOMEM; cpus[cpu_id].dai_name = cpu_name; - init_dai_link(dev, links + link_id, be_id, name, 1, 1, + init_dai_link(dev, links + link_index, be_id, name, 1, 1, cpus + cpu_id, 1, ssp_components, 1, NULL, NULL); } From patchwork Fri Nov 19 11:45:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557068 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=W2hJL644; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZfM3Ktzz9sPf for ; Fri, 19 Nov 2021 22:47:39 +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 1mo2MY-0001lz-VO; Fri, 19 Nov 2021 11:47:27 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2MP-0001XB-QJ for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:47:18 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 3CF253FFE5 for ; Fri, 19 Nov 2021 11:47:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322435; bh=uZ2H0GylbDu2x4UmZGbKSCJzjT1//NkUz2gXUxwCV2c=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=W2hJL644O2LOacaOak2FySyu0Wb4ONt2IqoQcF18HFtpg71SKwU0CNs49u1DBi1NW 50P6PMKVDJqONExMI1EcELnDoUFisfPFf8wCjCroVvW0+g8KLCreApet55rsoqHcuW uj17g/+PYeD4ixXARTDfJZH1SBRbWEjm9B7pCAJ7lYg73CALg9kkarp0m+y3d9SxNC cqXS9ANVA3kAmbnJdLgNtaHXatNlh+ZXfvru013d4tLYV7EsxwSI3i+SqlqS3Yhlm6 WZdpS/0yLxj4J9hOxCH5FA/9MAppPUgx3/HMy6AfHcdBb6WRLtEusqKEUd7J/r9Aak otR9V3MXrf9lQ== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 12/17] ASoC: intel: sof_sdw: Use a fixed DAI link id for AMP Date: Fri, 19 Nov 2021 19:45:43 +0800 Message-Id: <20211119114605.19838-13-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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/1951563 Currently, we assign SoundWire DAI link id according to the order in the link address table, with the assumption that the headset codec is listed first, then amplifiers and last capture devices. If the headset codec is not present in a platform, the dai link for amplifiers will be shifted, which can be handled in two ways a) modify the topology to renumber the dailink changes b) keep the dailink numbers constant in topology but also avoid the variations in the machine driver. This patch adds support for option b), the dailink index for amplifiers and capture devices becomes fixed. Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211027021824.24776-6-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (backported from commit d471c034f83201f84330e9ed46ad5139d32e77ce linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 22 +++++++++++++++++++--- sound/soc/intel/boards/sof_sdw_common.h | 6 ++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 075e0cd1746f..a5c23088086e 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -416,6 +416,7 @@ static struct sof_sdw_codec_info codec_info_list[] = { .direction = {true, true}, .dai_name = "rt700-aif1", .init = sof_sdw_rt700_init, + .codec_type = SOF_SDW_CODEC_TYPE_JACK, }, { .part_id = 0x711, @@ -424,6 +425,7 @@ static struct sof_sdw_codec_info codec_info_list[] = { .dai_name = "rt711-sdca-aif1", .init = sof_sdw_rt711_sdca_init, .exit = sof_sdw_rt711_sdca_exit, + .codec_type = SOF_SDW_CODEC_TYPE_JACK, }, { .part_id = 0x711, @@ -432,6 +434,7 @@ static struct sof_sdw_codec_info codec_info_list[] = { .dai_name = "rt711-aif1", .init = sof_sdw_rt711_init, .exit = sof_sdw_rt711_exit, + .codec_type = SOF_SDW_CODEC_TYPE_JACK, }, { .part_id = 0x1308, @@ -440,12 +443,14 @@ static struct sof_sdw_codec_info codec_info_list[] = { .dai_name = "rt1308-aif", .ops = &sof_sdw_rt1308_i2s_ops, .init = sof_sdw_rt1308_init, + .codec_type = SOF_SDW_CODEC_TYPE_AMP, }, { .part_id = 0x1316, .direction = {true, true}, .dai_name = "rt1316-aif", .init = sof_sdw_rt1316_init, + .codec_type = SOF_SDW_CODEC_TYPE_AMP, }, { .part_id = 0x714, @@ -454,6 +459,7 @@ static struct sof_sdw_codec_info codec_info_list[] = { .ignore_pch_dmic = true, .dai_name = "rt715-aif2", .init = sof_sdw_rt715_sdca_init, + .codec_type = SOF_SDW_CODEC_TYPE_MIC, }, { .part_id = 0x715, @@ -462,6 +468,7 @@ static struct sof_sdw_codec_info codec_info_list[] = { .ignore_pch_dmic = true, .dai_name = "rt715-aif2", .init = sof_sdw_rt715_sdca_init, + .codec_type = SOF_SDW_CODEC_TYPE_MIC, }, { .part_id = 0x714, @@ -470,6 +477,7 @@ static struct sof_sdw_codec_info codec_info_list[] = { .ignore_pch_dmic = true, .dai_name = "rt715-aif2", .init = sof_sdw_rt715_init, + .codec_type = SOF_SDW_CODEC_TYPE_MIC, }, { .part_id = 0x715, @@ -478,6 +486,7 @@ static struct sof_sdw_codec_info codec_info_list[] = { .ignore_pch_dmic = true, .dai_name = "rt715-aif2", .init = sof_sdw_rt715_init, + .codec_type = SOF_SDW_CODEC_TYPE_MIC, }, { .part_id = 0x8373, @@ -485,12 +494,14 @@ static struct sof_sdw_codec_info codec_info_list[] = { .dai_name = "max98373-aif1", .init = sof_sdw_mx8373_init, .codec_card_late_probe = sof_sdw_mx8373_late_probe, + .codec_type = SOF_SDW_CODEC_TYPE_AMP, }, { .part_id = 0x5682, .direction = {true, true}, .dai_name = "rt5682-sdw", .init = sof_sdw_rt5682_init, + .codec_type = SOF_SDW_CODEC_TYPE_JACK, }, }; @@ -829,7 +840,7 @@ static int create_sdw_dailink(struct device *dev, int *link_index, const struct snd_soc_acpi_link_adr *link, int *cpu_id, bool *group_generated, struct snd_soc_codec_conf *codec_conf, - int codec_count, + int codec_count, int *link_id, int *codec_conf_index, bool *ignore_pch_dmic) { @@ -887,6 +898,11 @@ static int create_sdw_dailink(struct device *dev, int *link_index, if (codec_info_list[codec_index].ignore_pch_dmic) *ignore_pch_dmic = true; + /* Shift the first amplifier's *link_id to SDW_AMP_DAI_ID */ + if (codec_info_list[codec_index].codec_type == SOF_SDW_CODEC_TYPE_AMP && + *link_id < SDW_AMP_DAI_ID) + *link_id = SDW_AMP_DAI_ID; + cpu_dai_index = *cpu_id; for_each_pcm_streams(stream) { char *name, *cpu_name; @@ -941,7 +957,7 @@ static int create_sdw_dailink(struct device *dev, int *link_index, playback = (stream == SNDRV_PCM_STREAM_PLAYBACK); capture = (stream == SNDRV_PCM_STREAM_CAPTURE); - init_dai_link(dev, dai_links + *link_index, *link_index, name, + init_dai_link(dev, dai_links + *link_index, (*link_id)++, name, playback, capture, cpus + *cpu_id, cpu_dai_num, codecs, codec_num, @@ -1138,7 +1154,7 @@ static int sof_card_dai_links_create(struct device *dev, sdw_cpu_dai_num, cpus, adr_link, &cpu_id, group_generated, codec_conf, codec_conf_count, - &codec_conf_index, + &be_id, &codec_conf_index, &ignore_pch_dmic); if (ret < 0) { dev_err(dev, "failed to create dai link %d", link_index); diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 414bb7ad645a..ac3dec164b81 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -15,6 +15,7 @@ #define MAX_NO_PROPS 2 #define MAX_HDMI_NUM 4 +#define SDW_AMP_DAI_ID 2 #define SDW_DMIC_DAI_ID 4 #define SDW_MAX_CPU_DAIS 16 #define SDW_INTEL_BIDIR_PDI_BASE 2 @@ -52,9 +53,14 @@ enum { (((quirk) << SOF_BT_OFFLOAD_SSP_SHIFT) & SOF_BT_OFFLOAD_SSP_MASK) #define SOF_SSP_BT_OFFLOAD_PRESENT BIT(16) +#define SOF_SDW_CODEC_TYPE_JACK 0 +#define SOF_SDW_CODEC_TYPE_AMP 1 +#define SOF_SDW_CODEC_TYPE_MIC 2 + struct sof_sdw_codec_info { const int part_id; const int version_id; + const int codec_type; int amp_num; const u8 acpi_id[ACPI_ID_LEN]; const bool direction[2]; // playback & capture support From patchwork Fri Nov 19 11:45:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557069 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=FILSQA9z; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZfT3ZM3z9sPf for ; Fri, 19 Nov 2021 22:47:45 +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 1mo2Me-0001tX-Dx; Fri, 19 Nov 2021 11:47:32 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2MT-0001cE-K3 for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:47:21 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 0D8C340191 for ; Fri, 19 Nov 2021 11:47:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322439; bh=PuenZ/YDPuOiXrITwYcl8Sy0qPKR9r81DvpoeUmMUQU=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FILSQA9zpU6+5ytd6pgHLwzf7kP3RTIS+JpwkY0G764QwKXZlYPA86PGpC2ksurcD 4ULnNpS0ZHIzYxzpQ//wEDxLN7EWdrp9s+HR7Htf/+QdjiJc+1zOQGM1jAnYdxd5eb E+QjnZEKsg4bHFuLtVViphaBTr5HDEkIpFXD/Ri0UhjVnA2hBpPFJ8KSCiC7ADVAbS mWCd9x36AkicPOuRAXMM+6pG4UEcBuHDJMX52VvCV/DcclVKUxrr8e6xLMYIMVVJIR 5Cz+TJkl25fuUy9GsRu8ZQwjL5lMXEDZU6crJwQJpl4R8XI/nvYjrELdV5n0cc9fPG 7otzGy7HAJkRQ== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 13/17] ASoC: intel: sof_sdw: move DMIC link id overwrite to create_sdw_dailink Date: Fri, 19 Nov 2021 19:45:44 +0800 Message-Id: <20211119114605.19838-14-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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/1951563 We can apply the fixed dai link id for DMICs in create_sdw_dailink(). No need to set it in each DMIC's callback. The fixed dai link id is not only for rt715 and rt715-sdca, but for all DMICs, therefore we remove the SOF_RT715_DAI_ID_FIX check as well. Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211027021824.24776-7-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit bf605cb042307d162fbcb094738bab5d767f1261 linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 8 ++++++++ sound/soc/intel/boards/sof_sdw_rt715.c | 7 ------- sound/soc/intel/boards/sof_sdw_rt715_sdca.c | 7 ------- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index a5c23088086e..1f139014c0dd 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -903,6 +903,14 @@ static int create_sdw_dailink(struct device *dev, int *link_index, *link_id < SDW_AMP_DAI_ID) *link_id = SDW_AMP_DAI_ID; + /* + * DAI ID is fixed at SDW_DMIC_DAI_ID for MICs to + * keep sdw DMIC and HDMI setting static in UCM + */ + if (codec_info_list[codec_index].codec_type == SOF_SDW_CODEC_TYPE_MIC && + *link_id < SDW_DMIC_DAI_ID) + *link_id = SDW_DMIC_DAI_ID; + cpu_dai_index = *cpu_id; for_each_pcm_streams(stream) { char *name, *cpu_name; diff --git a/sound/soc/intel/boards/sof_sdw_rt715.c b/sound/soc/intel/boards/sof_sdw_rt715.c index 9b298f79e784..064bfc7d9c6d 100644 --- a/sound/soc/intel/boards/sof_sdw_rt715.c +++ b/sound/soc/intel/boards/sof_sdw_rt715.c @@ -29,13 +29,6 @@ int sof_sdw_rt715_init(const struct snd_soc_acpi_link_adr *link, struct sof_sdw_codec_info *info, bool playback) { - /* - * DAI ID is fixed at SDW_DMIC_DAI_ID for 715 to - * keep sdw DMIC and HDMI setting static in UCM - */ - if (sof_sdw_quirk & SOF_RT715_DAI_ID_FIX) - dai_links->id = SDW_DMIC_DAI_ID; - dai_links->init = rt715_rtd_init; return 0; diff --git a/sound/soc/intel/boards/sof_sdw_rt715_sdca.c b/sound/soc/intel/boards/sof_sdw_rt715_sdca.c index c056e56a139b..846188eba526 100644 --- a/sound/soc/intel/boards/sof_sdw_rt715_sdca.c +++ b/sound/soc/intel/boards/sof_sdw_rt715_sdca.c @@ -29,13 +29,6 @@ int sof_sdw_rt715_sdca_init(const struct snd_soc_acpi_link_adr *link, struct sof_sdw_codec_info *info, bool playback) { - /* - * DAI ID is fixed at SDW_DMIC_DAI_ID for 715-SDCA to - * keep sdw DMIC and HDMI setting static in UCM - */ - if (sof_sdw_quirk & SOF_RT715_DAI_ID_FIX) - dai_links->id = SDW_DMIC_DAI_ID; - dai_links->init = rt715_sdca_rtd_init; return 0; From patchwork Fri Nov 19 11:45:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557070 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=inN0VgMJ; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZfX1nF2z9sPf for ; Fri, 19 Nov 2021 22:47:48 +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 1mo2Mj-00020n-8P; Fri, 19 Nov 2021 11:47:37 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2MZ-0001jj-0h for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:47:27 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 6F1623FFE5 for ; Fri, 19 Nov 2021 11:47:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322444; bh=mDZbUW42dpKbSuu2hXXjAbxaSSK2aWWIATFkHzSG4GU=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=inN0VgMJjy5TqmtuQ3r+waFmGAuZUf/DZb1BDbXyPJsAzeM+mwMwC7D6M8FPnvHDa AWC2bJ5OBI1pAk1FwMXW2PN835qwAvUvfQGpsnTep49Hd4h2kmUcQPOQgVNfyCLLsb B1bbfsPDhuI5q6jc08mPzMN7CPsJ2mAeIWgTeqBnXgOp1FepWwgQTRWp9OPA2+XuWZ Suy5SyB2cDYsarK8hxzGzlR7xMJ8nNdXlLQA+2h3NK3Cpn4t+nkXLOUiKP6UZL42Wj SY9YAsfxI2QCZcuLppBMeKFVyiJTXmwSrX5fwBhFep0hi9LFIiGZso0ScTp3sUcb5H EjTgzcM5jRElQ== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 14/17] ASoC: intel: sof_sdw: remove SOF_RT715_DAI_ID_FIX quirk Date: Fri, 19 Nov 2021 19:45:45 +0800 Message-Id: <20211119114605.19838-15-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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/1951563 SOF_RT715_DAI_ID_FIX is not used anywhere. Remove it. Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211027021824.24776-8-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (backported from commit f8f8312263e2d0c38dd0330a4503dcdcc94d0cd5 linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 17 +++-------------- sound/soc/intel/boards/sof_sdw_common.h | 1 - 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 1f139014c0dd..a0d43be56d18 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -36,8 +36,6 @@ static void log_quirks(struct device *dev) if (SOF_SSP_GET_PORT(sof_sdw_quirk)) dev_dbg(dev, "SSP port %ld\n", SOF_SSP_GET_PORT(sof_sdw_quirk)); - if (sof_sdw_quirk & SOF_RT715_DAI_ID_FIX) - dev_dbg(dev, "quirk SOF_RT715_DAI_ID_FIX enabled\n"); if (sof_sdw_quirk & SOF_SDW_NO_AGGREGATION) dev_dbg(dev, "quirk SOF_SDW_NO_AGGREGATION enabled\n"); } @@ -64,8 +62,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "09C6") }, - .driver_data = (void *)(RT711_JD2 | - SOF_RT715_DAI_ID_FIX), + .driver_data = (void *)RT711_JD2, }, { /* early version of SKU 09C6 */ @@ -74,8 +71,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0983") }, - .driver_data = (void *)(RT711_JD2 | - SOF_RT715_DAI_ID_FIX), + .driver_data = (void *)RT711_JD2, }, { .callback = sof_sdw_quirk_cb, @@ -84,7 +80,6 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "098F"), }, .driver_data = (void *)(RT711_JD2 | - SOF_RT715_DAI_ID_FIX | SOF_SDW_FOUR_SPK), }, { @@ -94,7 +89,6 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0990"), }, .driver_data = (void *)(RT711_JD2 | - SOF_RT715_DAI_ID_FIX | SOF_SDW_FOUR_SPK), }, /* IceLake devices */ @@ -126,8 +120,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A3E") }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | - RT711_JD2 | - SOF_RT715_DAI_ID_FIX), + RT711_JD2), }, { /* Dell XPS 9710 */ @@ -138,7 +131,6 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | RT711_JD2 | - SOF_RT715_DAI_ID_FIX | SOF_SDW_FOUR_SPK), }, { @@ -149,7 +141,6 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | RT711_JD2 | - SOF_RT715_DAI_ID_FIX | SOF_SDW_FOUR_SPK), }, { @@ -199,7 +190,6 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | RT711_JD2 | - SOF_RT715_DAI_ID_FIX | SOF_SDW_FOUR_SPK), }, /* AlderLake devices */ @@ -211,7 +201,6 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { }, .driver_data = (void *)(RT711_JD1 | SOF_SDW_TGL_HDMI | - SOF_RT715_DAI_ID_FIX | SOF_BT_OFFLOAD_SSP(2) | SOF_SSP_BT_OFFLOAD_PRESENT), }, diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index ac3dec164b81..499305374091 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -43,7 +43,6 @@ enum { #define SOF_SDW_PCH_DMIC BIT(4) #define SOF_SSP_PORT(x) (((x) & GENMASK(5, 0)) << 5) #define SOF_SSP_GET_PORT(quirk) (((quirk) >> 5) & GENMASK(5, 0)) -#define SOF_RT715_DAI_ID_FIX BIT(11) #define SOF_SDW_NO_AGGREGATION BIT(12) /* BT audio offload: reserve 3 bits for future */ From patchwork Fri Nov 19 11:45:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557071 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Ay7r4fkQ; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZff39N7z9sPf for ; Fri, 19 Nov 2021 22:47:54 +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 1mo2Mq-0002Ey-Se; Fri, 19 Nov 2021 11:47:44 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2Mc-0001oU-Vd for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:47:31 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id D7BF740191 for ; Fri, 19 Nov 2021 11:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322447; bh=iJdwm3Axxd3//2x7wlby2A49mLd5EMBx6v7DWf4H69Q=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ay7r4fkQWWEPhQF1WmpxOAeLoyyZl7npfKzJ/VU2yQxQOvGIojB55NtnnTwVhINgQ 8dOsVrI9g6em/uJZknJLBxnDUWXtnOnasgVuAAv1j3QvC3K1U0/3K/RfbGWKOYXzI7 KSFNzq+Xv60jescOVIwe/DRbLRe1xCmhsy80VwGb82LSBYoGkNcQmRlcenM5hdDKdW fS2ZL2pek+xYcM+XPVdceSs6BGLdEQWJMcz62nhll6dogwlYQGNJAb37EcUM+y9USy Ix0Jn2sxv0x1Ae78PsRvZtW38RVgQTbQiyR5AwqqiCsGNL1btEE9qJ2tH1VLeC69kk 4h2Qd+gqGXdbw== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 15/17] ASoC: intel: sof_sdw: remove get_next_be_id Date: Fri, 19 Nov 2021 19:45:46 +0800 Message-Id: <20211119114605.19838-16-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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/1951563 DAI link id will not be set from sdw codec init feedback function, and be_id is changed by create_sdw_dailink() now. So we don't need get_next_be_id() anymore. Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211027021824.24776-10-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit 4ed65d6ead29a992c4803e1138a6042caa6ec2a3 linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index a0d43be56d18..45d5c471ba1c 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -980,17 +980,6 @@ static int create_sdw_dailink(struct device *dev, int *link_index, return 0; } -/* - * DAI link ID of SSP & DMIC & HDMI are based on last - * link ID used by sdw link. Since be_id may be changed - * in init func of sdw codec, it is not equal to be_id - */ -static inline int get_next_be_id(struct snd_soc_dai_link *links, - int be_id) -{ - return links[be_id - 1].id + 1; -} - #define IDISP_CODEC_MASK 0x4 static int sof_card_codec_conf_alloc(struct device *dev, @@ -1159,9 +1148,6 @@ static int sof_card_dai_links_create(struct device *dev, } } - /* get BE ID for non-sdw DAI */ - be_id = get_next_be_id(links, link_index); - SSP: /* SSP */ if (!ssp_num) From patchwork Fri Nov 19 11:45:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557072 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=bh8VSGAn; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZff6vQ0z9sR4 for ; Fri, 19 Nov 2021 22:47:54 +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 1mo2Ms-0002J6-Du; Fri, 19 Nov 2021 11:47:46 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2Mf-0001u0-Gy for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:47:33 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 109EA3FFE5 for ; Fri, 19 Nov 2021 11:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322452; bh=5EXnH+RhKGaV4VtNpTMhURsK20bKORFHUNsNI8IOPRk=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bh8VSGAnJaspL+8Zo5/lc8qpMKFGgpLvpvHGkZymcQSZLtILU+pHBYls9e3PpheYK gd/dLnubMCcdCX3r0zu2fooDi2NoqHB+ku55h1kehevLKgd3RJo4bBCxcmCNyktpp5 +93gb7oci31GeDugW2ttjLivIHLzvQAmXYMzyvFVKepHdeUDlRk74GiHn189E93BhX 4qxbn8VLF8Mo0rjNimZf/Y6lynrnSsdWTyMq3a5plmPkfR0t7s7TeZdAhpWHVSvmAk gQN87Xuk3YPWhOWCxO4pbeEUfpfcvwniPNbi/xwd1qs/OQMCn2c2ztdX9fBwjYQkcs er3Y9mjLtytVA== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 16/17] ASoC: intel: sof_sdw: add link adr order check Date: Fri, 19 Nov 2021 19:45:47 +0800 Message-Id: <20211119114605.19838-17-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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/1951563 We assume the adr order described in a snd_soc_acpi_link_adr array is jack -> amp -> mic. We follow the same order to implement the topology. We will need a special topology if we configure a snd_soc_acpi_link_adr array with different order. Adding a check and a warning message can remind people to keep the order when adding a new snd_soc_acpi_link_adr array. Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20211027021824.24776-11-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit 296c789ce1e501be8b46ebb24da4ba53063cc10a linux-next) Signed-off-by: Hui Wang --- sound/soc/intel/boards/sof_sdw.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 45d5c471ba1c..2bb0179fca1d 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -538,10 +538,11 @@ static inline int find_codec_info_acpi(const u8 *acpi_id) * Since some sdw slaves may be aggregated, the CPU DAI number * may be larger than the number of BE dailinks. */ -static int get_sdw_dailink_info(const struct snd_soc_acpi_link_adr *links, +static int get_sdw_dailink_info(struct device *dev, const struct snd_soc_acpi_link_adr *links, int *sdw_be_num, int *sdw_cpu_dai_num) { const struct snd_soc_acpi_link_adr *link; + int _codec_type = SOF_SDW_CODEC_TYPE_JACK; bool group_visited[SDW_MAX_GROUPS]; bool no_aggregation; int i; @@ -567,6 +568,12 @@ static int get_sdw_dailink_info(const struct snd_soc_acpi_link_adr *links, if (codec_index < 0) return codec_index; + if (codec_info_list[codec_index].codec_type < _codec_type) + dev_warn(dev, + "Unexpected address table ordering. Expected order: jack -> amp -> mic\n"); + + _codec_type = codec_info_list[codec_index].codec_type; + endpoint = link->adr_d->endpoints; /* count DAI number for playback and capture */ @@ -1072,7 +1079,7 @@ static int sof_card_dai_links_create(struct device *dev, ssp_num = ssp_codec_index >= 0 ? hweight_long(ssp_mask) : 0; comp_num = hdmi_num + ssp_num; - ret = get_sdw_dailink_info(mach_params->links, + ret = get_sdw_dailink_info(dev, mach_params->links, &sdw_be_num, &sdw_cpu_dai_num); if (ret < 0) { dev_err(dev, "failed to get sdw link info %d", ret); From patchwork Fri Nov 19 11:45:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1557073 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=CJvouRKW; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HwZfk2Tqqz9sPf for ; Fri, 19 Nov 2021 22:47:58 +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 1mo2Mu-0002OR-Ps; Fri, 19 Nov 2021 11:47:48 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mo2Mn-000242-1c for kernel-team@lists.ubuntu.com; Fri, 19 Nov 2021 11:47:41 +0000 Received: from localhost.localdomain (unknown [10.101.195.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 002ED3FFE5 for ; Fri, 19 Nov 2021 11:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1637322458; bh=n0luemjtnWNw19HbpQy+jpTBUobycjNTn71O20b+Yyw=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CJvouRKWaEcgb2HoJPVHhg48KnjAK+wIDgUZ6GYuaMF/RNEZ85O0AacpHfkrYiktc +Aj6enL/XhuyCqi+vVNpamvDv9qFq6lBtAeXHrPKPPw/D7jldw00uDowffbXvw9A3S DvCw3eQgegc+qjQNmxOvlRojFSDjUkdCMOHMYAzFTK/90Zb3tjWfbQuSZlCyA/0WSB M5wbHYQnzMsBVac6FDwAGLPWXmRlIBtQ0s7RG9vqdEUXP5NBhf+YaaPkI58MbDCnG8 sFiu2jO1icvt4DWoNNkBs2HYgl0g47w+RXrseY6/wDWVWbL//SLD6ttbCAtjMEAL/U X2MJLfhCCpRoA== From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][OEM-5.14][PATCH 17/17] soundwire: bus: update Slave status in sdw_clear_slave_status Date: Fri, 19 Nov 2021 19:45:48 +0800 Message-Id: <20211119114605.19838-18-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119114605.19838-1-hui.wang@canonical.com> References: <20211119114605.19838-1-hui.wang@canonical.com> MIME-Version: 1.0 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/1951563 Call to sdw_update_slave_status() needs to be added to sdw_clear_slave_ status() to ensure Slaves are informed of the new status via update_ status() callback. This will enable codec drivers to reset their internal states and make sure the register settings are properly restored on pm_runtime or system resume BugLink: https://github.com/thesofproject/linux/issues/2908 BugLink: https://github.com/thesofproject/linux/issues/2637 Signed-off-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210714033609.11963-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul (cherry picked from commit 899a750986bc4e62d554d4a5dd237c0ab25b698a linux-next) Signed-off-by: Hui Wang --- drivers/soundwire/bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 3e6d4addac2f..dc385c3daf21 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -1853,6 +1853,7 @@ void sdw_clear_slave_status(struct sdw_bus *bus, u32 request) if (slave->status != SDW_SLAVE_UNATTACHED) { sdw_modify_slave_status(slave, SDW_SLAVE_UNATTACHED); slave->first_interrupt_done = false; + sdw_update_slave_status(slave, SDW_SLAVE_UNATTACHED); } /* keep track of request, used in pm_runtime resume */