Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/sound/soc/intel/common/soc-acpi-intel-mtl-match.c
26493 views
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 "sof-function-topology-lib.h"
15
#include "soc-acpi-intel-sdca-quirks.h"
16
#include "soc-acpi-intel-sdw-mockup-match.h"
17
18
static const struct snd_soc_acpi_codecs mtl_rt5682_rt5682s_hp = {
19
.num_codecs = 2,
20
.codecs = {RT5682_ACPI_HID, RT5682S_ACPI_HID},
21
};
22
23
static const struct snd_soc_acpi_codecs mtl_essx_83x6 = {
24
.num_codecs = 3,
25
.codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
26
};
27
28
static const struct snd_soc_acpi_codecs mtl_lt6911_hdmi = {
29
.num_codecs = 1,
30
.codecs = {"INTC10B0"}
31
};
32
33
struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
34
{
35
.comp_ids = &mtl_essx_83x6,
36
.drv_name = "mtl_es83x6_c1_h02",
37
.machine_quirk = snd_soc_acpi_codec_list,
38
.quirk_data = &mtl_lt6911_hdmi,
39
.sof_tplg_filename = "sof-mtl-es83x6-ssp1-hdmi-ssp02.tplg",
40
},
41
{
42
.comp_ids = &mtl_essx_83x6,
43
.drv_name = "sof-essx8336",
44
.sof_tplg_filename = "sof-mtl-es8336", /* the tplg suffix is added at run time */
45
.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
46
SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
47
SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
48
},
49
{
50
.comp_ids = &mtl_rt5682_rt5682s_hp,
51
.drv_name = "mtl_rt5682_c1_h02",
52
.machine_quirk = snd_soc_acpi_codec_list,
53
.quirk_data = &mtl_lt6911_hdmi,
54
.sof_tplg_filename = "sof-mtl-rt5682-ssp1-hdmi-ssp02.tplg",
55
},
56
/* place boards for each headphone codec: sof driver will complete the
57
* tplg name and machine driver will detect the amp type
58
*/
59
{
60
.id = CS42L42_ACPI_HID,
61
.drv_name = "mtl_cs42l42_def",
62
.sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */
63
.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
64
SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
65
},
66
{
67
.id = DA7219_ACPI_HID,
68
.drv_name = "mtl_da7219_def",
69
.sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */
70
.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
71
SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
72
},
73
{
74
.id = NAU8825_ACPI_HID,
75
.drv_name = "mtl_nau8825_def",
76
.sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */
77
.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
78
SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
79
},
80
{
81
.id = RT5650_ACPI_HID,
82
.drv_name = "mtl_rt5682_def",
83
.sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */
84
.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
85
SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
86
},
87
{
88
.comp_ids = &mtl_rt5682_rt5682s_hp,
89
.drv_name = "mtl_rt5682_def",
90
.sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */
91
.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
92
SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
93
},
94
/* place amp-only boards in the end of table */
95
{
96
.id = "INTC10B0",
97
.drv_name = "mtl_lt6911_hdmi_ssp",
98
.sof_tplg_filename = "sof-mtl-hdmi-ssp02.tplg",
99
},
100
{},
101
};
102
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_mtl_machines);
103
104
static const struct snd_soc_acpi_endpoint single_endpoint = {
105
.num = 0,
106
.aggregated = 0,
107
.group_position = 0,
108
.group_id = 0,
109
};
110
111
static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
112
.num = 0,
113
.aggregated = 1,
114
.group_position = 0,
115
.group_id = 1,
116
};
117
118
static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
119
.num = 0,
120
.aggregated = 1,
121
.group_position = 1,
122
.group_id = 1,
123
};
124
125
static const struct snd_soc_acpi_endpoint rt712_endpoints[] = {
126
{
127
.num = 0,
128
.aggregated = 0,
129
.group_position = 0,
130
.group_id = 0,
131
},
132
{
133
.num = 1,
134
.aggregated = 0,
135
.group_position = 0,
136
.group_id = 0,
137
},
138
};
139
140
static const struct snd_soc_acpi_endpoint rt712_vb_endpoints[] = {
141
{
142
.num = 0,
143
.aggregated = 0,
144
.group_position = 0,
145
.group_id = 0,
146
},
147
{
148
.num = 1,
149
.aggregated = 0,
150
.group_position = 0,
151
.group_id = 0,
152
},
153
{
154
.num = 2,
155
.aggregated = 0,
156
.group_position = 0,
157
.group_id = 0,
158
},
159
};
160
161
/*
162
* RT722 is a multi-function codec, three endpoints are created for
163
* its headset, amp and dmic functions.
164
*/
165
static const struct snd_soc_acpi_endpoint rt722_endpoints[] = {
166
{
167
.num = 0,
168
.aggregated = 0,
169
.group_position = 0,
170
.group_id = 0,
171
},
172
{
173
.num = 1,
174
.aggregated = 0,
175
.group_position = 0,
176
.group_id = 0,
177
},
178
{
179
.num = 2,
180
.aggregated = 0,
181
.group_position = 0,
182
.group_id = 0,
183
},
184
};
185
186
static const struct snd_soc_acpi_endpoint spk_2_endpoint = {
187
.num = 0,
188
.aggregated = 1,
189
.group_position = 2,
190
.group_id = 1,
191
};
192
193
static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
194
.num = 0,
195
.aggregated = 1,
196
.group_position = 3,
197
.group_id = 1,
198
};
199
200
static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
201
{
202
.adr = 0x000030025D071101ull,
203
.num_endpoints = 1,
204
.endpoints = &single_endpoint,
205
.name_prefix = "rt711"
206
}
207
};
208
209
static const struct snd_soc_acpi_adr_device rt712_0_single_adr[] = {
210
{
211
.adr = 0x000030025D071201ull,
212
.num_endpoints = ARRAY_SIZE(rt712_endpoints),
213
.endpoints = rt712_endpoints,
214
.name_prefix = "rt712"
215
}
216
};
217
218
static const struct snd_soc_acpi_adr_device rt712_vb_0_single_adr[] = {
219
{
220
.adr = 0x000030025D071201ull,
221
.num_endpoints = ARRAY_SIZE(rt712_vb_endpoints),
222
.endpoints = rt712_vb_endpoints,
223
.name_prefix = "rt712"
224
}
225
};
226
227
static const struct snd_soc_acpi_adr_device rt1712_3_single_adr[] = {
228
{
229
.adr = 0x000330025D171201ull,
230
.num_endpoints = 1,
231
.endpoints = &single_endpoint,
232
.name_prefix = "rt712-dmic"
233
}
234
};
235
236
static const struct snd_soc_acpi_adr_device rt722_0_single_adr[] = {
237
{
238
.adr = 0x000030025d072201ull,
239
.num_endpoints = ARRAY_SIZE(rt722_endpoints),
240
.endpoints = rt722_endpoints,
241
.name_prefix = "rt722"
242
}
243
};
244
245
static const struct snd_soc_acpi_adr_device rt713_0_single_adr[] = {
246
{
247
.adr = 0x000031025D071301ull,
248
.num_endpoints = 1,
249
.endpoints = &single_endpoint,
250
.name_prefix = "rt713"
251
}
252
};
253
254
static const struct snd_soc_acpi_adr_device rt1713_3_single_adr[] = {
255
{
256
.adr = 0x000331025D171301ull,
257
.num_endpoints = 1,
258
.endpoints = &single_endpoint,
259
.name_prefix = "rt713-dmic"
260
}
261
};
262
263
static const struct snd_soc_acpi_adr_device mx8373_0_adr[] = {
264
{
265
.adr = 0x000023019F837300ull,
266
.num_endpoints = 1,
267
.endpoints = &spk_l_endpoint,
268
.name_prefix = "Left"
269
},
270
{
271
.adr = 0x000027019F837300ull,
272
.num_endpoints = 1,
273
.endpoints = &spk_r_endpoint,
274
.name_prefix = "Right"
275
}
276
};
277
278
static const struct snd_soc_acpi_adr_device rt5682_2_adr[] = {
279
{
280
.adr = 0x000221025D568200ull,
281
.num_endpoints = 1,
282
.endpoints = &single_endpoint,
283
.name_prefix = "rt5682"
284
}
285
};
286
287
static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = {
288
{
289
.adr = 0x000230025D131601ull,
290
.num_endpoints = 1,
291
.endpoints = &spk_l_endpoint,
292
.name_prefix = "rt1316-1"
293
}
294
};
295
296
static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = {
297
{
298
.adr = 0x000331025D131601ull,
299
.num_endpoints = 1,
300
.endpoints = &spk_r_endpoint,
301
.name_prefix = "rt1316-2"
302
}
303
};
304
305
static const struct snd_soc_acpi_adr_device rt1316_1_group2_adr[] = {
306
{
307
.adr = 0x000131025D131601ull,
308
.num_endpoints = 1,
309
.endpoints = &spk_l_endpoint,
310
.name_prefix = "rt1316-1"
311
}
312
};
313
314
static const struct snd_soc_acpi_adr_device rt1316_2_group2_adr[] = {
315
{
316
.adr = 0x000230025D131601ull,
317
.num_endpoints = 1,
318
.endpoints = &spk_r_endpoint,
319
.name_prefix = "rt1316-2"
320
}
321
};
322
323
static const struct snd_soc_acpi_adr_device rt1316_3_single_adr[] = {
324
{
325
.adr = 0x000330025D131601ull,
326
.num_endpoints = 1,
327
.endpoints = &single_endpoint,
328
.name_prefix = "rt1316-1"
329
}
330
};
331
332
static const struct snd_soc_acpi_adr_device rt1318_1_single_adr[] = {
333
{
334
.adr = 0x000130025D131801ull,
335
.num_endpoints = 1,
336
.endpoints = &single_endpoint,
337
.name_prefix = "rt1318-1"
338
}
339
};
340
341
static const struct snd_soc_acpi_adr_device rt1318_1_group1_adr[] = {
342
{
343
.adr = 0x000130025D131801ull,
344
.num_endpoints = 1,
345
.endpoints = &spk_l_endpoint,
346
.name_prefix = "rt1318-1"
347
}
348
};
349
350
static const struct snd_soc_acpi_adr_device rt1318_2_group1_adr[] = {
351
{
352
.adr = 0x000232025D131801ull,
353
.num_endpoints = 1,
354
.endpoints = &spk_r_endpoint,
355
.name_prefix = "rt1318-2"
356
}
357
};
358
359
static const struct snd_soc_acpi_adr_device rt714_0_adr[] = {
360
{
361
.adr = 0x000030025D071401ull,
362
.num_endpoints = 1,
363
.endpoints = &single_endpoint,
364
.name_prefix = "rt714"
365
}
366
};
367
368
static const struct snd_soc_acpi_adr_device rt714_1_adr[] = {
369
{
370
.adr = 0x000130025D071401ull,
371
.num_endpoints = 1,
372
.endpoints = &single_endpoint,
373
.name_prefix = "rt714"
374
}
375
};
376
377
static const struct snd_soc_acpi_link_adr mtl_712_l0_1712_l3[] = {
378
{
379
.mask = BIT(0),
380
.num_adr = ARRAY_SIZE(rt712_0_single_adr),
381
.adr_d = rt712_0_single_adr,
382
},
383
{
384
.mask = BIT(3),
385
.num_adr = ARRAY_SIZE(rt1712_3_single_adr),
386
.adr_d = rt1712_3_single_adr,
387
},
388
{}
389
};
390
391
static const struct snd_soc_acpi_link_adr mtl_712_l0[] = {
392
{
393
.mask = BIT(0),
394
.num_adr = ARRAY_SIZE(rt712_0_single_adr),
395
.adr_d = rt712_0_single_adr,
396
},
397
{}
398
};
399
400
static const struct snd_soc_acpi_link_adr mtl_712_vb_l0[] = {
401
{
402
.mask = BIT(0),
403
.num_adr = ARRAY_SIZE(rt712_vb_0_single_adr),
404
.adr_d = rt712_vb_0_single_adr,
405
},
406
{}
407
};
408
409
static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = {
410
{ /* Jack Playback Endpoint */
411
.num = 0,
412
.aggregated = 0,
413
.group_position = 0,
414
.group_id = 0,
415
},
416
{ /* DMIC Capture Endpoint */
417
.num = 1,
418
.aggregated = 0,
419
.group_position = 0,
420
.group_id = 0,
421
},
422
{ /* Jack Capture Endpoint */
423
.num = 2,
424
.aggregated = 0,
425
.group_position = 0,
426
.group_id = 0,
427
},
428
{ /* Speaker Playback Endpoint */
429
.num = 3,
430
.aggregated = 0,
431
.group_position = 0,
432
.group_id = 0,
433
},
434
};
435
436
static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = {
437
{
438
.adr = 0x00003001FA424301ull,
439
.num_endpoints = ARRAY_SIZE(cs42l43_endpoints),
440
.endpoints = cs42l43_endpoints,
441
.name_prefix = "cs42l43"
442
}
443
};
444
445
/* CS42L43 - speaker DAI aggregated with 4 amps */
446
static const struct snd_soc_acpi_endpoint cs42l43_4amp_spkagg_endpoints[] = {
447
{ /* Jack Playback Endpoint */
448
.num = 0,
449
.aggregated = 0,
450
.group_position = 0,
451
.group_id = 0,
452
},
453
{ /* DMIC Capture Endpoint */
454
.num = 1,
455
.aggregated = 0,
456
.group_position = 0,
457
.group_id = 0,
458
},
459
{ /* Jack Capture Endpoint */
460
.num = 2,
461
.aggregated = 0,
462
.group_position = 0,
463
.group_id = 0,
464
},
465
{ /* Speaker Playback Endpoint */
466
.num = 3,
467
.aggregated = 1,
468
.group_position = 4,
469
.group_id = 1,
470
},
471
};
472
473
/* CS42L43 on link3 aggregated with 4 amps */
474
static const struct snd_soc_acpi_adr_device cs42l43_l3_4amp_spkagg_adr[] = {
475
{
476
.adr = 0x00033001FA424301ull,
477
.num_endpoints = ARRAY_SIZE(cs42l43_4amp_spkagg_endpoints),
478
.endpoints = cs42l43_4amp_spkagg_endpoints,
479
.name_prefix = "cs42l43"
480
}
481
};
482
483
static const struct snd_soc_acpi_endpoint cs35l56_l_fb_endpoints[] = {
484
{ /* Speaker Playback Endpoint */
485
.num = 0,
486
.aggregated = 1,
487
.group_position = 0,
488
.group_id = 1,
489
},
490
{ /* Feedback Capture Endpoint */
491
.num = 1,
492
.aggregated = 1,
493
.group_position = 0,
494
.group_id = 2,
495
},
496
};
497
498
static const struct snd_soc_acpi_endpoint cs35l56_r_fb_endpoints[] = {
499
{ /* Speaker Playback Endpoint */
500
.num = 0,
501
.aggregated = 1,
502
.group_position = 1,
503
.group_id = 1,
504
},
505
{ /* Feedback Capture Endpoint */
506
.num = 1,
507
.aggregated = 1,
508
.group_position = 1,
509
.group_id = 2,
510
},
511
};
512
513
static const struct snd_soc_acpi_endpoint cs35l56_2_fb_endpoints[] = {
514
{ /* Speaker Playback Endpoint */
515
.num = 0,
516
.aggregated = 1,
517
.group_position = 2,
518
.group_id = 1,
519
},
520
{ /* Feedback Capture Endpoint */
521
.num = 1,
522
.aggregated = 1,
523
.group_position = 2,
524
.group_id = 2,
525
},
526
};
527
528
static const struct snd_soc_acpi_endpoint cs35l56_3_fb_endpoints[] = {
529
{ /* Speaker Playback Endpoint */
530
.num = 0,
531
.aggregated = 1,
532
.group_position = 3,
533
.group_id = 1,
534
},
535
{ /* Feedback Capture Endpoint */
536
.num = 1,
537
.aggregated = 1,
538
.group_position = 3,
539
.group_id = 2,
540
},
541
};
542
543
static const struct snd_soc_acpi_endpoint cs35l56_4_fb_endpoints[] = {
544
{ /* Speaker Playback Endpoint */
545
.num = 0,
546
.aggregated = 1,
547
.group_position = 4,
548
.group_id = 1,
549
},
550
{ /* Feedback Capture Endpoint */
551
.num = 1,
552
.aggregated = 1,
553
.group_position = 4,
554
.group_id = 2,
555
},
556
};
557
558
static const struct snd_soc_acpi_endpoint cs35l56_5_fb_endpoints[] = {
559
{ /* Speaker Playback Endpoint */
560
.num = 0,
561
.aggregated = 1,
562
.group_position = 5,
563
.group_id = 1,
564
},
565
{ /* Feedback Capture Endpoint */
566
.num = 1,
567
.aggregated = 1,
568
.group_position = 5,
569
.group_id = 2,
570
},
571
};
572
573
static const struct snd_soc_acpi_endpoint cs35l56_6_fb_endpoints[] = {
574
{ /* Speaker Playback Endpoint */
575
.num = 0,
576
.aggregated = 1,
577
.group_position = 6,
578
.group_id = 1,
579
},
580
{ /* Feedback Capture Endpoint */
581
.num = 1,
582
.aggregated = 1,
583
.group_position = 6,
584
.group_id = 2,
585
},
586
};
587
588
static const struct snd_soc_acpi_endpoint cs35l56_7_fb_endpoints[] = {
589
{ /* Speaker Playback Endpoint */
590
.num = 0,
591
.aggregated = 1,
592
.group_position = 7,
593
.group_id = 1,
594
},
595
{ /* Feedback Capture Endpoint */
596
.num = 1,
597
.aggregated = 1,
598
.group_position = 7,
599
.group_id = 2,
600
},
601
};
602
603
static const struct snd_soc_acpi_adr_device cs35l56_0_adr[] = {
604
{
605
.adr = 0x00003301FA355601ull,
606
.num_endpoints = 1,
607
.endpoints = &spk_l_endpoint,
608
.name_prefix = "AMP1"
609
},
610
{
611
.adr = 0x00003201FA355601ull,
612
.num_endpoints = 1,
613
.endpoints = &spk_2_endpoint,
614
.name_prefix = "AMP2"
615
}
616
};
617
618
static const struct snd_soc_acpi_adr_device cs35l56_1_adr[] = {
619
{
620
.adr = 0x00013701FA355601ull,
621
.num_endpoints = 1,
622
.endpoints = &spk_r_endpoint,
623
.name_prefix = "AMP3"
624
},
625
{
626
.adr = 0x00013601FA355601ull,
627
.num_endpoints = 1,
628
.endpoints = &spk_3_endpoint,
629
.name_prefix = "AMP4"
630
}
631
};
632
633
static const struct snd_soc_acpi_adr_device cs35l56_2_adr[] = {
634
{
635
.adr = 0x00023301FA355601ull,
636
.num_endpoints = 1,
637
.endpoints = &spk_l_endpoint,
638
.name_prefix = "AMP1"
639
},
640
{
641
.adr = 0x00023201FA355601ull,
642
.num_endpoints = 1,
643
.endpoints = &spk_2_endpoint,
644
.name_prefix = "AMP2"
645
}
646
};
647
648
static const struct snd_soc_acpi_adr_device cs35l56_0_fb_adr[] = {
649
{
650
.adr = 0x00003301FA355601ull,
651
.num_endpoints = ARRAY_SIZE(cs35l56_l_fb_endpoints),
652
.endpoints = cs35l56_l_fb_endpoints,
653
.name_prefix = "AMP1"
654
},
655
{
656
.adr = 0x00003201FA355601ull,
657
.num_endpoints = ARRAY_SIZE(cs35l56_2_fb_endpoints),
658
.endpoints = cs35l56_2_fb_endpoints,
659
.name_prefix = "AMP2"
660
},
661
{
662
.adr = 0x00003101FA355601ull,
663
.num_endpoints = ARRAY_SIZE(cs35l56_4_fb_endpoints),
664
.endpoints = cs35l56_4_fb_endpoints,
665
.name_prefix = "AMP3"
666
},
667
{
668
.adr = 0x00003001FA355601ull,
669
.num_endpoints = ARRAY_SIZE(cs35l56_6_fb_endpoints),
670
.endpoints = cs35l56_6_fb_endpoints,
671
.name_prefix = "AMP4"
672
},
673
};
674
675
static const struct snd_soc_acpi_adr_device cs35l56_1_fb_adr[] = {
676
{
677
.adr = 0x00013701FA355601ull,
678
.num_endpoints = ARRAY_SIZE(cs35l56_r_fb_endpoints),
679
.endpoints = cs35l56_r_fb_endpoints,
680
.name_prefix = "AMP8"
681
},
682
{
683
.adr = 0x00013601FA355601ull,
684
.num_endpoints = ARRAY_SIZE(cs35l56_3_fb_endpoints),
685
.endpoints = cs35l56_3_fb_endpoints,
686
.name_prefix = "AMP7"
687
},
688
{
689
.adr = 0x00013501FA355601ull,
690
.num_endpoints = ARRAY_SIZE(cs35l56_5_fb_endpoints),
691
.endpoints = cs35l56_5_fb_endpoints,
692
.name_prefix = "AMP6"
693
},
694
{
695
.adr = 0x00013401FA355601ull,
696
.num_endpoints = ARRAY_SIZE(cs35l56_7_fb_endpoints),
697
.endpoints = cs35l56_7_fb_endpoints,
698
.name_prefix = "AMP5"
699
},
700
};
701
702
static const struct snd_soc_acpi_adr_device cs35l56_2_r_adr[] = {
703
{
704
.adr = 0x00023201FA355601ull,
705
.num_endpoints = ARRAY_SIZE(cs35l56_r_fb_endpoints),
706
.endpoints = cs35l56_r_fb_endpoints,
707
.name_prefix = "AMP3"
708
},
709
{
710
.adr = 0x00023301FA355601ull,
711
.num_endpoints = ARRAY_SIZE(cs35l56_3_fb_endpoints),
712
.endpoints = cs35l56_3_fb_endpoints,
713
.name_prefix = "AMP4"
714
}
715
716
};
717
718
static const struct snd_soc_acpi_adr_device cs35l56_3_l_adr[] = {
719
{
720
.adr = 0x00033001fa355601ull,
721
.num_endpoints = ARRAY_SIZE(cs35l56_l_fb_endpoints),
722
.endpoints = cs35l56_l_fb_endpoints,
723
.name_prefix = "AMP1"
724
},
725
{
726
.adr = 0x00033101fa355601ull,
727
.num_endpoints = ARRAY_SIZE(cs35l56_2_fb_endpoints),
728
.endpoints = cs35l56_2_fb_endpoints,
729
.name_prefix = "AMP2"
730
}
731
};
732
733
static const struct snd_soc_acpi_adr_device cs35l63_1_fb_adr[] = {
734
{
735
.adr = 0x00013001FA356301ull,
736
.num_endpoints = ARRAY_SIZE(cs35l56_l_fb_endpoints),
737
.endpoints = cs35l56_l_fb_endpoints,
738
.name_prefix = "AMP1"
739
},
740
};
741
742
static const struct snd_soc_acpi_adr_device cs35l63_3_fb_adr[] = {
743
{
744
.adr = 0x00033101FA356301ull,
745
.num_endpoints = ARRAY_SIZE(cs35l56_r_fb_endpoints),
746
.endpoints = cs35l56_r_fb_endpoints,
747
.name_prefix = "AMP2"
748
},
749
};
750
751
static const struct snd_soc_acpi_link_adr rt5682_link2_max98373_link0[] = {
752
/* Expected order: jack -> amp */
753
{
754
.mask = BIT(2),
755
.num_adr = ARRAY_SIZE(rt5682_2_adr),
756
.adr_d = rt5682_2_adr,
757
},
758
{
759
.mask = BIT(0),
760
.num_adr = ARRAY_SIZE(mx8373_0_adr),
761
.adr_d = mx8373_0_adr,
762
},
763
{}
764
};
765
766
static const struct snd_soc_acpi_link_adr mtl_rvp[] = {
767
{
768
.mask = BIT(0),
769
.num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
770
.adr_d = rt711_sdca_0_adr,
771
},
772
{}
773
};
774
775
static const struct snd_soc_acpi_link_adr mtl_rt722_only[] = {
776
{
777
.mask = BIT(0),
778
.num_adr = ARRAY_SIZE(rt722_0_single_adr),
779
.adr_d = rt722_0_single_adr,
780
},
781
{}
782
};
783
784
static const struct snd_soc_acpi_link_adr mtl_3_in_1_sdca[] = {
785
{
786
.mask = BIT(0),
787
.num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
788
.adr_d = rt711_sdca_0_adr,
789
},
790
{
791
.mask = BIT(2),
792
.num_adr = ARRAY_SIZE(rt1316_2_group1_adr),
793
.adr_d = rt1316_2_group1_adr,
794
},
795
{
796
.mask = BIT(3),
797
.num_adr = ARRAY_SIZE(rt1316_3_group1_adr),
798
.adr_d = rt1316_3_group1_adr,
799
},
800
{
801
.mask = BIT(1),
802
.num_adr = ARRAY_SIZE(rt714_1_adr),
803
.adr_d = rt714_1_adr,
804
},
805
{}
806
};
807
808
static const struct snd_soc_acpi_link_adr mtl_sdw_rt1318_l12_rt714_l0[] = {
809
{
810
.mask = BIT(1),
811
.num_adr = ARRAY_SIZE(rt1318_1_group1_adr),
812
.adr_d = rt1318_1_group1_adr,
813
},
814
{
815
.mask = BIT(2),
816
.num_adr = ARRAY_SIZE(rt1318_2_group1_adr),
817
.adr_d = rt1318_2_group1_adr,
818
},
819
{
820
.mask = BIT(0),
821
.num_adr = ARRAY_SIZE(rt714_0_adr),
822
.adr_d = rt714_0_adr,
823
},
824
{}
825
};
826
827
static const struct snd_soc_acpi_link_adr mtl_rt713_l0_rt1316_l12_rt1713_l3[] = {
828
{
829
.mask = BIT(0),
830
.num_adr = ARRAY_SIZE(rt713_0_single_adr),
831
.adr_d = rt713_0_single_adr,
832
},
833
{
834
.mask = BIT(1),
835
.num_adr = ARRAY_SIZE(rt1316_1_group2_adr),
836
.adr_d = rt1316_1_group2_adr,
837
},
838
{
839
.mask = BIT(2),
840
.num_adr = ARRAY_SIZE(rt1316_2_group2_adr),
841
.adr_d = rt1316_2_group2_adr,
842
},
843
{
844
.mask = BIT(3),
845
.num_adr = ARRAY_SIZE(rt1713_3_single_adr),
846
.adr_d = rt1713_3_single_adr,
847
},
848
{}
849
};
850
851
static const struct snd_soc_acpi_link_adr mtl_rt713_l0_rt1318_l1_rt1713_l3[] = {
852
{
853
.mask = BIT(0),
854
.num_adr = ARRAY_SIZE(rt713_0_single_adr),
855
.adr_d = rt713_0_single_adr,
856
},
857
{
858
.mask = BIT(1),
859
.num_adr = ARRAY_SIZE(rt1318_1_single_adr),
860
.adr_d = rt1318_1_single_adr,
861
},
862
{
863
.mask = BIT(3),
864
.num_adr = ARRAY_SIZE(rt1713_3_single_adr),
865
.adr_d = rt1713_3_single_adr,
866
},
867
{}
868
};
869
870
static const struct snd_soc_acpi_link_adr mtl_rt713_l0_rt1318_l12_rt1713_l3[] = {
871
{
872
.mask = BIT(0),
873
.num_adr = ARRAY_SIZE(rt713_0_single_adr),
874
.adr_d = rt713_0_single_adr,
875
},
876
{
877
.mask = BIT(1),
878
.num_adr = ARRAY_SIZE(rt1318_1_group1_adr),
879
.adr_d = rt1318_1_group1_adr,
880
},
881
{
882
.mask = BIT(2),
883
.num_adr = ARRAY_SIZE(rt1318_2_group1_adr),
884
.adr_d = rt1318_2_group1_adr,
885
},
886
{
887
.mask = BIT(3),
888
.num_adr = ARRAY_SIZE(rt1713_3_single_adr),
889
.adr_d = rt1713_3_single_adr,
890
},
891
{}
892
};
893
894
static const struct snd_soc_acpi_link_adr mtl_rt713_l0_rt1316_l12[] = {
895
{
896
.mask = BIT(0),
897
.num_adr = ARRAY_SIZE(rt713_0_single_adr),
898
.adr_d = rt713_0_single_adr,
899
},
900
{
901
.mask = BIT(1),
902
.num_adr = ARRAY_SIZE(rt1316_1_group2_adr),
903
.adr_d = rt1316_1_group2_adr,
904
},
905
{
906
.mask = BIT(2),
907
.num_adr = ARRAY_SIZE(rt1316_2_group2_adr),
908
.adr_d = rt1316_2_group2_adr,
909
},
910
{}
911
};
912
913
static const struct snd_soc_acpi_link_adr mtl_rt711_l0_rt1316_l3[] = {
914
{
915
.mask = BIT(0),
916
.num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
917
.adr_d = rt711_sdca_0_adr,
918
},
919
{
920
.mask = BIT(3),
921
.num_adr = ARRAY_SIZE(rt1316_3_single_adr),
922
.adr_d = rt1316_3_single_adr,
923
},
924
{}
925
};
926
927
static const struct snd_soc_acpi_adr_device mx8363_2_adr[] = {
928
{
929
.adr = 0x000230019F836300ull,
930
.num_endpoints = 1,
931
.endpoints = &spk_l_endpoint,
932
.name_prefix = "Left"
933
},
934
{
935
.adr = 0x000231019F836300ull,
936
.num_endpoints = 1,
937
.endpoints = &spk_r_endpoint,
938
.name_prefix = "Right"
939
}
940
};
941
942
static const struct snd_soc_acpi_adr_device cs42l42_0_adr[] = {
943
{
944
.adr = 0x00001001FA424200ull,
945
.num_endpoints = 1,
946
.endpoints = &single_endpoint,
947
.name_prefix = "cs42l42"
948
}
949
};
950
951
static const struct snd_soc_acpi_link_adr cs42l42_link0_max98363_link2[] = {
952
/* Expected order: jack -> amp */
953
{
954
.mask = BIT(0),
955
.num_adr = ARRAY_SIZE(cs42l42_0_adr),
956
.adr_d = cs42l42_0_adr,
957
},
958
{
959
.mask = BIT(2),
960
.num_adr = ARRAY_SIZE(mx8363_2_adr),
961
.adr_d = mx8363_2_adr,
962
},
963
{}
964
};
965
966
static const struct snd_soc_acpi_link_adr mtl_cs42l43_l0[] = {
967
{
968
.mask = BIT(0),
969
.num_adr = ARRAY_SIZE(cs42l43_0_adr),
970
.adr_d = cs42l43_0_adr,
971
},
972
{}
973
};
974
975
static const struct snd_soc_acpi_link_adr mtl_cs42l43_cs35l56[] = {
976
{
977
.mask = BIT(0),
978
.num_adr = ARRAY_SIZE(cs42l43_0_adr),
979
.adr_d = cs42l43_0_adr,
980
},
981
{
982
.mask = BIT(1),
983
.num_adr = ARRAY_SIZE(cs35l56_1_adr),
984
.adr_d = cs35l56_1_adr,
985
},
986
{
987
.mask = BIT(2),
988
.num_adr = ARRAY_SIZE(cs35l56_2_adr),
989
.adr_d = cs35l56_2_adr,
990
},
991
{}
992
};
993
994
static const struct snd_soc_acpi_link_adr cs42l43_link0_cs35l56_link2_link3[] = {
995
/* Expected order: jack -> amp */
996
{
997
.mask = BIT(0),
998
.num_adr = ARRAY_SIZE(cs42l43_0_adr),
999
.adr_d = cs42l43_0_adr,
1000
},
1001
{
1002
.mask = BIT(2),
1003
.num_adr = ARRAY_SIZE(cs35l56_2_r_adr),
1004
.adr_d = cs35l56_2_r_adr,
1005
},
1006
{
1007
.mask = BIT(3),
1008
.num_adr = ARRAY_SIZE(cs35l56_3_l_adr),
1009
.adr_d = cs35l56_3_l_adr,
1010
},
1011
{}
1012
};
1013
1014
static const struct snd_soc_acpi_link_adr cs42l43_link3_cs35l56_x4_link0_link1_spkagg[] = {
1015
/* Expected order: jack -> amp */
1016
{
1017
.mask = BIT(3),
1018
.num_adr = ARRAY_SIZE(cs42l43_l3_4amp_spkagg_adr),
1019
.adr_d = cs42l43_l3_4amp_spkagg_adr,
1020
},
1021
{
1022
.mask = BIT(1),
1023
.num_adr = 2,
1024
.adr_d = cs35l56_1_adr,
1025
},
1026
{
1027
.mask = BIT(0),
1028
.num_adr = 2,
1029
.adr_d = cs35l56_0_adr,
1030
},
1031
{}
1032
};
1033
1034
static const struct snd_soc_acpi_link_adr mtl_cs35l56_x8_link0_link1_fb[] = {
1035
{
1036
.mask = BIT(1),
1037
.num_adr = ARRAY_SIZE(cs35l56_1_fb_adr),
1038
.adr_d = cs35l56_1_fb_adr,
1039
},
1040
{
1041
.mask = BIT(0),
1042
.num_adr = ARRAY_SIZE(cs35l56_0_fb_adr),
1043
.adr_d = cs35l56_0_fb_adr,
1044
},
1045
{}
1046
};
1047
1048
static const struct snd_soc_acpi_link_adr mtl_cs35l63_x2_link1_link3_fb[] = {
1049
{
1050
.mask = BIT(3),
1051
.num_adr = ARRAY_SIZE(cs35l63_3_fb_adr),
1052
.adr_d = cs35l63_3_fb_adr,
1053
},
1054
{
1055
.mask = BIT(1),
1056
.num_adr = ARRAY_SIZE(cs35l63_1_fb_adr),
1057
.adr_d = cs35l63_1_fb_adr,
1058
},
1059
{}
1060
};
1061
1062
/* this table is used when there is no I2S codec present */
1063
struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
1064
/* mockup tests need to be first */
1065
{
1066
.link_mask = GENMASK(3, 0),
1067
.links = sdw_mockup_headset_2amps_mic,
1068
.drv_name = "sof_sdw",
1069
.sof_tplg_filename = "sof-mtl-rt711-rt1308-rt715.tplg",
1070
},
1071
{
1072
.link_mask = BIT(0) | BIT(1) | BIT(3),
1073
.links = sdw_mockup_headset_1amp_mic,
1074
.drv_name = "sof_sdw",
1075
.sof_tplg_filename = "sof-mtl-rt711-rt1308-mono-rt715.tplg",
1076
},
1077
{
1078
.link_mask = GENMASK(2, 0),
1079
.links = sdw_mockup_mic_headset_1amp,
1080
.drv_name = "sof_sdw",
1081
.sof_tplg_filename = "sof-mtl-rt715-rt711-rt1308-mono.tplg",
1082
},
1083
{
1084
.link_mask = GENMASK(3, 0),
1085
.links = mtl_rt713_l0_rt1316_l12_rt1713_l3,
1086
.drv_name = "sof_sdw",
1087
.sof_tplg_filename = "sof-mtl-rt713-l0-rt1316-l12-rt1713-l3.tplg",
1088
},
1089
{
1090
.link_mask = GENMASK(3, 0),
1091
.links = mtl_rt713_l0_rt1318_l12_rt1713_l3,
1092
.drv_name = "sof_sdw",
1093
.sof_tplg_filename = "sof-mtl-rt713-l0-rt1318-l12-rt1713-l3.tplg",
1094
},
1095
{
1096
.link_mask = BIT(0) | BIT(1) | BIT(3),
1097
.links = mtl_rt713_l0_rt1318_l1_rt1713_l3,
1098
.drv_name = "sof_sdw",
1099
.sof_tplg_filename = "sof-mtl-rt713-l0-rt1318-l1-rt1713-l3.tplg",
1100
},
1101
{
1102
.link_mask = GENMASK(2, 0),
1103
.links = mtl_rt713_l0_rt1316_l12,
1104
.drv_name = "sof_sdw",
1105
.sof_tplg_filename = "sof-mtl-rt713-l0-rt1316-l12.tplg",
1106
},
1107
{
1108
.link_mask = BIT(3) | BIT(0),
1109
.links = mtl_712_l0_1712_l3,
1110
.drv_name = "sof_sdw",
1111
.sof_tplg_filename = "sof-mtl-rt712-l0-rt1712-l3.tplg",
1112
},
1113
{
1114
.link_mask = BIT(0),
1115
.links = mtl_712_vb_l0,
1116
.drv_name = "sof_sdw",
1117
.machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
1118
.sof_tplg_filename = "sof-mtl-rt712-vb-l0.tplg",
1119
.get_function_tplg_files = sof_sdw_get_tplg_files,
1120
},
1121
{
1122
.link_mask = BIT(0),
1123
.links = mtl_712_l0,
1124
.drv_name = "sof_sdw",
1125
.sof_tplg_filename = "sof-mtl-rt712-l0.tplg",
1126
.get_function_tplg_files = sof_sdw_get_tplg_files,
1127
},
1128
{
1129
.link_mask = GENMASK(2, 0),
1130
.links = mtl_sdw_rt1318_l12_rt714_l0,
1131
.drv_name = "sof_sdw",
1132
.sof_tplg_filename = "sof-mtl-rt1318-l12-rt714-l0.tplg"
1133
},
1134
{
1135
.link_mask = BIT(0) | BIT(2) | BIT(3),
1136
.links = cs42l43_link0_cs35l56_link2_link3,
1137
.drv_name = "sof_sdw",
1138
.sof_tplg_filename = "sof-mtl-cs42l43-l0-cs35l56-l23.tplg",
1139
.get_function_tplg_files = sof_sdw_get_tplg_files,
1140
},
1141
{
1142
.link_mask = BIT(0) | BIT(1) | BIT(3),
1143
.links = cs42l43_link3_cs35l56_x4_link0_link1_spkagg,
1144
.drv_name = "sof_sdw",
1145
.sof_tplg_filename = "sof-mtl-cs42l43-l3-cs35l56-l01-spkagg.tplg",
1146
.get_function_tplg_files = sof_sdw_get_tplg_files,
1147
},
1148
{
1149
.link_mask = GENMASK(2, 0),
1150
.links = mtl_cs42l43_cs35l56,
1151
.drv_name = "sof_sdw",
1152
.sof_tplg_filename = "sof-mtl-cs42l43-l0-cs35l56-l12.tplg",
1153
.get_function_tplg_files = sof_sdw_get_tplg_files,
1154
},
1155
{
1156
.link_mask = BIT(0) | BIT(1),
1157
.links = mtl_cs35l56_x8_link0_link1_fb,
1158
.drv_name = "sof_sdw",
1159
.sof_tplg_filename = "sof-mtl-cs35l56-l01-fb8.tplg",
1160
.get_function_tplg_files = sof_sdw_get_tplg_files,
1161
},
1162
{
1163
.link_mask = BIT(0),
1164
.links = mtl_cs42l43_l0,
1165
.drv_name = "sof_sdw",
1166
.sof_tplg_filename = "sof-mtl-cs42l43-l0.tplg",
1167
.get_function_tplg_files = sof_sdw_get_tplg_files,
1168
},
1169
{
1170
.link_mask = BIT(1) | BIT(3),
1171
.links = mtl_cs35l63_x2_link1_link3_fb,
1172
.drv_name = "sof_sdw",
1173
.sof_tplg_filename = "sof-mtl-cs35l56-l01-fb8.tplg",
1174
},
1175
{
1176
.link_mask = GENMASK(3, 0),
1177
.links = mtl_3_in_1_sdca,
1178
.drv_name = "sof_sdw",
1179
.sof_tplg_filename = "sof-mtl-rt711-l0-rt1316-l23-rt714-l1.tplg",
1180
},
1181
{
1182
.link_mask = 0x9, /* 2 active links required */
1183
.links = mtl_rt711_l0_rt1316_l3,
1184
.drv_name = "sof_sdw",
1185
.sof_tplg_filename = "sof-mtl-rt711-l0-rt1316-l3.tplg",
1186
},
1187
{
1188
.link_mask = BIT(0),
1189
.links = mtl_rt722_only,
1190
.drv_name = "sof_sdw",
1191
.sof_tplg_filename = "sof-mtl-rt722-l0.tplg",
1192
.get_function_tplg_files = sof_sdw_get_tplg_files,
1193
},
1194
{
1195
.link_mask = BIT(0),
1196
.links = mtl_rvp,
1197
.drv_name = "sof_sdw",
1198
.sof_tplg_filename = "sof-mtl-rt711.tplg",
1199
},
1200
{
1201
.link_mask = BIT(0) | BIT(2),
1202
.links = rt5682_link2_max98373_link0,
1203
.drv_name = "sof_sdw",
1204
.sof_tplg_filename = "sof-mtl-sdw-rt5682-l2-max98373-l0.tplg",
1205
},
1206
{
1207
.link_mask = BIT(0) | BIT(2),
1208
.links = cs42l42_link0_max98363_link2,
1209
.drv_name = "sof_sdw",
1210
.sof_tplg_filename = "sof-mtl-sdw-cs42l42-l0-max98363-l2.tplg",
1211
},
1212
{},
1213
};
1214
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_mtl_sdw_machines);
1215
1216
MODULE_IMPORT_NS("SND_SOC_ACPI_INTEL_SDCA_QUIRKS");
1217
1218