From nobody Sun Dec 28 22:51:32 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64B81C10F04 for ; Mon, 4 Dec 2023 13:53:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344747AbjLDNxU (ORCPT ); Mon, 4 Dec 2023 08:53:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235609AbjLDNxQ (ORCPT ); Mon, 4 Dec 2023 08:53:16 -0500 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF9A9E5; Mon, 4 Dec 2023 05:53:22 -0800 (PST) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3B47ABGq012871; Mon, 4 Dec 2023 07:53:10 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=PODMain02222019; bh=t Hr3GFB2AAZ+8RQEf5NqMNxRghhA7v6HdOduQdJcU38=; b=LW9cSdPm0Jjg0vNdD UQPu0Zz/8Vsw4uUVKZMcjxeFwA34087WaNCtKz0Z10iaGTbmBvAhyQ6U+tp6ZZwR BT0cxTKi5mqAM/j84mTWPIXg17z3ppR2MVZeBwuBDmKdslqZlfia+f4lhxCcJ5/n fBaMCFlpeLX0JaZMByb7Sn8KFDsWaXUBBbIXU7HV+YtsgvBGqWvTv/k67l57KX4I IznGu83hAKwN3mZgxrV2ffNvHvoeW+BZdnG+ODqgWmGRmFftonqRuAnFC3w+F9ZO jIuAm/Nn9CpWI0y5aCsHjU8AcbUUmmzJtkrxCo9NnwQgkUBJYSFas0RNMzodhV5K f90EQ== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3ur2v21wh7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Dec 2023 07:53:09 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Mon, 4 Dec 2023 13:53:07 +0000 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.40 via Frontend Transport; Mon, 4 Dec 2023 13:53:07 +0000 Received: from edi-sw-dsktp-006.ad.cirrus.com (edi-sw-dsktp-006.ad.cirrus.com [198.90.251.82]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 39ADD468; Mon, 4 Dec 2023 13:53:07 +0000 (UTC) From: Richard Fitzgerald To: , , , CC: , , , , , , , Richard Fitzgerald Subject: [PATCH v2] ASoC: Intel: soc-acpi-intel-tgl-match: add cs42l43 and cs56l56 support Date: Mon, 4 Dec 2023 13:53:07 +0000 Message-ID: <20231204135307.2169282-1-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: q4qY35oE08cDeYYWgDuMtvu6D8fvmtQT X-Proofpoint-GUID: q4qY35oE08cDeYYWgDuMtvu6D8fvmtQT X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bard Liao This is a test configuration for UpExtreme with Cirrus Logic CS35L56-EIGHT-C board. The codec layout is configured as: - Link3: CS42L43 Jack - Link0: 2x CS35L56 Speaker (amps 1 and 2) - Link1: 2x CS35L56 Speaker (amps 7 and 8) Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Signed-off-by: Richard Fitzgerald --- Changes since V1: - Changed ALSA prefixes for CS35L56 to 'AMPn' - Renumbered the CS35L56 prefixes to match the numbering of the OUTn speaker sockets on the EIGHT-C board --- .../intel/common/soc-acpi-intel-tgl-match.c | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c b/sound/soc/= intel/common/soc-acpi-intel-tgl-match.c index 5804926c8b56..e5f721ba5ed4 100644 --- a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c @@ -41,6 +41,20 @@ static const struct snd_soc_acpi_endpoint spk_r_endpoint= =3D { .group_id =3D 1, }; =20 +static const struct snd_soc_acpi_endpoint spk_2_endpoint =3D { + .num =3D 0, + .aggregated =3D 1, + .group_position =3D 2, + .group_id =3D 1, +}; + +static const struct snd_soc_acpi_endpoint spk_3_endpoint =3D { + .num =3D 0, + .aggregated =3D 1, + .group_position =3D 3, + .group_id =3D 1, +}; + static const struct snd_soc_acpi_endpoint rt712_endpoints[] =3D { { .num =3D 0, @@ -400,6 +414,64 @@ static const struct snd_soc_acpi_link_adr tgl_712_only= [] =3D { {} }; =20 +static const struct snd_soc_acpi_adr_device cs42l43_3_adr[] =3D { + { + .adr =3D 0x00033001FA424301ull, + .num_endpoints =3D 1, + .endpoints =3D &single_endpoint, + .name_prefix =3D "cs42l43" + } +}; + +static const struct snd_soc_acpi_adr_device cs35l56_0_adr[] =3D { + { + .adr =3D 0x00003301FA355601ull, + .num_endpoints =3D 1, + .endpoints =3D &spk_r_endpoint, + .name_prefix =3D "AMP1" + }, + { + .adr =3D 0x00003201FA355601ull, + .num_endpoints =3D 1, + .endpoints =3D &spk_3_endpoint, + .name_prefix =3D "AMP2" + } +}; + +static const struct snd_soc_acpi_adr_device cs35l56_1_adr[] =3D { + { + .adr =3D 0x00013701FA355601ull, + .num_endpoints =3D 1, + .endpoints =3D &spk_l_endpoint, + .name_prefix =3D "AMP8" + }, + { + .adr =3D 0x00013601FA355601ull, + .num_endpoints =3D 1, + .endpoints =3D &spk_2_endpoint, + .name_prefix =3D "AMP7" + } +}; + +static const struct snd_soc_acpi_link_adr tgl_cs42l43_cs35l56[] =3D { + { + .mask =3D BIT(3), + .num_adr =3D ARRAY_SIZE(cs42l43_3_adr), + .adr_d =3D cs42l43_3_adr, + }, + { + .mask =3D BIT(0), + .num_adr =3D ARRAY_SIZE(cs35l56_0_adr), + .adr_d =3D cs35l56_0_adr, + }, + { + .mask =3D BIT(1), + .num_adr =3D ARRAY_SIZE(cs35l56_1_adr), + .adr_d =3D cs35l56_1_adr, + }, + {} +}; + static const struct snd_soc_acpi_codecs tgl_max98373_amp =3D { .num_codecs =3D 1, .codecs =3D {"MX98373"} @@ -494,6 +566,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_ma= chines[] =3D { .drv_name =3D "sof_sdw", .sof_tplg_filename =3D "sof-tgl-rt715-rt711-rt1308-mono.tplg", }, + { + .link_mask =3D 0xB, + .links =3D tgl_cs42l43_cs35l56, + .drv_name =3D "sof_sdw", + .sof_tplg_filename =3D "sof-tgl-cs42l43-l3-cs35l56-l01.tplg", + }, { .link_mask =3D 0xF, /* 4 active links required */ .links =3D tgl_3_in_1_default, --=20 2.30.2