ASoC: Intel: soc-acpi-intel-lnl-match: add cs42l43 only support
authorBard Liao <yung-chuan.liao@linux.intel.com>
Thu, 9 May 2024 16:34:06 +0000 (11:34 -0500)
committerMark Brown <broonie@kernel.org>
Fri, 10 May 2024 06:11:40 +0000 (07:11 +0100)
cs42l43 is on link 0. No amp in this configuration, will use cs42l43
speaker or bridge.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240509163418.67746-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/common/soc-acpi-intel-lnl-match.c

index 0c08859c4773c6c83653588e6c9b412a8a8805e5..e6ffcd5be6c5af5bf31291258ef195e5d71aa7c0 100644 (file)
@@ -76,6 +76,42 @@ static const struct snd_soc_acpi_endpoint rt722_endpoints[] = {
        },
 };
 
+static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = {
+       { /* Jack Playback Endpoint */
+               .num = 0,
+               .aggregated = 0,
+               .group_position = 0,
+               .group_id = 0,
+       },
+       { /* DMIC Capture Endpoint */
+               .num = 1,
+               .aggregated = 0,
+               .group_position = 0,
+               .group_id = 0,
+       },
+       { /* Jack Capture Endpoint */
+               .num = 2,
+               .aggregated = 0,
+               .group_position = 0,
+               .group_id = 0,
+       },
+       { /* Speaker Playback Endpoint */
+               .num = 3,
+               .aggregated = 0,
+               .group_position = 0,
+               .group_id = 0,
+       },
+};
+
+static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = {
+       {
+               .adr = 0x00003001FA424301ull,
+               .num_endpoints = ARRAY_SIZE(cs42l43_endpoints),
+               .endpoints = cs42l43_endpoints,
+               .name_prefix = "cs42l43"
+       }
+};
+
 static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
        {
                .adr = 0x000030025D071101ull,
@@ -166,6 +202,14 @@ static const struct snd_soc_acpi_adr_device rt714_1_adr[] = {
        }
 };
 
+static const struct snd_soc_acpi_link_adr lnl_cs42l43_l0[] = {
+       {
+               .mask = BIT(0),
+               .num_adr = ARRAY_SIZE(cs42l43_0_adr),
+               .adr_d = cs42l43_0_adr,
+       },
+};
+
 static const struct snd_soc_acpi_link_adr lnl_rvp[] = {
        {
                .mask = BIT(0),
@@ -268,6 +312,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[] = {
                .drv_name = "sof_sdw",
                .sof_tplg_filename = "sof-lnl-rt711-l0-rt1316-l23-rt714-l1.tplg",
        },
+       {
+               .link_mask = BIT(0),
+               .links = lnl_cs42l43_l0,
+               .drv_name = "sof_sdw",
+               .sof_tplg_filename = "sof-lnl-cs42l43-l0.tplg",
+       },
        {
                .link_mask = BIT(0),
                .links = lnl_rvp,