~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/intel/common/soc-acpi-intel-mtl-match.c

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php