Skip to content

Commit bc7bd5c

Browse files
rfvirgilbroonie
authored andcommitted
ASoC: Intel: mtl-match: Add CDB35L56-EIGHT-C with aggregated speakers
This adds a match for the CDB35L56-EIGHT-C board with SmartCodec and SmartAmp speakers aggregated. The configuration is: SDW0: CS35L56 x2 (SmartAmp) using OUT1 and OUT2 SDW1: CS35L56 x2 (SmartAmp) using OUT7 and OUT8 SDW3: CS42L43 (SmartJack, SmartMic, SmartAmp) CS35L56 and CS42L43 Speaker playback is aggregated across all 3 buses. The device addresses and reset arrangements of the EIGHT-C board are quirky hence the use of non-contiguous outputs OUT1,2,7,8. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20241216032721.131227-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent bf4519f commit bc7bd5c

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

sound/soc/intel/common/soc-acpi-intel-mtl-match.c

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,44 @@ static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = {
441441
}
442442
};
443443

444+
/* CS42L43 - speaker DAI aggregated with 4 amps */
445+
static const struct snd_soc_acpi_endpoint cs42l43_4amp_spkagg_endpoints[] = {
446+
{ /* Jack Playback Endpoint */
447+
.num = 0,
448+
.aggregated = 0,
449+
.group_position = 0,
450+
.group_id = 0,
451+
},
452+
{ /* DMIC Capture Endpoint */
453+
.num = 1,
454+
.aggregated = 0,
455+
.group_position = 0,
456+
.group_id = 0,
457+
},
458+
{ /* Jack Capture Endpoint */
459+
.num = 2,
460+
.aggregated = 0,
461+
.group_position = 0,
462+
.group_id = 0,
463+
},
464+
{ /* Speaker Playback Endpoint */
465+
.num = 3,
466+
.aggregated = 1,
467+
.group_position = 4,
468+
.group_id = 1,
469+
},
470+
};
471+
472+
/* CS42L43 on link3 aggregated with 4 amps */
473+
static const struct snd_soc_acpi_adr_device cs42l43_l3_4amp_spkagg_adr[] = {
474+
{
475+
.adr = 0x00033001FA424301ull,
476+
.num_endpoints = ARRAY_SIZE(cs42l43_4amp_spkagg_endpoints),
477+
.endpoints = cs42l43_4amp_spkagg_endpoints,
478+
.name_prefix = "cs42l43"
479+
}
480+
};
481+
444482
static const struct snd_soc_acpi_endpoint cs35l56_l_fb_endpoints[] = {
445483
{ /* Speaker Playback Endpoint */
446484
.num = 0,
@@ -501,6 +539,21 @@ static const struct snd_soc_acpi_endpoint cs35l56_3_fb_endpoints[] = {
501539
},
502540
};
503541

542+
static const struct snd_soc_acpi_adr_device cs35l56_0_adr[] = {
543+
{
544+
.adr = 0x00003301FA355601ull,
545+
.num_endpoints = 1,
546+
.endpoints = &spk_l_endpoint,
547+
.name_prefix = "AMP1"
548+
},
549+
{
550+
.adr = 0x00003201FA355601ull,
551+
.num_endpoints = 1,
552+
.endpoints = &spk_2_endpoint,
553+
.name_prefix = "AMP2"
554+
}
555+
};
556+
504557
static const struct snd_soc_acpi_adr_device cs35l56_1_adr[] = {
505558
{
506559
.adr = 0x00013701FA355601ull,
@@ -825,6 +878,26 @@ static const struct snd_soc_acpi_link_adr cs42l43_link0_cs35l56_link2_link3[] =
825878
{}
826879
};
827880

881+
static const struct snd_soc_acpi_link_adr cs42l43_link3_cs35l56_x4_link0_link1_spkagg[] = {
882+
/* Expected order: jack -> amp */
883+
{
884+
.mask = BIT(3),
885+
.num_adr = ARRAY_SIZE(cs42l43_l3_4amp_spkagg_adr),
886+
.adr_d = cs42l43_l3_4amp_spkagg_adr,
887+
},
888+
{
889+
.mask = BIT(1),
890+
.num_adr = 2,
891+
.adr_d = cs35l56_1_adr,
892+
},
893+
{
894+
.mask = BIT(0),
895+
.num_adr = 2,
896+
.adr_d = cs35l56_0_adr,
897+
},
898+
{}
899+
};
900+
828901
/* this table is used when there is no I2S codec present */
829902
struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
830903
/* mockup tests need to be first */
@@ -901,6 +974,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
901974
.drv_name = "sof_sdw",
902975
.sof_tplg_filename = "sof-mtl-cs42l43-l0-cs35l56-l23.tplg",
903976
},
977+
{
978+
.link_mask = BIT(0) | BIT(1) | BIT(3),
979+
.links = cs42l43_link3_cs35l56_x4_link0_link1_spkagg,
980+
.drv_name = "sof_sdw",
981+
.sof_tplg_filename = "sof-mtl-cs42l43-l3-cs35l56-l01-spkagg.tplg",
982+
},
904983
{
905984
.link_mask = GENMASK(2, 0),
906985
.links = mtl_cs42l43_cs35l56,

0 commit comments

Comments
 (0)