Skip to content

Commit a5dfca5

Browse files
committed
ASoC: Intel: Add matches for Cirrus Logic CDB35L56
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: This series adds TGL and MTL matches for configurations using the Cirrus Logic CDB35L56-EIGHT-C board.
2 parents b0e4e20 + 6dcc8e7 commit a5dfca5

2 files changed

Lines changed: 407 additions & 0 deletions

File tree

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

Lines changed: 213 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,81 @@ static const struct snd_soc_acpi_endpoint cs35l56_3_fb_endpoints[] = {
501539
},
502540
};
503541

542+
static const struct snd_soc_acpi_endpoint cs35l56_4_fb_endpoints[] = {
543+
{ /* Speaker Playback Endpoint */
544+
.num = 0,
545+
.aggregated = 1,
546+
.group_position = 4,
547+
.group_id = 1,
548+
},
549+
{ /* Feedback Capture Endpoint */
550+
.num = 1,
551+
.aggregated = 1,
552+
.group_position = 4,
553+
.group_id = 2,
554+
},
555+
};
556+
557+
static const struct snd_soc_acpi_endpoint cs35l56_5_fb_endpoints[] = {
558+
{ /* Speaker Playback Endpoint */
559+
.num = 0,
560+
.aggregated = 1,
561+
.group_position = 5,
562+
.group_id = 1,
563+
},
564+
{ /* Feedback Capture Endpoint */
565+
.num = 1,
566+
.aggregated = 1,
567+
.group_position = 5,
568+
.group_id = 2,
569+
},
570+
};
571+
572+
static const struct snd_soc_acpi_endpoint cs35l56_6_fb_endpoints[] = {
573+
{ /* Speaker Playback Endpoint */
574+
.num = 0,
575+
.aggregated = 1,
576+
.group_position = 6,
577+
.group_id = 1,
578+
},
579+
{ /* Feedback Capture Endpoint */
580+
.num = 1,
581+
.aggregated = 1,
582+
.group_position = 6,
583+
.group_id = 2,
584+
},
585+
};
586+
587+
static const struct snd_soc_acpi_endpoint cs35l56_7_fb_endpoints[] = {
588+
{ /* Speaker Playback Endpoint */
589+
.num = 0,
590+
.aggregated = 1,
591+
.group_position = 7,
592+
.group_id = 1,
593+
},
594+
{ /* Feedback Capture Endpoint */
595+
.num = 1,
596+
.aggregated = 1,
597+
.group_position = 7,
598+
.group_id = 2,
599+
},
600+
};
601+
602+
static const struct snd_soc_acpi_adr_device cs35l56_0_adr[] = {
603+
{
604+
.adr = 0x00003301FA355601ull,
605+
.num_endpoints = 1,
606+
.endpoints = &spk_l_endpoint,
607+
.name_prefix = "AMP1"
608+
},
609+
{
610+
.adr = 0x00003201FA355601ull,
611+
.num_endpoints = 1,
612+
.endpoints = &spk_2_endpoint,
613+
.name_prefix = "AMP2"
614+
}
615+
};
616+
504617
static const struct snd_soc_acpi_adr_device cs35l56_1_adr[] = {
505618
{
506619
.adr = 0x00013701FA355601ull,
@@ -531,6 +644,60 @@ static const struct snd_soc_acpi_adr_device cs35l56_2_adr[] = {
531644
}
532645
};
533646

647+
static const struct snd_soc_acpi_adr_device cs35l56_0_fb_adr[] = {
648+
{
649+
.adr = 0x00003301FA355601ull,
650+
.num_endpoints = ARRAY_SIZE(cs35l56_l_fb_endpoints),
651+
.endpoints = cs35l56_l_fb_endpoints,
652+
.name_prefix = "AMP1"
653+
},
654+
{
655+
.adr = 0x00003201FA355601ull,
656+
.num_endpoints = ARRAY_SIZE(cs35l56_2_fb_endpoints),
657+
.endpoints = cs35l56_2_fb_endpoints,
658+
.name_prefix = "AMP2"
659+
},
660+
{
661+
.adr = 0x00003101FA355601ull,
662+
.num_endpoints = ARRAY_SIZE(cs35l56_4_fb_endpoints),
663+
.endpoints = cs35l56_4_fb_endpoints,
664+
.name_prefix = "AMP3"
665+
},
666+
{
667+
.adr = 0x00003001FA355601ull,
668+
.num_endpoints = ARRAY_SIZE(cs35l56_6_fb_endpoints),
669+
.endpoints = cs35l56_6_fb_endpoints,
670+
.name_prefix = "AMP4"
671+
},
672+
};
673+
674+
static const struct snd_soc_acpi_adr_device cs35l56_1_fb_adr[] = {
675+
{
676+
.adr = 0x00013701FA355601ull,
677+
.num_endpoints = ARRAY_SIZE(cs35l56_r_fb_endpoints),
678+
.endpoints = cs35l56_r_fb_endpoints,
679+
.name_prefix = "AMP8"
680+
},
681+
{
682+
.adr = 0x00013601FA355601ull,
683+
.num_endpoints = ARRAY_SIZE(cs35l56_3_fb_endpoints),
684+
.endpoints = cs35l56_3_fb_endpoints,
685+
.name_prefix = "AMP7"
686+
},
687+
{
688+
.adr = 0x00013501FA355601ull,
689+
.num_endpoints = ARRAY_SIZE(cs35l56_5_fb_endpoints),
690+
.endpoints = cs35l56_5_fb_endpoints,
691+
.name_prefix = "AMP6"
692+
},
693+
{
694+
.adr = 0x00013401FA355601ull,
695+
.num_endpoints = ARRAY_SIZE(cs35l56_7_fb_endpoints),
696+
.endpoints = cs35l56_7_fb_endpoints,
697+
.name_prefix = "AMP5"
698+
},
699+
};
700+
534701
static const struct snd_soc_acpi_adr_device cs35l56_2_r_adr[] = {
535702
{
536703
.adr = 0x00023201FA355601ull,
@@ -825,6 +992,40 @@ static const struct snd_soc_acpi_link_adr cs42l43_link0_cs35l56_link2_link3[] =
825992
{}
826993
};
827994

995+
static const struct snd_soc_acpi_link_adr cs42l43_link3_cs35l56_x4_link0_link1_spkagg[] = {
996+
/* Expected order: jack -> amp */
997+
{
998+
.mask = BIT(3),
999+
.num_adr = ARRAY_SIZE(cs42l43_l3_4amp_spkagg_adr),
1000+
.adr_d = cs42l43_l3_4amp_spkagg_adr,
1001+
},
1002+
{
1003+
.mask = BIT(1),
1004+
.num_adr = 2,
1005+
.adr_d = cs35l56_1_adr,
1006+
},
1007+
{
1008+
.mask = BIT(0),
1009+
.num_adr = 2,
1010+
.adr_d = cs35l56_0_adr,
1011+
},
1012+
{}
1013+
};
1014+
1015+
static const struct snd_soc_acpi_link_adr mtl_cs35l56_x8_link0_link1_fb[] = {
1016+
{
1017+
.mask = BIT(1),
1018+
.num_adr = ARRAY_SIZE(cs35l56_1_fb_adr),
1019+
.adr_d = cs35l56_1_fb_adr,
1020+
},
1021+
{
1022+
.mask = BIT(0),
1023+
.num_adr = ARRAY_SIZE(cs35l56_0_fb_adr),
1024+
.adr_d = cs35l56_0_fb_adr,
1025+
},
1026+
{}
1027+
};
1028+
8281029
/* this table is used when there is no I2S codec present */
8291030
struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
8301031
/* mockup tests need to be first */
@@ -901,12 +1102,24 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
9011102
.drv_name = "sof_sdw",
9021103
.sof_tplg_filename = "sof-mtl-cs42l43-l0-cs35l56-l23.tplg",
9031104
},
1105+
{
1106+
.link_mask = BIT(0) | BIT(1) | BIT(3),
1107+
.links = cs42l43_link3_cs35l56_x4_link0_link1_spkagg,
1108+
.drv_name = "sof_sdw",
1109+
.sof_tplg_filename = "sof-mtl-cs42l43-l3-cs35l56-l01-spkagg.tplg",
1110+
},
9041111
{
9051112
.link_mask = GENMASK(2, 0),
9061113
.links = mtl_cs42l43_cs35l56,
9071114
.drv_name = "sof_sdw",
9081115
.sof_tplg_filename = "sof-mtl-cs42l43-l0-cs35l56-l12.tplg",
9091116
},
1117+
{
1118+
.link_mask = BIT(0) | BIT(1),
1119+
.links = mtl_cs35l56_x8_link0_link1_fb,
1120+
.drv_name = "sof_sdw",
1121+
.sof_tplg_filename = "sof-mtl-cs35l56-l01-fb8.tplg"
1122+
},
9101123
{
9111124
.link_mask = BIT(0),
9121125
.links = mtl_cs42l43_l0,

0 commit comments

Comments
 (0)