Skip to contentSkip to conversation

ASoC: Intel: mtl-match: Add cs42l43_l0 cs35l56_l23 for MTL

PATCH Superseded Maciej Strozek 2 participants 3 messages Jan 22, 2024 – Jan 23, 2024

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ASoC: Intel: mtl-match: Add cs42l43_l0 cs35l56_l23 for MTL

---
v1 -> v2: swapped AMP3 and AMP4 prefixes

 .../intel/common/soc-acpi-intel-mtl-match.c   | 57 +++++++++++++++++++
 1 file changed, 57 insertions(+)
sound/soc/intel/common/soc-acpi-intel-mtl-match.c +57 -0
index feb12c6c85d1..23eaf47b3f24 100644
@@ -377,6 +377,37 @@ static const struct snd_soc_acpi_adr_device cs35l56_2_adr[] = {
 	}
 };
 
+static const struct snd_soc_acpi_adr_device cs35l56_2_r_adr[] = {
+	{
+		.adr = 0x00023201FA355601ull,
+		.num_endpoints = 1,
+		.endpoints = &spk_r_endpoint,
+		.name_prefix = "AMP3"
+	},
+	{
+		.adr = 0x00023301FA355601ull,
+		.num_endpoints = 1,
+		.endpoints = &spk_3_endpoint,
+		.name_prefix = "AMP4"
+	}
+
+};
+
+static const struct snd_soc_acpi_adr_device cs35l56_3_l_adr[] = {
+	{
+		.adr = 0x00033001fa355601ull,
+		.num_endpoints = 1,
+		.endpoints = &spk_l_endpoint,
+		.name_prefix = "AMP1"
+	},
+	{
+		.adr = 0x00033101fa355601ull,
+		.num_endpoints = 1,
+		.endpoints = &spk_2_endpoint,
+		.name_prefix = "AMP2"
+	}
+};
+
 static const struct snd_soc_acpi_link_adr rt5682_link2_max98373_link0[] = {
 	/* Expected order: jack -> amp */
 	{
@@ -554,6 +585,26 @@ static const struct snd_soc_acpi_link_adr mtl_cs42l43_cs35l56[] = {
 	{}
 };
 
+static const struct snd_soc_acpi_link_adr cs42l43_link0_cs35l56_link2_link3[] = {
+	/* Expected order: jack -> amp */
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(cs42l43_0_adr),
+		.adr_d = cs42l43_0_adr,
+	},
+	{
+		.mask = BIT(2),
+		.num_adr = ARRAY_SIZE(cs35l56_2_r_adr),
+		.adr_d = cs35l56_2_r_adr,
+	},
+	{
+		.mask = BIT(3),
+		.num_adr = ARRAY_SIZE(cs35l56_3_l_adr),
+		.adr_d = cs35l56_3_l_adr,
+	},
+	{}
+};
+
 /* this table is used when there is no I2S codec present */
 struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
 	/* mockup tests need to be first */
@@ -599,6 +650,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
 		.drv_name = "sof_sdw",
 		.sof_tplg_filename = "sof-mtl-rt1318-l12-rt714-l0.tplg"
 	},
+	{
+		.link_mask = BIT(0) | BIT(2) | BIT(3),
+		.links = cs42l43_link0_cs35l56_link2_link3,
+		.drv_name = "sof_sdw",
+		.sof_tplg_filename = "sof-mtl-cs42l43-l0-cs35l56-l23.tplg",
+	},
 	{
 		.link_mask = GENMASK(2, 0),
 		.links = mtl_cs42l43_cs35l56,

--
2.34.1

#1 lore raw

On 1/22/24 16:15, Maciej Strozek wrote:

It wouldn't hurt to add a brief commit message describing what the hardware layout is, specifically how the mics are handled.

It's also best to submit the corresponding machine driver updates at the same time to check for consistency.

sound/soc/intel/common/soc-acpi-intel-mtl-match.c struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = { · line 657

Quoted 6 lines
sound/soc/intel/common/soc-acpi-intel-mtl-match.c +5 -0
 	},
+	{
+		.link_mask = BIT(0) | BIT(2) | BIT(3),
+		.links = cs42l43_link0_cs35l56_link2_link3,
+		.drv_name = "sof_sdw",
+		.sof_tplg_filename = "sof-mtl-cs42l43-l0-cs35l56-l23.tplg",

was this topology submitted to the SOF tree? I don't see it, usually we review topology/acpi/machine stuff together to avoid disconnects.

Quoted 7 lines
sound/soc/intel/common/soc-acpi-intel-mtl-match.c +1 -1
+	},
 	{
 		.link_mask = GENMASK(2, 0),
 		.links = mtl_cs42l43_cs35l56,
--

2.34.1

#2 lore raw

W dniu wto, 23.01.2024 o godzinie 09∶34 +0100, użytkownik Pierre-Louis

Quoted 11 lines · Bossart

On 1/22/24 16:15, Maciej Strozek wrote:

It wouldn't hurt to add a brief commit message describing what the hardware layout is, specifically how the mics are handled.

It's also best to submit the corresponding machine driver updates at the
same time to check for consistency.

Will add the message in the next version

Quoted 9 lines
Quoted 8 lines

        },
+       {
+               .link_mask = BIT(0) | BIT(2) | BIT(3), +               .links = cs42l43_link0_cs35l56_link2_link3, +               .drv_name = "sof_sdw",
+               .sof_tplg_filename = "sof-mtl-cs42l43-l0-cs35l56- l23.tplg",

Quoted 4 lines

was this topology submitted to the SOF tree? I don't see it, usually we
review topology/acpi/machine stuff together to avoid disconnects.

Not yet, sorry, I'm aiming to send the topology to the SOF repo today. Will include the link here in the next version.

Quoted 7 lines
Quoted 7 lines

+       },
        {
                .link_mask = GENMASK(2, 0),
                .links = mtl_cs42l43_cs35l56,
--
2.34.1

Signature · 2 lines
Regards,
Maciej