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_2_single_adr[] = {
138 .adr = 0x000230025D131601ull,
140 .endpoints = &single_endpoint,
141 .name_prefix = "rt1316-1"
145 static const struct snd_soc_acpi_adr_device rt1316_3_single_adr[] = {
147 .adr = 0x000330025D131601ull,
149 .endpoints = &single_endpoint,
150 .name_prefix = "rt1316-1"
154 static const struct snd_soc_acpi_adr_device rt714_0_adr[] = {
156 .adr = 0x000030025D071401ull,
158 .endpoints = &single_endpoint,
159 .name_prefix = "rt714"
163 static const struct snd_soc_acpi_adr_device rt714_2_adr[] = {
165 .adr = 0x000230025D071401ull,
167 .endpoints = &single_endpoint,
168 .name_prefix = "rt714"
172 static const struct snd_soc_acpi_adr_device rt714_3_adr[] = {
174 .adr = 0x000330025D071401ull,
176 .endpoints = &single_endpoint,
177 .name_prefix = "rt714"
181 static const struct snd_soc_acpi_link_adr adl_default[] = {
184 .num_adr = ARRAY_SIZE(rt711_0_adr),
185 .adr_d = rt711_0_adr,
189 .num_adr = ARRAY_SIZE(rt1308_1_group1_adr),
190 .adr_d = rt1308_1_group1_adr,
194 .num_adr = ARRAY_SIZE(rt1308_2_group1_adr),
195 .adr_d = rt1308_2_group1_adr,
199 .num_adr = ARRAY_SIZE(rt715_3_adr),
200 .adr_d = rt715_3_adr,
205 static const struct snd_soc_acpi_link_adr adl_sdca_default[] = {
208 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
209 .adr_d = rt711_sdca_0_adr,
213 .num_adr = ARRAY_SIZE(rt1316_1_group1_adr),
214 .adr_d = rt1316_1_group1_adr,
218 .num_adr = ARRAY_SIZE(rt1316_2_group1_adr),
219 .adr_d = rt1316_2_group1_adr,
223 .num_adr = ARRAY_SIZE(rt714_3_adr),
224 .adr_d = rt714_3_adr,
229 static const struct snd_soc_acpi_link_adr adl_sdca_3_in_1[] = {
232 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
233 .adr_d = rt711_sdca_0_adr,
237 .num_adr = ARRAY_SIZE(rt1316_1_group1_adr),
238 .adr_d = rt1316_1_group1_adr,
242 .num_adr = ARRAY_SIZE(rt714_2_adr),
243 .adr_d = rt714_2_adr,
247 .num_adr = ARRAY_SIZE(rt1316_3_group1_adr),
248 .adr_d = rt1316_3_group1_adr,
253 static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link2_rt1316_link01_rt714_link3[] = {
256 .num_adr = ARRAY_SIZE(rt711_sdca_2_adr),
257 .adr_d = rt711_sdca_2_adr,
261 .num_adr = ARRAY_SIZE(rt1316_0_group2_adr),
262 .adr_d = rt1316_0_group2_adr,
266 .num_adr = ARRAY_SIZE(rt1316_1_group2_adr),
267 .adr_d = rt1316_1_group2_adr,
271 .num_adr = ARRAY_SIZE(rt714_3_adr),
272 .adr_d = rt714_3_adr,
277 static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link2_rt1316_link01[] = {
280 .num_adr = ARRAY_SIZE(rt711_sdca_2_adr),
281 .adr_d = rt711_sdca_2_adr,
285 .num_adr = ARRAY_SIZE(rt1316_0_group2_adr),
286 .adr_d = rt1316_0_group2_adr,
290 .num_adr = ARRAY_SIZE(rt1316_1_group2_adr),
291 .adr_d = rt1316_1_group2_adr,
296 static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link12_rt714_link0[] = {
299 .num_adr = ARRAY_SIZE(rt1316_1_group1_adr),
300 .adr_d = rt1316_1_group1_adr,
304 .num_adr = ARRAY_SIZE(rt1316_2_group1_adr),
305 .adr_d = rt1316_2_group1_adr,
309 .num_adr = ARRAY_SIZE(rt714_0_adr),
310 .adr_d = rt714_0_adr,
315 static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link2_rt714_link3[] = {
318 .num_adr = ARRAY_SIZE(rt1316_2_single_adr),
319 .adr_d = rt1316_2_single_adr,
323 .num_adr = ARRAY_SIZE(rt714_3_adr),
324 .adr_d = rt714_3_adr,
329 static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link2_rt714_link0[] = {
332 .num_adr = ARRAY_SIZE(rt1316_2_single_adr),
333 .adr_d = rt1316_2_single_adr,
337 .num_adr = ARRAY_SIZE(rt714_0_adr),
338 .adr_d = rt714_0_adr,
343 static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link0_rt1316_link3[] = {
346 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
347 .adr_d = rt711_sdca_0_adr,
351 .num_adr = ARRAY_SIZE(rt1316_3_single_adr),
352 .adr_d = rt1316_3_single_adr,
357 static const struct snd_soc_acpi_adr_device mx8373_2_adr[] = {
359 .adr = 0x000223019F837300ull,
361 .endpoints = &spk_l_endpoint,
362 .name_prefix = "Left"
365 .adr = 0x000227019F837300ull,
367 .endpoints = &spk_r_endpoint,
368 .name_prefix = "Right"
372 static const struct snd_soc_acpi_adr_device rt5682_0_adr[] = {
374 .adr = 0x000021025D568200ull,
376 .endpoints = &single_endpoint,
377 .name_prefix = "rt5682"
381 static const struct snd_soc_acpi_link_adr adl_rvp[] = {
384 .num_adr = ARRAY_SIZE(rt711_0_adr),
385 .adr_d = rt711_0_adr,
390 static const struct snd_soc_acpi_link_adr adlps_rvp[] = {
393 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
394 .adr_d = rt711_sdca_0_adr,
399 static const struct snd_soc_acpi_link_adr adl_chromebook_base[] = {
402 .num_adr = ARRAY_SIZE(rt5682_0_adr),
403 .adr_d = rt5682_0_adr,
407 .num_adr = ARRAY_SIZE(mx8373_2_adr),
408 .adr_d = mx8373_2_adr,
413 static const struct snd_soc_acpi_codecs adl_max98373_amp = {
415 .codecs = {"MX98373"}
418 static const struct snd_soc_acpi_codecs adl_max98357a_amp = {
420 .codecs = {"MX98357A"}
423 static const struct snd_soc_acpi_codecs adl_max98360a_amp = {
425 .codecs = {"MX98360A"}
428 static const struct snd_soc_acpi_codecs adl_rt5682_rt5682s_hp = {
430 .codecs = {"10EC5682", "RTL5682"},
433 static const struct snd_soc_acpi_codecs adl_rt1015p_amp = {
435 .codecs = {"RTL1015"}
438 static const struct snd_soc_acpi_codecs adl_rt1019p_amp = {
440 .codecs = {"RTL1019"}
443 static const struct snd_soc_acpi_codecs adl_max98390_amp = {
445 .codecs = {"MX98390"}
448 static const struct snd_soc_acpi_codecs adl_lt6911_hdmi = {
450 .codecs = {"INTC10B0"}
453 struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
455 .comp_ids = &adl_rt5682_rt5682s_hp,
456 .drv_name = "adl_mx98373_rt5682",
457 .machine_quirk = snd_soc_acpi_codec_list,
458 .quirk_data = &adl_max98373_amp,
459 .sof_tplg_filename = "sof-adl-max98373-rt5682.tplg",
462 .comp_ids = &adl_rt5682_rt5682s_hp,
463 .drv_name = "adl_mx98357_rt5682",
464 .machine_quirk = snd_soc_acpi_codec_list,
465 .quirk_data = &adl_max98357a_amp,
466 .sof_tplg_filename = "sof-adl-max98357a-rt5682.tplg",
469 .comp_ids = &adl_rt5682_rt5682s_hp,
470 .drv_name = "adl_mx98360_rt5682",
471 .machine_quirk = snd_soc_acpi_codec_list,
472 .quirk_data = &adl_max98360a_amp,
473 .sof_tplg_filename = "sof-adl-max98360a-rt5682.tplg",
477 .drv_name = "adl_rt1019p_nau8825",
478 .machine_quirk = snd_soc_acpi_codec_list,
479 .quirk_data = &adl_rt1019p_amp,
480 .sof_tplg_filename = "sof-adl-rt1019-nau8825.tplg",
484 .drv_name = "adl_max98373_nau8825",
485 .machine_quirk = snd_soc_acpi_codec_list,
486 .quirk_data = &adl_max98373_amp,
487 .sof_tplg_filename = "sof-adl-max98373-nau8825.tplg",
491 .drv_name = "adl_mx98360a_nau8825",
492 .machine_quirk = snd_soc_acpi_codec_list,
493 .quirk_data = &adl_max98360a_amp,
494 .sof_tplg_filename = "sof-adl-max98360a-nau8825.tplg",
498 .drv_name = "adl_rt1019_rt5682s",
499 .machine_quirk = snd_soc_acpi_codec_list,
500 .quirk_data = &adl_rt1019p_amp,
501 .sof_tplg_filename = "sof-adl-rt1019-rt5682.tplg",
505 .drv_name = "adl_rt1015p_nau8825",
506 .machine_quirk = snd_soc_acpi_codec_list,
507 .quirk_data = &adl_rt1015p_amp,
508 .sof_tplg_filename = "sof-adl-rt1015-nau8825.tplg",
512 .drv_name = "sof_nau8825",
513 .sof_tplg_filename = "sof-adl-nau8825.tplg",
516 .comp_ids = &adl_rt5682_rt5682s_hp,
517 .drv_name = "adl_max98390_rt5682",
518 .machine_quirk = snd_soc_acpi_codec_list,
519 .quirk_data = &adl_max98390_amp,
520 .sof_tplg_filename = "sof-adl-max98390-rt5682.tplg",
523 .comp_ids = &adl_rt5682_rt5682s_hp,
524 .drv_name = "adl_rt5682",
525 .sof_tplg_filename = "sof-adl-rt5682.tplg",
529 .drv_name = "adl_mx98360a_cs4242",
530 .machine_quirk = snd_soc_acpi_codec_list,
531 .quirk_data = &adl_max98360a_amp,
532 .sof_tplg_filename = "sof-adl-max98360a-cs42l42.tplg",
534 /* place amp-only boards in the end of table */
537 .drv_name = "adl_cs35l41",
538 .sof_tplg_filename = "sof-adl-cs35l41.tplg",
541 .comp_ids = &essx_83x6,
542 .drv_name = "adl_es83x6_c1_h02",
543 .machine_quirk = snd_soc_acpi_codec_list,
544 .quirk_data = &adl_lt6911_hdmi,
545 .sof_tplg_filename = "sof-adl-es83x6-ssp1-hdmi-ssp02.tplg",
548 .comp_ids = &essx_83x6,
549 .drv_name = "sof-essx8336",
550 .sof_tplg_filename = "sof-adl-es83x6", /* the tplg suffix is added at run time */
551 .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
552 SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
553 SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
557 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_machines);
559 /* this table is used when there is no I2S codec present */
560 struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = {
562 .link_mask = 0xF, /* 4 active links required */
563 .links = adl_default,
564 .drv_name = "sof_sdw",
565 .sof_tplg_filename = "sof-adl-rt711-l0-rt1308-l12-rt715-l3.tplg",
568 .link_mask = 0xF, /* 4 active links required */
569 .links = adl_sdca_default,
570 .drv_name = "sof_sdw",
571 .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l12-rt714-l3.tplg",
574 .link_mask = 0xF, /* 4 active links required */
575 .links = adl_sdca_3_in_1,
576 .drv_name = "sof_sdw",
577 .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l13-rt714-l2.tplg",
580 .link_mask = 0xF, /* 4 active links required */
581 .links = adl_sdw_rt711_link2_rt1316_link01_rt714_link3,
582 .drv_name = "sof_sdw",
583 .sof_tplg_filename = "sof-adl-rt711-l2-rt1316-l01-rt714-l3.tplg",
586 .link_mask = 0x7, /* rt1316 on link0 and link1 & rt711 on link2*/
587 .links = adl_sdw_rt711_link2_rt1316_link01,
588 .drv_name = "sof_sdw",
589 .sof_tplg_filename = "sof-adl-rt711-l2-rt1316-l01.tplg",
592 .link_mask = 0xC, /* rt1316 on link2 & rt714 on link3 */
593 .links = adl_sdw_rt1316_link2_rt714_link3,
594 .drv_name = "sof_sdw",
595 .sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l3.tplg",
598 .link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */
599 .links = adl_sdw_rt1316_link12_rt714_link0,
600 .drv_name = "sof_sdw",
601 .sof_tplg_filename = "sof-adl-rt1316-l12-rt714-l0.tplg",
604 .link_mask = 0x5, /* 2 active links required */
605 .links = adl_sdw_rt1316_link2_rt714_link0,
606 .drv_name = "sof_sdw",
607 .sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l0.tplg",
610 .link_mask = 0x9, /* 2 active links required */
611 .links = adl_sdw_rt711_link0_rt1316_link3,
612 .drv_name = "sof_sdw",
613 .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l3.tplg",
616 .link_mask = 0x1, /* link0 required */
618 .drv_name = "sof_sdw",
619 .sof_tplg_filename = "sof-adl-rt711.tplg",
622 .link_mask = 0x1, /* link0 required */
624 .drv_name = "sof_sdw",
625 .sof_tplg_filename = "sof-adl-rt711.tplg",
628 .link_mask = 0x5, /* rt5682 on link0 & 2xmax98373 on link 2 */
629 .links = adl_chromebook_base,
630 .drv_name = "sof_sdw",
631 .sof_tplg_filename = "sof-adl-sdw-max98373-rt5682.tplg",
635 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_sdw_machines);