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