Loading...
Note: File does not exist in v3.1.
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * soc-acpi-intel-mtl-match.c - tables and support for MTL ACPI enumeration.
4 *
5 * Copyright (c) 2022, Intel Corporation.
6 *
7 */
8
9#include <linux/soundwire/sdw_intel.h>
10#include <sound/sdca.h>
11#include <sound/soc-acpi.h>
12#include <sound/soc-acpi-intel-match.h>
13#include <sound/soc-acpi-intel-ssp-common.h>
14#include "soc-acpi-intel-sdca-quirks.h"
15#include "soc-acpi-intel-sdw-mockup-match.h"
16
17static const struct snd_soc_acpi_codecs mtl_rt5682_rt5682s_hp = {
18 .num_codecs = 2,
19 .codecs = {RT5682_ACPI_HID, RT5682S_ACPI_HID},
20};
21
22static const struct snd_soc_acpi_codecs mtl_essx_83x6 = {
23 .num_codecs = 3,
24 .codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
25};
26
27static const struct snd_soc_acpi_codecs mtl_lt6911_hdmi = {
28 .num_codecs = 1,
29 .codecs = {"INTC10B0"}
30};
31
32struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
33 {
34 .comp_ids = &mtl_essx_83x6,
35 .drv_name = "mtl_es83x6_c1_h02",
36 .machine_quirk = snd_soc_acpi_codec_list,
37 .quirk_data = &mtl_lt6911_hdmi,
38 .sof_tplg_filename = "sof-mtl-es83x6-ssp1-hdmi-ssp02.tplg",
39 },
40 {
41 .comp_ids = &mtl_essx_83x6,
42 .drv_name = "sof-essx8336",
43 .sof_tplg_filename = "sof-mtl-es8336", /* the tplg suffix is added at run time */
44 .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
45 SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
46 SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
47 },
48 {
49 .comp_ids = &mtl_rt5682_rt5682s_hp,
50 .drv_name = "mtl_rt5682_c1_h02",
51 .machine_quirk = snd_soc_acpi_codec_list,
52 .quirk_data = &mtl_lt6911_hdmi,
53 .sof_tplg_filename = "sof-mtl-rt5682-ssp1-hdmi-ssp02.tplg",
54 },
55 /* place boards for each headphone codec: sof driver will complete the
56 * tplg name and machine driver will detect the amp type
57 */
58 {
59 .id = CS42L42_ACPI_HID,
60 .drv_name = "mtl_cs42l42_def",
61 .sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */
62 .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
63 SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
64 },
65 {
66 .id = DA7219_ACPI_HID,
67 .drv_name = "mtl_da7219_def",
68 .sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */
69 .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
70 SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
71 },
72 {
73 .id = NAU8825_ACPI_HID,
74 .drv_name = "mtl_nau8825_def",
75 .sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */
76 .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
77 SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
78 },
79 {
80 .id = RT5650_ACPI_HID,
81 .drv_name = "mtl_rt5682_def",
82 .sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */
83 .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
84 SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
85 },
86 {
87 .comp_ids = &mtl_rt5682_rt5682s_hp,
88 .drv_name = "mtl_rt5682_def",
89 .sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */
90 .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
91 SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
92 },
93 /* place amp-only boards in the end of table */
94 {
95 .id = "INTC10B0",
96 .drv_name = "mtl_lt6911_hdmi_ssp",
97 .sof_tplg_filename = "sof-mtl-hdmi-ssp02.tplg",
98 },
99 {},
100};
101EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_mtl_machines);
102
103static const struct snd_soc_acpi_endpoint single_endpoint = {
104 .num = 0,
105 .aggregated = 0,
106 .group_position = 0,
107 .group_id = 0,
108};
109
110static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
111 .num = 0,
112 .aggregated = 1,
113 .group_position = 0,
114 .group_id = 1,
115};
116
117static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
118 .num = 0,
119 .aggregated = 1,
120 .group_position = 1,
121 .group_id = 1,
122};
123
124static const struct snd_soc_acpi_endpoint rt712_endpoints[] = {
125 {
126 .num = 0,
127 .aggregated = 0,
128 .group_position = 0,
129 .group_id = 0,
130 },
131 {
132 .num = 1,
133 .aggregated = 0,
134 .group_position = 0,
135 .group_id = 0,
136 },
137};
138
139static const struct snd_soc_acpi_endpoint rt712_vb_endpoints[] = {
140 {
141 .num = 0,
142 .aggregated = 0,
143 .group_position = 0,
144 .group_id = 0,
145 },
146 {
147 .num = 1,
148 .aggregated = 0,
149 .group_position = 0,
150 .group_id = 0,
151 },
152 {
153 .num = 2,
154 .aggregated = 0,
155 .group_position = 0,
156 .group_id = 0,
157 },
158};
159
160/*
161 * RT722 is a multi-function codec, three endpoints are created for
162 * its headset, amp and dmic functions.
163 */
164static const struct snd_soc_acpi_endpoint rt722_endpoints[] = {
165 {
166 .num = 0,
167 .aggregated = 0,
168 .group_position = 0,
169 .group_id = 0,
170 },
171 {
172 .num = 1,
173 .aggregated = 0,
174 .group_position = 0,
175 .group_id = 0,
176 },
177 {
178 .num = 2,
179 .aggregated = 0,
180 .group_position = 0,
181 .group_id = 0,
182 },
183};
184
185static const struct snd_soc_acpi_endpoint spk_2_endpoint = {
186 .num = 0,
187 .aggregated = 1,
188 .group_position = 2,
189 .group_id = 1,
190};
191
192static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
193 .num = 0,
194 .aggregated = 1,
195 .group_position = 3,
196 .group_id = 1,
197};
198
199static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
200 {
201 .adr = 0x000030025D071101ull,
202 .num_endpoints = 1,
203 .endpoints = &single_endpoint,
204 .name_prefix = "rt711"
205 }
206};
207
208static const struct snd_soc_acpi_adr_device rt712_0_single_adr[] = {
209 {
210 .adr = 0x000030025D071201ull,
211 .num_endpoints = ARRAY_SIZE(rt712_endpoints),
212 .endpoints = rt712_endpoints,
213 .name_prefix = "rt712"
214 }
215};
216
217static const struct snd_soc_acpi_adr_device rt712_vb_0_single_adr[] = {
218 {
219 .adr = 0x000030025D071201ull,
220 .num_endpoints = ARRAY_SIZE(rt712_vb_endpoints),
221 .endpoints = rt712_vb_endpoints,
222 .name_prefix = "rt712"
223 }
224};
225
226static const struct snd_soc_acpi_adr_device rt1712_3_single_adr[] = {
227 {
228 .adr = 0x000330025D171201ull,
229 .num_endpoints = 1,
230 .endpoints = &single_endpoint,
231 .name_prefix = "rt712-dmic"
232 }
233};
234
235static const struct snd_soc_acpi_adr_device rt722_0_single_adr[] = {
236 {
237 .adr = 0x000030025d072201ull,
238 .num_endpoints = ARRAY_SIZE(rt722_endpoints),
239 .endpoints = rt722_endpoints,
240 .name_prefix = "rt722"
241 }
242};
243
244static const struct snd_soc_acpi_adr_device rt713_0_single_adr[] = {
245 {
246 .adr = 0x000031025D071301ull,
247 .num_endpoints = 1,
248 .endpoints = &single_endpoint,
249 .name_prefix = "rt713"
250 }
251};
252
253static const struct snd_soc_acpi_adr_device rt1713_3_single_adr[] = {
254 {
255 .adr = 0x000331025D171301ull,
256 .num_endpoints = 1,
257 .endpoints = &single_endpoint,
258 .name_prefix = "rt713-dmic"
259 }
260};
261
262static const struct snd_soc_acpi_adr_device mx8373_0_adr[] = {
263 {
264 .adr = 0x000023019F837300ull,
265 .num_endpoints = 1,
266 .endpoints = &spk_l_endpoint,
267 .name_prefix = "Left"
268 },
269 {
270 .adr = 0x000027019F837300ull,
271 .num_endpoints = 1,
272 .endpoints = &spk_r_endpoint,
273 .name_prefix = "Right"
274 }
275};
276
277static const struct snd_soc_acpi_adr_device rt5682_2_adr[] = {
278 {
279 .adr = 0x000221025D568200ull,
280 .num_endpoints = 1,
281 .endpoints = &single_endpoint,
282 .name_prefix = "rt5682"
283 }
284};
285
286static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = {
287 {
288 .adr = 0x000230025D131601ull,
289 .num_endpoints = 1,
290 .endpoints = &spk_l_endpoint,
291 .name_prefix = "rt1316-1"
292 }
293};
294
295static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = {
296 {
297 .adr = 0x000331025D131601ull,
298 .num_endpoints = 1,
299 .endpoints = &spk_r_endpoint,
300 .name_prefix = "rt1316-2"
301 }
302};
303
304static const struct snd_soc_acpi_adr_device rt1316_1_group2_adr[] = {
305 {
306 .adr = 0x000131025D131601ull,
307 .num_endpoints = 1,
308 .endpoints = &spk_l_endpoint,
309 .name_prefix = "rt1316-1"
310 }
311};
312
313static const struct snd_soc_acpi_adr_device rt1316_2_group2_adr[] = {
314 {
315 .adr = 0x000230025D131601ull,
316 .num_endpoints = 1,
317 .endpoints = &spk_r_endpoint,
318 .name_prefix = "rt1316-2"
319 }
320};
321
322static const struct snd_soc_acpi_adr_device rt1316_3_single_adr[] = {
323 {
324 .adr = 0x000330025D131601ull,
325 .num_endpoints = 1,
326 .endpoints = &single_endpoint,
327 .name_prefix = "rt1316-1"
328 }
329};
330
331static const struct snd_soc_acpi_adr_device rt1318_1_single_adr[] = {
332 {
333 .adr = 0x000130025D131801,
334 .num_endpoints = 1,
335 .endpoints = &single_endpoint,
336 .name_prefix = "rt1318-1"
337 }
338};
339
340static const struct snd_soc_acpi_adr_device rt1318_1_group1_adr[] = {
341 {
342 .adr = 0x000130025D131801ull,
343 .num_endpoints = 1,
344 .endpoints = &spk_l_endpoint,
345 .name_prefix = "rt1318-1"
346 }
347};
348
349static const struct snd_soc_acpi_adr_device rt1318_2_group1_adr[] = {
350 {
351 .adr = 0x000232025D131801ull,
352 .num_endpoints = 1,
353 .endpoints = &spk_r_endpoint,
354 .name_prefix = "rt1318-2"
355 }
356};
357
358static const struct snd_soc_acpi_adr_device rt714_0_adr[] = {
359 {
360 .adr = 0x000030025D071401ull,
361 .num_endpoints = 1,
362 .endpoints = &single_endpoint,
363 .name_prefix = "rt714"
364 }
365};
366
367static const struct snd_soc_acpi_adr_device rt714_1_adr[] = {
368 {
369 .adr = 0x000130025D071401ull,
370 .num_endpoints = 1,
371 .endpoints = &single_endpoint,
372 .name_prefix = "rt714"
373 }
374};
375
376static const struct snd_soc_acpi_link_adr mtl_712_l0_1712_l3[] = {
377 {
378 .mask = BIT(0),
379 .num_adr = ARRAY_SIZE(rt712_0_single_adr),
380 .adr_d = rt712_0_single_adr,
381 },
382 {
383 .mask = BIT(3),
384 .num_adr = ARRAY_SIZE(rt1712_3_single_adr),
385 .adr_d = rt1712_3_single_adr,
386 },
387 {}
388};
389
390static const struct snd_soc_acpi_link_adr mtl_712_l0[] = {
391 {
392 .mask = BIT(0),
393 .num_adr = ARRAY_SIZE(rt712_0_single_adr),
394 .adr_d = rt712_0_single_adr,
395 },
396 {}
397};
398
399static const struct snd_soc_acpi_link_adr mtl_712_vb_l0[] = {
400 {
401 .mask = BIT(0),
402 .num_adr = ARRAY_SIZE(rt712_vb_0_single_adr),
403 .adr_d = rt712_vb_0_single_adr,
404 },
405 {}
406};
407
408static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = {
409 { /* Jack Playback Endpoint */
410 .num = 0,
411 .aggregated = 0,
412 .group_position = 0,
413 .group_id = 0,
414 },
415 { /* DMIC Capture Endpoint */
416 .num = 1,
417 .aggregated = 0,
418 .group_position = 0,
419 .group_id = 0,
420 },
421 { /* Jack Capture Endpoint */
422 .num = 2,
423 .aggregated = 0,
424 .group_position = 0,
425 .group_id = 0,
426 },
427 { /* Speaker Playback Endpoint */
428 .num = 3,
429 .aggregated = 0,
430 .group_position = 0,
431 .group_id = 0,
432 },
433};
434
435static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = {
436 {
437 .adr = 0x00003001FA424301ull,
438 .num_endpoints = ARRAY_SIZE(cs42l43_endpoints),
439 .endpoints = cs42l43_endpoints,
440 .name_prefix = "cs42l43"
441 }
442};
443
444static const struct snd_soc_acpi_adr_device cs35l56_1_adr[] = {
445 {
446 .adr = 0x00013701FA355601ull,
447 .num_endpoints = 1,
448 .endpoints = &spk_r_endpoint,
449 .name_prefix = "AMP3"
450 },
451 {
452 .adr = 0x00013601FA355601ull,
453 .num_endpoints = 1,
454 .endpoints = &spk_3_endpoint,
455 .name_prefix = "AMP4"
456 }
457};
458
459static const struct snd_soc_acpi_adr_device cs35l56_2_adr[] = {
460 {
461 .adr = 0x00023301FA355601ull,
462 .num_endpoints = 1,
463 .endpoints = &spk_l_endpoint,
464 .name_prefix = "AMP1"
465 },
466 {
467 .adr = 0x00023201FA355601ull,
468 .num_endpoints = 1,
469 .endpoints = &spk_2_endpoint,
470 .name_prefix = "AMP2"
471 }
472};
473
474static const struct snd_soc_acpi_adr_device cs35l56_2_r_adr[] = {
475 {
476 .adr = 0x00023201FA355601ull,
477 .num_endpoints = 1,
478 .endpoints = &spk_r_endpoint,
479 .name_prefix = "AMP3"
480 },
481 {
482 .adr = 0x00023301FA355601ull,
483 .num_endpoints = 1,
484 .endpoints = &spk_3_endpoint,
485 .name_prefix = "AMP4"
486 }
487
488};
489
490static const struct snd_soc_acpi_adr_device cs35l56_3_l_adr[] = {
491 {
492 .adr = 0x00033001fa355601ull,
493 .num_endpoints = 1,
494 .endpoints = &spk_l_endpoint,
495 .name_prefix = "AMP1"
496 },
497 {
498 .adr = 0x00033101fa355601ull,
499 .num_endpoints = 1,
500 .endpoints = &spk_2_endpoint,
501 .name_prefix = "AMP2"
502 }
503};
504
505static const struct snd_soc_acpi_link_adr rt5682_link2_max98373_link0[] = {
506 /* Expected order: jack -> amp */
507 {
508 .mask = BIT(2),
509 .num_adr = ARRAY_SIZE(rt5682_2_adr),
510 .adr_d = rt5682_2_adr,
511 },
512 {
513 .mask = BIT(0),
514 .num_adr = ARRAY_SIZE(mx8373_0_adr),
515 .adr_d = mx8373_0_adr,
516 },
517 {}
518};
519
520static const struct snd_soc_acpi_link_adr mtl_rvp[] = {
521 {
522 .mask = BIT(0),
523 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
524 .adr_d = rt711_sdca_0_adr,
525 },
526 {}
527};
528
529static const struct snd_soc_acpi_link_adr mtl_rt722_only[] = {
530 {
531 .mask = BIT(0),
532 .num_adr = ARRAY_SIZE(rt722_0_single_adr),
533 .adr_d = rt722_0_single_adr,
534 },
535 {}
536};
537
538static const struct snd_soc_acpi_link_adr mtl_3_in_1_sdca[] = {
539 {
540 .mask = BIT(0),
541 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
542 .adr_d = rt711_sdca_0_adr,
543 },
544 {
545 .mask = BIT(2),
546 .num_adr = ARRAY_SIZE(rt1316_2_group1_adr),
547 .adr_d = rt1316_2_group1_adr,
548 },
549 {
550 .mask = BIT(3),
551 .num_adr = ARRAY_SIZE(rt1316_3_group1_adr),
552 .adr_d = rt1316_3_group1_adr,
553 },
554 {
555 .mask = BIT(1),
556 .num_adr = ARRAY_SIZE(rt714_1_adr),
557 .adr_d = rt714_1_adr,
558 },
559 {}
560};
561
562static const struct snd_soc_acpi_link_adr mtl_sdw_rt1318_l12_rt714_l0[] = {
563 {
564 .mask = BIT(1),
565 .num_adr = ARRAY_SIZE(rt1318_1_group1_adr),
566 .adr_d = rt1318_1_group1_adr,
567 },
568 {
569 .mask = BIT(2),
570 .num_adr = ARRAY_SIZE(rt1318_2_group1_adr),
571 .adr_d = rt1318_2_group1_adr,
572 },
573 {
574 .mask = BIT(0),
575 .num_adr = ARRAY_SIZE(rt714_0_adr),
576 .adr_d = rt714_0_adr,
577 },
578 {}
579};
580
581static const struct snd_soc_acpi_link_adr mtl_rt713_l0_rt1316_l12_rt1713_l3[] = {
582 {
583 .mask = BIT(0),
584 .num_adr = ARRAY_SIZE(rt713_0_single_adr),
585 .adr_d = rt713_0_single_adr,
586 },
587 {
588 .mask = BIT(1),
589 .num_adr = ARRAY_SIZE(rt1316_1_group2_adr),
590 .adr_d = rt1316_1_group2_adr,
591 },
592 {
593 .mask = BIT(2),
594 .num_adr = ARRAY_SIZE(rt1316_2_group2_adr),
595 .adr_d = rt1316_2_group2_adr,
596 },
597 {
598 .mask = BIT(3),
599 .num_adr = ARRAY_SIZE(rt1713_3_single_adr),
600 .adr_d = rt1713_3_single_adr,
601 },
602 {}
603};
604
605static const struct snd_soc_acpi_link_adr mtl_rt713_l0_rt1318_l1_rt1713_l3[] = {
606 {
607 .mask = BIT(0),
608 .num_adr = ARRAY_SIZE(rt713_0_single_adr),
609 .adr_d = rt713_0_single_adr,
610 },
611 {
612 .mask = BIT(1),
613 .num_adr = ARRAY_SIZE(rt1318_1_single_adr),
614 .adr_d = rt1318_1_single_adr,
615 },
616 {
617 .mask = BIT(3),
618 .num_adr = ARRAY_SIZE(rt1713_3_single_adr),
619 .adr_d = rt1713_3_single_adr,
620 },
621 {}
622};
623
624static const struct snd_soc_acpi_link_adr mtl_rt713_l0_rt1318_l12_rt1713_l3[] = {
625 {
626 .mask = BIT(0),
627 .num_adr = ARRAY_SIZE(rt713_0_single_adr),
628 .adr_d = rt713_0_single_adr,
629 },
630 {
631 .mask = BIT(1),
632 .num_adr = ARRAY_SIZE(rt1318_1_group1_adr),
633 .adr_d = rt1318_1_group1_adr,
634 },
635 {
636 .mask = BIT(2),
637 .num_adr = ARRAY_SIZE(rt1318_2_group1_adr),
638 .adr_d = rt1318_2_group1_adr,
639 },
640 {
641 .mask = BIT(3),
642 .num_adr = ARRAY_SIZE(rt1713_3_single_adr),
643 .adr_d = rt1713_3_single_adr,
644 },
645 {}
646};
647
648static const struct snd_soc_acpi_link_adr mtl_rt713_l0_rt1316_l12[] = {
649 {
650 .mask = BIT(0),
651 .num_adr = ARRAY_SIZE(rt713_0_single_adr),
652 .adr_d = rt713_0_single_adr,
653 },
654 {
655 .mask = BIT(1),
656 .num_adr = ARRAY_SIZE(rt1316_1_group2_adr),
657 .adr_d = rt1316_1_group2_adr,
658 },
659 {
660 .mask = BIT(2),
661 .num_adr = ARRAY_SIZE(rt1316_2_group2_adr),
662 .adr_d = rt1316_2_group2_adr,
663 },
664 {}
665};
666
667static const struct snd_soc_acpi_link_adr mtl_rt711_l0_rt1316_l3[] = {
668 {
669 .mask = BIT(0),
670 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
671 .adr_d = rt711_sdca_0_adr,
672 },
673 {
674 .mask = BIT(3),
675 .num_adr = ARRAY_SIZE(rt1316_3_single_adr),
676 .adr_d = rt1316_3_single_adr,
677 },
678 {}
679};
680
681static const struct snd_soc_acpi_adr_device mx8363_2_adr[] = {
682 {
683 .adr = 0x000230019F836300ull,
684 .num_endpoints = 1,
685 .endpoints = &spk_l_endpoint,
686 .name_prefix = "Left"
687 },
688 {
689 .adr = 0x000231019F836300ull,
690 .num_endpoints = 1,
691 .endpoints = &spk_r_endpoint,
692 .name_prefix = "Right"
693 }
694};
695
696static const struct snd_soc_acpi_adr_device cs42l42_0_adr[] = {
697 {
698 .adr = 0x00001001FA424200ull,
699 .num_endpoints = 1,
700 .endpoints = &single_endpoint,
701 .name_prefix = "cs42l42"
702 }
703};
704
705static const struct snd_soc_acpi_link_adr cs42l42_link0_max98363_link2[] = {
706 /* Expected order: jack -> amp */
707 {
708 .mask = BIT(0),
709 .num_adr = ARRAY_SIZE(cs42l42_0_adr),
710 .adr_d = cs42l42_0_adr,
711 },
712 {
713 .mask = BIT(2),
714 .num_adr = ARRAY_SIZE(mx8363_2_adr),
715 .adr_d = mx8363_2_adr,
716 },
717 {}
718};
719
720static const struct snd_soc_acpi_link_adr mtl_cs42l43_l0[] = {
721 {
722 .mask = BIT(0),
723 .num_adr = ARRAY_SIZE(cs42l43_0_adr),
724 .adr_d = cs42l43_0_adr,
725 },
726 {}
727};
728
729static const struct snd_soc_acpi_link_adr mtl_cs42l43_cs35l56[] = {
730 {
731 .mask = BIT(0),
732 .num_adr = ARRAY_SIZE(cs42l43_0_adr),
733 .adr_d = cs42l43_0_adr,
734 },
735 {
736 .mask = BIT(1),
737 .num_adr = ARRAY_SIZE(cs35l56_1_adr),
738 .adr_d = cs35l56_1_adr,
739 },
740 {
741 .mask = BIT(2),
742 .num_adr = ARRAY_SIZE(cs35l56_2_adr),
743 .adr_d = cs35l56_2_adr,
744 },
745 {}
746};
747
748static const struct snd_soc_acpi_link_adr cs42l43_link0_cs35l56_link2_link3[] = {
749 /* Expected order: jack -> amp */
750 {
751 .mask = BIT(0),
752 .num_adr = ARRAY_SIZE(cs42l43_0_adr),
753 .adr_d = cs42l43_0_adr,
754 },
755 {
756 .mask = BIT(2),
757 .num_adr = ARRAY_SIZE(cs35l56_2_r_adr),
758 .adr_d = cs35l56_2_r_adr,
759 },
760 {
761 .mask = BIT(3),
762 .num_adr = ARRAY_SIZE(cs35l56_3_l_adr),
763 .adr_d = cs35l56_3_l_adr,
764 },
765 {}
766};
767
768/* this table is used when there is no I2S codec present */
769struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
770 /* mockup tests need to be first */
771 {
772 .link_mask = GENMASK(3, 0),
773 .links = sdw_mockup_headset_2amps_mic,
774 .drv_name = "sof_sdw",
775 .sof_tplg_filename = "sof-mtl-rt711-rt1308-rt715.tplg",
776 },
777 {
778 .link_mask = BIT(0) | BIT(1) | BIT(3),
779 .links = sdw_mockup_headset_1amp_mic,
780 .drv_name = "sof_sdw",
781 .sof_tplg_filename = "sof-mtl-rt711-rt1308-mono-rt715.tplg",
782 },
783 {
784 .link_mask = GENMASK(2, 0),
785 .links = sdw_mockup_mic_headset_1amp,
786 .drv_name = "sof_sdw",
787 .sof_tplg_filename = "sof-mtl-rt715-rt711-rt1308-mono.tplg",
788 },
789 {
790 .link_mask = GENMASK(3, 0),
791 .links = mtl_rt713_l0_rt1316_l12_rt1713_l3,
792 .drv_name = "sof_sdw",
793 .sof_tplg_filename = "sof-mtl-rt713-l0-rt1316-l12-rt1713-l3.tplg",
794 },
795 {
796 .link_mask = GENMASK(3, 0),
797 .links = mtl_rt713_l0_rt1318_l12_rt1713_l3,
798 .drv_name = "sof_sdw",
799 .sof_tplg_filename = "sof-mtl-rt713-l0-rt1318-l12-rt1713-l3.tplg",
800 },
801 {
802 .link_mask = BIT(0) | BIT(1) | BIT(3),
803 .links = mtl_rt713_l0_rt1318_l1_rt1713_l3,
804 .drv_name = "sof_sdw",
805 .sof_tplg_filename = "sof-mtl-rt713-l0-rt1318-l1-rt1713-l3.tplg",
806 },
807 {
808 .link_mask = GENMASK(2, 0),
809 .links = mtl_rt713_l0_rt1316_l12,
810 .drv_name = "sof_sdw",
811 .sof_tplg_filename = "sof-mtl-rt713-l0-rt1316-l12.tplg",
812 },
813 {
814 .link_mask = BIT(3) | BIT(0),
815 .links = mtl_712_l0_1712_l3,
816 .drv_name = "sof_sdw",
817 .sof_tplg_filename = "sof-mtl-rt712-l0-rt1712-l3.tplg",
818 },
819 {
820 .link_mask = BIT(0),
821 .links = mtl_712_vb_l0,
822 .drv_name = "sof_sdw",
823 .machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
824 .sof_tplg_filename = "sof-mtl-rt712-vb-l0.tplg",
825 },
826 {
827 .link_mask = BIT(0),
828 .links = mtl_712_l0,
829 .drv_name = "sof_sdw",
830 .sof_tplg_filename = "sof-mtl-rt712-l0.tplg",
831 },
832 {
833 .link_mask = GENMASK(2, 0),
834 .links = mtl_sdw_rt1318_l12_rt714_l0,
835 .drv_name = "sof_sdw",
836 .sof_tplg_filename = "sof-mtl-rt1318-l12-rt714-l0.tplg"
837 },
838 {
839 .link_mask = BIT(0) | BIT(2) | BIT(3),
840 .links = cs42l43_link0_cs35l56_link2_link3,
841 .drv_name = "sof_sdw",
842 .sof_tplg_filename = "sof-mtl-cs42l43-l0-cs35l56-l23.tplg",
843 },
844 {
845 .link_mask = GENMASK(2, 0),
846 .links = mtl_cs42l43_cs35l56,
847 .drv_name = "sof_sdw",
848 .sof_tplg_filename = "sof-mtl-cs42l43-l0-cs35l56-l12.tplg",
849 },
850 {
851 .link_mask = BIT(0),
852 .links = mtl_cs42l43_l0,
853 .drv_name = "sof_sdw",
854 .sof_tplg_filename = "sof-mtl-cs42l43-l0.tplg",
855 },
856 {
857 .link_mask = GENMASK(3, 0),
858 .links = mtl_3_in_1_sdca,
859 .drv_name = "sof_sdw",
860 .sof_tplg_filename = "sof-mtl-rt711-l0-rt1316-l23-rt714-l1.tplg",
861 },
862 {
863 .link_mask = 0x9, /* 2 active links required */
864 .links = mtl_rt711_l0_rt1316_l3,
865 .drv_name = "sof_sdw",
866 .sof_tplg_filename = "sof-mtl-rt711-l0-rt1316-l3.tplg",
867 },
868 {
869 .link_mask = BIT(0),
870 .links = mtl_rt722_only,
871 .drv_name = "sof_sdw",
872 .sof_tplg_filename = "sof-mtl-rt722-l0.tplg",
873 },
874 {
875 .link_mask = BIT(0),
876 .links = mtl_rvp,
877 .drv_name = "sof_sdw",
878 .sof_tplg_filename = "sof-mtl-rt711.tplg",
879 },
880 {
881 .link_mask = BIT(0) | BIT(2),
882 .links = rt5682_link2_max98373_link0,
883 .drv_name = "sof_sdw",
884 .sof_tplg_filename = "sof-mtl-sdw-rt5682-l2-max98373-l0.tplg",
885 },
886 {
887 .link_mask = BIT(0) | BIT(2),
888 .links = cs42l42_link0_max98363_link2,
889 .drv_name = "sof_sdw",
890 .sof_tplg_filename = "sof-mtl-sdw-cs42l42-l0-max98363-l2.tplg",
891 },
892 {},
893};
894EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_mtl_sdw_machines);
895
896MODULE_IMPORT_NS("SND_SOC_ACPI_INTEL_SDCA_QUIRKS");