[PATCH 10/10] ASoC: Intel: soc-acpi: Add CS35L56 Soundwire to TGL

Richard Fitzgerald
2023-02-17T16:15:00Z

This adds match entries for one or four CS35L56 on SDW0.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
.../intel/common/soc-acpi-intel-tgl-match.c | 57 +++++++++++++++++++
1 file changed, 57 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 ef19150e7b2e..dae76c96d9fe 100644
--- a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c
@@ -414,6 +414,51 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_machines);

+static const struct snd_soc_acpi_adr_device cs35l56_sdw0_adr[] = {
+ {
+ .adr = 0x00003001fa355601,
+ .num_endpoints = 1,
+ .endpoints = &single_endpoint,
+ .name_prefix = "AMP1"
+ },
+ {
+ .adr = 0x00003101fa355601,
+ .num_endpoints = 1,
+ .endpoints = &single_endpoint,
+ .name_prefix = "AMP2"
+ },
+ {
+ .adr = 0x00003201fa355601,
+ .num_endpoints = 1,
+ .endpoints = &single_endpoint,
+ .name_prefix = "AMP3"
+ },
+ {
+ .adr = 0x00003301fa355601,
+ .num_endpoints = 1,
+ .endpoints = &single_endpoint,
+ .name_prefix = "AMP4"
+ },
+};
+
+static const struct snd_soc_acpi_link_adr up_extreme_cs35l56_sdw0_one[] = {
+ {
+ .mask = BIT(0),
+ .num_adr = 1,
+ .adr_d = cs35l56_sdw0_adr,
+ },
+ {}
+};
+
+static const struct snd_soc_acpi_link_adr up_extreme_cs35l56_sdw0_four[] = {
+ {
+ .mask = BIT(0),
+ .num_adr = 4,
+ .adr_d = cs35l56_sdw0_adr,
+ },
+ {}
+};
+
/* this table is used when there is no I2S codec present */
struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[] = {
/* mockup tests need to be first */
@@ -501,6 +546,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[] = {
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-tgl-rt711.tplg",
},
+ {
+ .link_mask = BIT(0),
+ .links = up_extreme_cs35l56_sdw0_four,
+ .drv_name = "sof_sdw",
+ .sof_tplg_filename = "sof-tgl-cs35l56-sdw0.tplg"
+ },
+ {
+ .link_mask = BIT(0),
+ .links = up_extreme_cs35l56_sdw0_one,
+ .drv_name = "sof_sdw",
+ .sof_tplg_filename = "sof-tgl-cs35l56-sdw0.tplg"
+ },
{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_sdw_machines);
--
2.30.2