1 // SPDX-License-Identifier: GPL-2.0-only
3 * soc-apci-intel-adl-match.c - tables and support for ADL ACPI enumeration.
5 * Copyright (c) 2020, Intel Corporation.
8 #include <sound/soc-acpi.h>
9 #include <sound/soc-acpi-intel-match.h>
11 static const struct snd_soc_acpi_codecs essx_83x6 = {
13 .codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
16 static const struct snd_soc_acpi_endpoint single_endpoint = {
23 static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
30 static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
37 static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
39 .adr = 0x000020025D071100ull,
41 .endpoints = &single_endpoint,
42 .name_prefix = "rt711"
46 static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {
48 .adr = 0x000120025D130800ull,
50 .endpoints = &spk_l_endpoint,
51 .name_prefix = "rt1308-1"
55 static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {
57 .adr = 0x000220025D130800ull,
59 .endpoints = &spk_r_endpoint,
60 .name_prefix = "rt1308-2"
64 static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {
66 .adr = 0x000320025D071500ull,
68 .endpoints = &single_endpoint,
69 .name_prefix = "rt715"
73 static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
75 .adr = 0x000030025D071101ull,
77 .endpoints = &single_endpoint,
78 .name_prefix = "rt711"
82 static const struct snd_soc_acpi_adr_device rt711_sdca_2_adr[] = {
84 .adr = 0x000230025D071101ull,
86 .endpoints = &single_endpoint,
87 .name_prefix = "rt711"
91 static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = {
93 .adr = 0x000131025D131601ull, /* unique ID is set for some reason */
95 .endpoints = &spk_l_endpoint,
96 .name_prefix = "rt1316-1"
100 static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = {
102 .adr = 0x000230025D131601ull,
104 .endpoints = &spk_r_endpoint,
105 .name_prefix = "rt1316-2"
109 static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = {
111 .adr = 0x000330025D131601ull,
113 .endpoints = &spk_r_endpoint,
114 .name_prefix = "rt1316-2"
118 static const struct snd_soc_acpi_adr_device rt1316_0_group2_adr[] = {
120 .adr = 0x000031025D131601ull,
122 .endpoints = &spk_l_endpoint,
123 .name_prefix = "rt1316-1"
127 static const struct snd_soc_acpi_adr_device rt1316_1_group2_adr[] = {
129 .adr = 0x000130025D131601ull,
131 .endpoints = &spk_r_endpoint,
132 .name_prefix = "rt1316-2"
136 static const struct snd_soc_acpi_adr_device rt1316_1_single_adr[] = {
138 .adr = 0x000130025D131601ull,
140 .endpoints = &single_endpoint,
141 .name_prefix = "rt1316-1"
145 static const struct snd_soc_acpi_adr_device rt1316_2_single_adr[] = {
147 .adr = 0x000230025D131601ull,
149 .endpoints = &single_endpoint,
150 .name_prefix = "rt1316-1"
154 static const struct snd_soc_acpi_adr_device rt1316_3_single_adr[] = {
156 .adr = 0x000330025D131601ull,
158 .endpoints = &single_endpoint,
159 .name_prefix = "rt1316-1"
163 static const struct snd_soc_acpi_adr_device rt714_0_adr[] = {
165 .adr = 0x000030025D071401ull,
167 .endpoints = &single_endpoint,
168 .name_prefix = "rt714"
172 static const struct snd_soc_acpi_adr_device rt714_2_adr[] = {
174 .adr = 0x000230025D071401ull,
176 .endpoints = &single_endpoint,
177 .name_prefix = "rt714"
181 static const struct snd_soc_acpi_adr_device rt714_3_adr[] = {
183 .adr = 0x000330025D071401ull,
185 .endpoints = &single_endpoint,
186 .name_prefix = "rt714"
190 static const struct snd_soc_acpi_link_adr adl_default[] = {
193 .num_adr = ARRAY_SIZE(rt711_0_adr),
194 .adr_d = rt711_0_adr,
198 .num_adr = ARRAY_SIZE(rt1308_1_group1_adr),
199 .adr_d = rt1308_1_group1_adr,
203 .num_adr = ARRAY_SIZE(rt1308_2_group1_adr),
204 .adr_d = rt1308_2_group1_adr,
208 .num_adr = ARRAY_SIZE(rt715_3_adr),
209 .adr_d = rt715_3_adr,
214 static const struct snd_soc_acpi_link_adr adl_sdca_default[] = {
217 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
218 .adr_d = rt711_sdca_0_adr,
222 .num_adr = ARRAY_SIZE(rt1316_1_group1_adr),
223 .adr_d = rt1316_1_group1_adr,
227 .num_adr = ARRAY_SIZE(rt1316_2_group1_adr),
228 .adr_d = rt1316_2_group1_adr,
232 .num_adr = ARRAY_SIZE(rt714_3_adr),
233 .adr_d = rt714_3_adr,
238 static const struct snd_soc_acpi_link_adr adl_sdca_3_in_1[] = {
241 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
242 .adr_d = rt711_sdca_0_adr,
246 .num_adr = ARRAY_SIZE(rt1316_1_group1_adr),
247 .adr_d = rt1316_1_group1_adr,
251 .num_adr = ARRAY_SIZE(rt714_2_adr),
252 .adr_d = rt714_2_adr,
256 .num_adr = ARRAY_SIZE(rt1316_3_group1_adr),
257 .adr_d = rt1316_3_group1_adr,
262 static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link2_rt1316_link01_rt714_link3[] = {
265 .num_adr = ARRAY_SIZE(rt711_sdca_2_adr),
266 .adr_d = rt711_sdca_2_adr,
270 .num_adr = ARRAY_SIZE(rt1316_0_group2_adr),
271 .adr_d = rt1316_0_group2_adr,
275 .num_adr = ARRAY_SIZE(rt1316_1_group2_adr),
276 .adr_d = rt1316_1_group2_adr,
280 .num_adr = ARRAY_SIZE(rt714_3_adr),
281 .adr_d = rt714_3_adr,
286 static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link2_rt1316_link01[] = {
289 .num_adr = ARRAY_SIZE(rt711_sdca_2_adr),
290 .adr_d = rt711_sdca_2_adr,
294 .num_adr = ARRAY_SIZE(rt1316_0_group2_adr),
295 .adr_d = rt1316_0_group2_adr,
299 .num_adr = ARRAY_SIZE(rt1316_1_group2_adr),
300 .adr_d = rt1316_1_group2_adr,
305 static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link12_rt714_link0[] = {
308 .num_adr = ARRAY_SIZE(rt1316_1_group1_adr),
309 .adr_d = rt1316_1_group1_adr,
313 .num_adr = ARRAY_SIZE(rt1316_2_group1_adr),
314 .adr_d = rt1316_2_group1_adr,
318 .num_adr = ARRAY_SIZE(rt714_0_adr),
319 .adr_d = rt714_0_adr,
324 static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link1_rt714_link0[] = {
327 .num_adr = ARRAY_SIZE(rt1316_1_single_adr),
328 .adr_d = rt1316_1_single_adr,
332 .num_adr = ARRAY_SIZE(rt714_0_adr),
333 .adr_d = rt714_0_adr,
338 static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link2_rt714_link3[] = {
341 .num_adr = ARRAY_SIZE(rt1316_2_single_adr),
342 .adr_d = rt1316_2_single_adr,
346 .num_adr = ARRAY_SIZE(rt714_3_adr),
347 .adr_d = rt714_3_adr,
352 static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link2_rt714_link0[] = {
355 .num_adr = ARRAY_SIZE(rt1316_2_single_adr),
356 .adr_d = rt1316_2_single_adr,
360 .num_adr = ARRAY_SIZE(rt714_0_adr),
361 .adr_d = rt714_0_adr,
366 static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link0_rt1316_link3[] = {
369 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
370 .adr_d = rt711_sdca_0_adr,
374 .num_adr = ARRAY_SIZE(rt1316_3_single_adr),
375 .adr_d = rt1316_3_single_adr,
380 static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link0_rt1316_link2[] = {
383 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
384 .adr_d = rt711_sdca_0_adr,
388 .num_adr = ARRAY_SIZE(rt1316_2_single_adr),
389 .adr_d = rt1316_2_single_adr,
394 static const struct snd_soc_acpi_adr_device mx8373_2_adr[] = {
396 .adr = 0x000223019F837300ull,
398 .endpoints = &spk_l_endpoint,
399 .name_prefix = "Left"
402 .adr = 0x000227019F837300ull,
404 .endpoints = &spk_r_endpoint,
405 .name_prefix = "Right"
409 static const struct snd_soc_acpi_adr_device rt5682_0_adr[] = {
411 .adr = 0x000021025D568200ull,
413 .endpoints = &single_endpoint,
414 .name_prefix = "rt5682"
418 static const struct snd_soc_acpi_link_adr adl_rvp[] = {
421 .num_adr = ARRAY_SIZE(rt711_0_adr),
422 .adr_d = rt711_0_adr,
427 static const struct snd_soc_acpi_link_adr adlps_rvp[] = {
430 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
431 .adr_d = rt711_sdca_0_adr,
436 static const struct snd_soc_acpi_link_adr adl_chromebook_base[] = {
439 .num_adr = ARRAY_SIZE(rt5682_0_adr),
440 .adr_d = rt5682_0_adr,
444 .num_adr = ARRAY_SIZE(mx8373_2_adr),
445 .adr_d = mx8373_2_adr,
450 static const struct snd_soc_acpi_codecs adl_max98373_amp = {
452 .codecs = {"MX98373"}
455 static const struct snd_soc_acpi_codecs adl_max98357a_amp = {
457 .codecs = {"MX98357A"}
460 static const struct snd_soc_acpi_codecs adl_max98360a_amp = {
462 .codecs = {"MX98360A"}
465 static const struct snd_soc_acpi_codecs adl_rt5682_rt5682s_hp = {
467 .codecs = {"10EC5682", "RTL5682"},
470 static const struct snd_soc_acpi_codecs adl_rt1015p_amp = {
472 .codecs = {"RTL1015"}
475 static const struct snd_soc_acpi_codecs adl_rt1019p_amp = {
477 .codecs = {"RTL1019"}
480 static const struct snd_soc_acpi_codecs adl_max98390_amp = {
482 .codecs = {"MX98390"}
485 static const struct snd_soc_acpi_codecs adl_lt6911_hdmi = {
487 .codecs = {"INTC10B0"}
490 static const struct snd_soc_acpi_codecs adl_nau8318_amp = {
492 .codecs = {"NVTN2012"}
495 struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
497 .comp_ids = &adl_rt5682_rt5682s_hp,
498 .drv_name = "adl_mx98373_rt5682",
499 .machine_quirk = snd_soc_acpi_codec_list,
500 .quirk_data = &adl_max98373_amp,
501 .sof_tplg_filename = "sof-adl-max98373-rt5682.tplg",
504 .comp_ids = &adl_rt5682_rt5682s_hp,
505 .drv_name = "adl_mx98357_rt5682",
506 .machine_quirk = snd_soc_acpi_codec_list,
507 .quirk_data = &adl_max98357a_amp,
508 .sof_tplg_filename = "sof-adl-max98357a-rt5682.tplg",
511 .comp_ids = &adl_rt5682_rt5682s_hp,
512 .drv_name = "adl_mx98360_rt5682",
513 .machine_quirk = snd_soc_acpi_codec_list,
514 .quirk_data = &adl_max98360a_amp,
515 .sof_tplg_filename = "sof-adl-max98360a-rt5682.tplg",
519 .drv_name = "adl_rt1019p_8825",
520 .machine_quirk = snd_soc_acpi_codec_list,
521 .quirk_data = &adl_rt1019p_amp,
522 .sof_tplg_filename = "sof-adl-rt1019-nau8825.tplg",
526 .drv_name = "adl_max98373_8825",
527 .machine_quirk = snd_soc_acpi_codec_list,
528 .quirk_data = &adl_max98373_amp,
529 .sof_tplg_filename = "sof-adl-max98373-nau8825.tplg",
533 .drv_name = "adl_mx98360a_8825",
534 .machine_quirk = snd_soc_acpi_codec_list,
535 .quirk_data = &adl_max98360a_amp,
536 .sof_tplg_filename = "sof-adl-max98360a-nau8825.tplg",
539 .comp_ids = &adl_rt5682_rt5682s_hp,
540 .drv_name = "adl_rt1019_rt5682",
541 .machine_quirk = snd_soc_acpi_codec_list,
542 .quirk_data = &adl_rt1019p_amp,
543 .sof_tplg_filename = "sof-adl-rt1019-rt5682.tplg",
547 .drv_name = "adl_rt1015p_8825",
548 .machine_quirk = snd_soc_acpi_codec_list,
549 .quirk_data = &adl_rt1015p_amp,
550 .sof_tplg_filename = "sof-adl-rt1015-nau8825.tplg",
554 .drv_name = "adl_nau8318_8825",
555 .machine_quirk = snd_soc_acpi_codec_list,
556 .quirk_data = &adl_nau8318_amp,
557 .sof_tplg_filename = "sof-adl-nau8318-nau8825.tplg",
561 .drv_name = "sof_nau8825",
562 .sof_tplg_filename = "sof-adl-nau8825.tplg",
565 .comp_ids = &adl_rt5682_rt5682s_hp,
566 .drv_name = "adl_max98390_rt5682",
567 .machine_quirk = snd_soc_acpi_codec_list,
568 .quirk_data = &adl_max98390_amp,
569 .sof_tplg_filename = "sof-adl-max98390-rt5682.tplg",
572 .comp_ids = &adl_rt5682_rt5682s_hp,
573 .drv_name = "adl_rt5682_c1_h02",
574 .machine_quirk = snd_soc_acpi_codec_list,
575 .quirk_data = &adl_lt6911_hdmi,
576 .sof_tplg_filename = "sof-adl-rt5682-ssp1-hdmi-ssp02.tplg",
579 .comp_ids = &adl_rt5682_rt5682s_hp,
580 .drv_name = "adl_rt5682",
581 .sof_tplg_filename = "sof-adl-rt5682.tplg",
585 .drv_name = "adl_mx98360a_cs4242",
586 .machine_quirk = snd_soc_acpi_codec_list,
587 .quirk_data = &adl_max98360a_amp,
588 .sof_tplg_filename = "sof-adl-max98360a-cs42l42.tplg",
591 .comp_ids = &essx_83x6,
592 .drv_name = "adl_es83x6_c1_h02",
593 .machine_quirk = snd_soc_acpi_codec_list,
594 .quirk_data = &adl_lt6911_hdmi,
595 .sof_tplg_filename = "sof-adl-es83x6-ssp1-hdmi-ssp02.tplg",
598 .comp_ids = &essx_83x6,
599 .drv_name = "sof-essx8336",
600 .sof_tplg_filename = "sof-adl-es8336", /* the tplg suffix is added at run time */
601 .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
602 SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
603 SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
605 /* place amp-only boards in the end of table */
608 .drv_name = "adl_cs35l41",
609 .sof_tplg_filename = "sof-adl-cs35l41.tplg",
613 .drv_name = "adl_lt6911_hdmi_ssp",
614 .sof_tplg_filename = "sof-adl-nocodec-hdmi-ssp02.tplg"
618 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_machines);
620 /* this table is used when there is no I2S codec present */
621 struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = {
623 .link_mask = 0xF, /* 4 active links required */
624 .links = adl_default,
625 .drv_name = "sof_sdw",
626 .sof_tplg_filename = "sof-adl-rt711-l0-rt1308-l12-rt715-l3.tplg",
629 .link_mask = 0xF, /* 4 active links required */
630 .links = adl_sdca_default,
631 .drv_name = "sof_sdw",
632 .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l12-rt714-l3.tplg",
635 .link_mask = 0xF, /* 4 active links required */
636 .links = adl_sdca_3_in_1,
637 .drv_name = "sof_sdw",
638 .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l13-rt714-l2.tplg",
641 .link_mask = 0xF, /* 4 active links required */
642 .links = adl_sdw_rt711_link2_rt1316_link01_rt714_link3,
643 .drv_name = "sof_sdw",
644 .sof_tplg_filename = "sof-adl-rt711-l2-rt1316-l01-rt714-l3.tplg",
647 .link_mask = 0x7, /* rt1316 on link0 and link1 & rt711 on link2*/
648 .links = adl_sdw_rt711_link2_rt1316_link01,
649 .drv_name = "sof_sdw",
650 .sof_tplg_filename = "sof-adl-rt711-l2-rt1316-l01.tplg",
653 .link_mask = 0xC, /* rt1316 on link2 & rt714 on link3 */
654 .links = adl_sdw_rt1316_link2_rt714_link3,
655 .drv_name = "sof_sdw",
656 .sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l3.tplg",
659 .link_mask = 0x3, /* rt1316 on link1 & rt714 on link0 */
660 .links = adl_sdw_rt1316_link1_rt714_link0,
661 .drv_name = "sof_sdw",
662 .sof_tplg_filename = "sof-adl-rt1316-l1-mono-rt714-l0.tplg",
665 .link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */
666 .links = adl_sdw_rt1316_link12_rt714_link0,
667 .drv_name = "sof_sdw",
668 .sof_tplg_filename = "sof-adl-rt1316-l12-rt714-l0.tplg",
671 .link_mask = 0x5, /* 2 active links required */
672 .links = adl_sdw_rt1316_link2_rt714_link0,
673 .drv_name = "sof_sdw",
674 .sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l0.tplg",
677 .link_mask = 0x9, /* 2 active links required */
678 .links = adl_sdw_rt711_link0_rt1316_link3,
679 .drv_name = "sof_sdw",
680 .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l3.tplg",
683 .link_mask = 0x5, /* 2 active links required */
684 .links = adl_sdw_rt711_link0_rt1316_link2,
685 .drv_name = "sof_sdw",
686 .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l2.tplg",
689 .link_mask = 0x1, /* link0 required */
691 .drv_name = "sof_sdw",
692 .sof_tplg_filename = "sof-adl-rt711.tplg",
695 .link_mask = 0x1, /* link0 required */
697 .drv_name = "sof_sdw",
698 .sof_tplg_filename = "sof-adl-rt711.tplg",
701 .link_mask = 0x5, /* rt5682 on link0 & 2xmax98373 on link 2 */
702 .links = adl_chromebook_base,
703 .drv_name = "sof_sdw",
704 .sof_tplg_filename = "sof-adl-sdw-max98373-rt5682.tplg",
708 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_sdw_machines);