1 // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 3 * soc-apci-intel-adl-match.c - tables and sup 4 * 5 * Copyright (c) 2020, Intel Corporation. 6 */ 7 8 #include <sound/soc-acpi.h> 9 #include <sound/soc-acpi-intel-match.h> 10 #include <sound/soc-acpi-intel-ssp-common.h> 11 12 static const struct snd_soc_acpi_codecs essx_8 13 .num_codecs = 3, 14 .codecs = { "ESSX8316", "ESSX8326", "E 15 }; 16 17 static const struct snd_soc_acpi_endpoint sing 18 .num = 0, 19 .aggregated = 0, 20 .group_position = 0, 21 .group_id = 0, 22 }; 23 24 static const struct snd_soc_acpi_endpoint spk_ 25 .num = 0, 26 .aggregated = 1, 27 .group_position = 0, 28 .group_id = 1, 29 }; 30 31 static const struct snd_soc_acpi_endpoint spk_ 32 .num = 0, 33 .aggregated = 1, 34 .group_position = 1, 35 .group_id = 1, 36 }; 37 38 static const struct snd_soc_acpi_endpoint spk_ 39 .num = 0, 40 .aggregated = 1, 41 .group_position = 2, 42 .group_id = 1, 43 }; 44 45 static const struct snd_soc_acpi_endpoint spk_ 46 .num = 0, 47 .aggregated = 1, 48 .group_position = 3, 49 .group_id = 1, 50 }; 51 52 static const struct snd_soc_acpi_adr_device cs 53 { 54 .adr = 0x00023201FA355601ull, 55 .num_endpoints = 1, 56 .endpoints = &spk_r_endpoint, 57 .name_prefix = "AMP3" 58 }, 59 { 60 .adr = 0x00023301FA355601ull, 61 .num_endpoints = 1, 62 .endpoints = &spk_3_endpoint, 63 .name_prefix = "AMP4" 64 } 65 }; 66 67 static const struct snd_soc_acpi_adr_device cs 68 { 69 .adr = 0x00033001fa355601ull, 70 .num_endpoints = 1, 71 .endpoints = &spk_l_endpoint, 72 .name_prefix = "AMP1" 73 }, 74 { 75 .adr = 0x00033101fa355601ull, 76 .num_endpoints = 1, 77 .endpoints = &spk_2_endpoint, 78 .name_prefix = "AMP2" 79 } 80 }; 81 82 static const struct snd_soc_acpi_endpoint cs42 83 { /* Jack Playback Endpoint */ 84 .num = 0, 85 .aggregated = 0, 86 .group_position = 0, 87 .group_id = 0, 88 }, 89 { /* DMIC Capture Endpoint */ 90 .num = 1, 91 .aggregated = 0, 92 .group_position = 0, 93 .group_id = 0, 94 }, 95 { /* Jack Capture Endpoint */ 96 .num = 2, 97 .aggregated = 0, 98 .group_position = 0, 99 .group_id = 0, 100 }, 101 { /* Speaker Playback Endpoint */ 102 .num = 3, 103 .aggregated = 0, 104 .group_position = 0, 105 .group_id = 0, 106 }, 107 }; 108 109 static const struct snd_soc_acpi_adr_device cs 110 { 111 .adr = 0x00003001FA424301ull, 112 .num_endpoints = ARRAY_SIZE(cs 113 .endpoints = cs42l43_endpoints 114 .name_prefix = "cs42l43" 115 } 116 }; 117 118 static const struct snd_soc_acpi_adr_device rt 119 { 120 .adr = 0x000020025D071100ull, 121 .num_endpoints = 1, 122 .endpoints = &single_endpoint, 123 .name_prefix = "rt711" 124 } 125 }; 126 127 static const struct snd_soc_acpi_adr_device rt 128 { 129 .adr = 0x000120025D130800ull, 130 .num_endpoints = 1, 131 .endpoints = &spk_l_endpoint, 132 .name_prefix = "rt1308-1" 133 } 134 }; 135 136 static const struct snd_soc_acpi_adr_device rt 137 { 138 .adr = 0x000220025D130800ull, 139 .num_endpoints = 1, 140 .endpoints = &spk_r_endpoint, 141 .name_prefix = "rt1308-2" 142 } 143 }; 144 145 static const struct snd_soc_acpi_adr_device rt 146 { 147 .adr = 0x000320025D071500ull, 148 .num_endpoints = 1, 149 .endpoints = &single_endpoint, 150 .name_prefix = "rt715" 151 } 152 }; 153 154 static const struct snd_soc_acpi_adr_device rt 155 { 156 .adr = 0x000030025D071101ull, 157 .num_endpoints = 1, 158 .endpoints = &single_endpoint, 159 .name_prefix = "rt711" 160 } 161 }; 162 163 static const struct snd_soc_acpi_adr_device rt 164 { 165 .adr = 0x000230025D071101ull, 166 .num_endpoints = 1, 167 .endpoints = &single_endpoint, 168 .name_prefix = "rt711" 169 } 170 }; 171 172 static const struct snd_soc_acpi_adr_device rt 173 { 174 .adr = 0x000131025D131601ull, 175 .num_endpoints = 1, 176 .endpoints = &spk_l_endpoint, 177 .name_prefix = "rt1316-1" 178 } 179 }; 180 181 static const struct snd_soc_acpi_adr_device rt 182 { 183 .adr = 0x000230025D131601ull, 184 .num_endpoints = 1, 185 .endpoints = &spk_r_endpoint, 186 .name_prefix = "rt1316-2" 187 } 188 }; 189 190 static const struct snd_soc_acpi_adr_device rt 191 { 192 .adr = 0x000330025D131601ull, 193 .num_endpoints = 1, 194 .endpoints = &spk_r_endpoint, 195 .name_prefix = "rt1316-2" 196 } 197 }; 198 199 static const struct snd_soc_acpi_adr_device rt 200 { 201 .adr = 0x000031025D131601ull, 202 .num_endpoints = 1, 203 .endpoints = &spk_l_endpoint, 204 .name_prefix = "rt1316-1" 205 } 206 }; 207 208 static const struct snd_soc_acpi_adr_device rt 209 { 210 .adr = 0x000130025D131601ull, 211 .num_endpoints = 1, 212 .endpoints = &spk_r_endpoint, 213 .name_prefix = "rt1316-2" 214 } 215 }; 216 217 static const struct snd_soc_acpi_adr_device rt 218 { 219 .adr = 0x000130025D131601ull, 220 .num_endpoints = 1, 221 .endpoints = &single_endpoint, 222 .name_prefix = "rt1316-1" 223 } 224 }; 225 226 static const struct snd_soc_acpi_adr_device rt 227 { 228 .adr = 0x000230025D131601ull, 229 .num_endpoints = 1, 230 .endpoints = &single_endpoint, 231 .name_prefix = "rt1316-1" 232 } 233 }; 234 235 static const struct snd_soc_acpi_adr_device rt 236 { 237 .adr = 0x000330025D131601ull, 238 .num_endpoints = 1, 239 .endpoints = &single_endpoint, 240 .name_prefix = "rt1316-1" 241 } 242 }; 243 244 static const struct snd_soc_acpi_adr_device rt 245 { 246 .adr = 0x000030025D071401ull, 247 .num_endpoints = 1, 248 .endpoints = &single_endpoint, 249 .name_prefix = "rt714" 250 } 251 }; 252 253 static const struct snd_soc_acpi_adr_device rt 254 { 255 .adr = 0x000230025D071401ull, 256 .num_endpoints = 1, 257 .endpoints = &single_endpoint, 258 .name_prefix = "rt714" 259 } 260 }; 261 262 static const struct snd_soc_acpi_adr_device rt 263 { 264 .adr = 0x000330025D071401ull, 265 .num_endpoints = 1, 266 .endpoints = &single_endpoint, 267 .name_prefix = "rt714" 268 } 269 }; 270 271 static const struct snd_soc_acpi_link_adr adl_ 272 { 273 .mask = BIT(0), 274 .num_adr = ARRAY_SIZE(rt711_0_ 275 .adr_d = rt711_0_adr, 276 }, 277 { 278 .mask = BIT(1), 279 .num_adr = ARRAY_SIZE(rt1308_1 280 .adr_d = rt1308_1_group1_adr, 281 }, 282 { 283 .mask = BIT(2), 284 .num_adr = ARRAY_SIZE(rt1308_2 285 .adr_d = rt1308_2_group1_adr, 286 }, 287 { 288 .mask = BIT(3), 289 .num_adr = ARRAY_SIZE(rt715_3_ 290 .adr_d = rt715_3_adr, 291 }, 292 {} 293 }; 294 295 static const struct snd_soc_acpi_link_adr adl_ 296 { 297 .mask = BIT(0), 298 .num_adr = ARRAY_SIZE(rt711_sd 299 .adr_d = rt711_sdca_0_adr, 300 }, 301 { 302 .mask = BIT(1), 303 .num_adr = ARRAY_SIZE(rt1316_1 304 .adr_d = rt1316_1_group1_adr, 305 }, 306 { 307 .mask = BIT(2), 308 .num_adr = ARRAY_SIZE(rt1316_2 309 .adr_d = rt1316_2_group1_adr, 310 }, 311 { 312 .mask = BIT(3), 313 .num_adr = ARRAY_SIZE(rt714_3_ 314 .adr_d = rt714_3_adr, 315 }, 316 {} 317 }; 318 319 static const struct snd_soc_acpi_link_adr adl_ 320 { 321 .mask = BIT(0), 322 .num_adr = ARRAY_SIZE(rt711_sd 323 .adr_d = rt711_sdca_0_adr, 324 }, 325 { 326 .mask = BIT(1), 327 .num_adr = ARRAY_SIZE(rt1316_1 328 .adr_d = rt1316_1_group1_adr, 329 }, 330 { 331 .mask = BIT(2), 332 .num_adr = ARRAY_SIZE(rt714_2_ 333 .adr_d = rt714_2_adr, 334 }, 335 { 336 .mask = BIT(3), 337 .num_adr = ARRAY_SIZE(rt1316_3 338 .adr_d = rt1316_3_group1_adr, 339 }, 340 {} 341 }; 342 343 static const struct snd_soc_acpi_link_adr adl_ 344 { 345 .mask = BIT(2), 346 .num_adr = ARRAY_SIZE(rt711_sd 347 .adr_d = rt711_sdca_2_adr, 348 }, 349 { 350 .mask = BIT(0), 351 .num_adr = ARRAY_SIZE(rt1316_0 352 .adr_d = rt1316_0_group2_adr, 353 }, 354 { 355 .mask = BIT(1), 356 .num_adr = ARRAY_SIZE(rt1316_1 357 .adr_d = rt1316_1_group2_adr, 358 }, 359 { 360 .mask = BIT(3), 361 .num_adr = ARRAY_SIZE(rt714_3_ 362 .adr_d = rt714_3_adr, 363 }, 364 {} 365 }; 366 367 static const struct snd_soc_acpi_link_adr adl_ 368 { 369 .mask = BIT(2), 370 .num_adr = ARRAY_SIZE(rt711_sd 371 .adr_d = rt711_sdca_2_adr, 372 }, 373 { 374 .mask = BIT(0), 375 .num_adr = ARRAY_SIZE(rt1316_0 376 .adr_d = rt1316_0_group2_adr, 377 }, 378 { 379 .mask = BIT(1), 380 .num_adr = ARRAY_SIZE(rt1316_1 381 .adr_d = rt1316_1_group2_adr, 382 }, 383 {} 384 }; 385 386 static const struct snd_soc_acpi_link_adr adl_ 387 { 388 .mask = BIT(1), 389 .num_adr = ARRAY_SIZE(rt1316_1 390 .adr_d = rt1316_1_group1_adr, 391 }, 392 { 393 .mask = BIT(2), 394 .num_adr = ARRAY_SIZE(rt1316_2 395 .adr_d = rt1316_2_group1_adr, 396 }, 397 { 398 .mask = BIT(0), 399 .num_adr = ARRAY_SIZE(rt714_0_ 400 .adr_d = rt714_0_adr, 401 }, 402 {} 403 }; 404 405 static const struct snd_soc_acpi_link_adr adl_ 406 { 407 .mask = BIT(1), 408 .num_adr = ARRAY_SIZE(rt1316_1 409 .adr_d = rt1316_1_single_adr, 410 }, 411 { 412 .mask = BIT(0), 413 .num_adr = ARRAY_SIZE(rt714_0_ 414 .adr_d = rt714_0_adr, 415 }, 416 {} 417 }; 418 419 static const struct snd_soc_acpi_link_adr adl_ 420 { 421 .mask = BIT(2), 422 .num_adr = ARRAY_SIZE(rt1316_2 423 .adr_d = rt1316_2_single_adr, 424 }, 425 { 426 .mask = BIT(3), 427 .num_adr = ARRAY_SIZE(rt714_3_ 428 .adr_d = rt714_3_adr, 429 }, 430 {} 431 }; 432 433 static const struct snd_soc_acpi_link_adr adl_ 434 { 435 .mask = BIT(2), 436 .num_adr = ARRAY_SIZE(rt1316_2 437 .adr_d = rt1316_2_single_adr, 438 }, 439 { 440 .mask = BIT(0), 441 .num_adr = ARRAY_SIZE(rt714_0_ 442 .adr_d = rt714_0_adr, 443 }, 444 {} 445 }; 446 447 static const struct snd_soc_acpi_link_adr adl_ 448 { 449 .mask = BIT(0), 450 .num_adr = ARRAY_SIZE(rt711_sd 451 .adr_d = rt711_sdca_0_adr, 452 }, 453 { 454 .mask = BIT(3), 455 .num_adr = ARRAY_SIZE(rt1316_3 456 .adr_d = rt1316_3_single_adr, 457 }, 458 {} 459 }; 460 461 static const struct snd_soc_acpi_link_adr adl_ 462 { 463 .mask = BIT(0), 464 .num_adr = ARRAY_SIZE(rt711_sd 465 .adr_d = rt711_sdca_0_adr, 466 }, 467 { 468 .mask = BIT(2), 469 .num_adr = ARRAY_SIZE(rt1316_2 470 .adr_d = rt1316_2_single_adr, 471 }, 472 {} 473 }; 474 475 static const struct snd_soc_acpi_adr_device mx 476 { 477 .adr = 0x000223019F837300ull, 478 .num_endpoints = 1, 479 .endpoints = &spk_l_endpoint, 480 .name_prefix = "Left" 481 }, 482 { 483 .adr = 0x000227019F837300ull, 484 .num_endpoints = 1, 485 .endpoints = &spk_r_endpoint, 486 .name_prefix = "Right" 487 } 488 }; 489 490 static const struct snd_soc_acpi_adr_device rt 491 { 492 .adr = 0x000021025D568200ull, 493 .num_endpoints = 1, 494 .endpoints = &single_endpoint, 495 .name_prefix = "rt5682" 496 } 497 }; 498 499 static const struct snd_soc_acpi_link_adr adl_ 500 { 501 .mask = BIT(0), 502 .num_adr = ARRAY_SIZE(cs42l43_ 503 .adr_d = cs42l43_0_adr, 504 }, 505 { 506 .mask = BIT(2), 507 .num_adr = ARRAY_SIZE(cs35l56_ 508 .adr_d = cs35l56_2_r_adr, 509 }, 510 { 511 .mask = BIT(3), 512 .num_adr = ARRAY_SIZE(cs35l56_ 513 .adr_d = cs35l56_3_l_adr, 514 }, 515 {} 516 }; 517 518 static const struct snd_soc_acpi_link_adr adl_ 519 { 520 .mask = BIT(0), 521 .num_adr = ARRAY_SIZE(rt711_0_ 522 .adr_d = rt711_0_adr, 523 }, 524 {} 525 }; 526 527 static const struct snd_soc_acpi_link_adr adlp 528 { 529 .mask = BIT(0), 530 .num_adr = ARRAY_SIZE(rt711_sd 531 .adr_d = rt711_sdca_0_adr, 532 }, 533 {} 534 }; 535 536 static const struct snd_soc_acpi_link_adr adl_ 537 { 538 .mask = BIT(0), 539 .num_adr = ARRAY_SIZE(rt5682_0 540 .adr_d = rt5682_0_adr, 541 }, 542 { 543 .mask = BIT(2), 544 .num_adr = ARRAY_SIZE(mx8373_2 545 .adr_d = mx8373_2_adr, 546 }, 547 {} 548 }; 549 550 static const struct snd_soc_acpi_codecs adl_ma 551 .num_codecs = 1, 552 .codecs = {"MX98357A"} 553 }; 554 555 static const struct snd_soc_acpi_codecs adl_rt 556 .num_codecs = 2, 557 .codecs = {RT5682_ACPI_HID, RT5682S_AC 558 }; 559 560 static const struct snd_soc_acpi_codecs adl_rt 561 .num_codecs = 1, 562 .codecs = {"RTL1019"} 563 }; 564 565 static const struct snd_soc_acpi_codecs adl_lt 566 .num_codecs = 1, 567 .codecs = {"INTC10B0"} 568 }; 569 570 struct snd_soc_acpi_mach snd_soc_acpi_intel_ad 571 { 572 .comp_ids = &adl_rt5682_rt5682 573 .drv_name = "adl_mx98357_rt568 574 .machine_quirk = snd_soc_acpi_ 575 .quirk_data = &adl_max98357a_a 576 .sof_tplg_filename = "sof-adl- 577 }, 578 { 579 .id = "10508825", 580 .drv_name = "adl_rt1019p_8825" 581 .machine_quirk = snd_soc_acpi_ 582 .quirk_data = &adl_rt1019p_amp 583 .sof_tplg_filename = "sof-adl- 584 }, 585 { 586 .comp_ids = &adl_rt5682_rt5682 587 .drv_name = "adl_rt5682_c1_h02 588 .machine_quirk = snd_soc_acpi_ 589 .quirk_data = &adl_lt6911_hdmi 590 .sof_tplg_filename = "sof-adl- 591 }, 592 { 593 .comp_ids = &essx_83x6, 594 .drv_name = "adl_es83x6_c1_h02 595 .machine_quirk = snd_soc_acpi_ 596 .quirk_data = &adl_lt6911_hdmi 597 .sof_tplg_filename = "sof-adl- 598 }, 599 { 600 .comp_ids = &essx_83x6, 601 .drv_name = "sof-essx8336", 602 .sof_tplg_filename = "sof-adl- 603 .tplg_quirk_mask = SND_SOC_ACP 604 SND_SO 605 SND_SO 606 }, 607 /* place boards for each headphone cod 608 * tplg name and machine driver will d 609 */ 610 { 611 .id = CS42L42_ACPI_HID, 612 .drv_name = "adl_cs42l42_def", 613 .sof_tplg_filename = "sof-adl" 614 .tplg_quirk_mask = SND_SOC_ACP 615 SND_SO 616 }, 617 { 618 .id = DA7219_ACPI_HID, 619 .drv_name = "adl_da7219_def", 620 .sof_tplg_filename = "sof-adl" 621 .tplg_quirk_mask = SND_SOC_ACP 622 SND_SO 623 }, 624 { 625 .id = NAU8825_ACPI_HID, 626 .drv_name = "adl_nau8825_def", 627 .sof_tplg_filename = "sof-adl" 628 .tplg_quirk_mask = SND_SOC_ACP 629 SND_SO 630 }, 631 { 632 .id = RT5650_ACPI_HID, 633 .drv_name = "adl_rt5682_def", 634 .sof_tplg_filename = "sof-adl" 635 .tplg_quirk_mask = SND_SOC_ACP 636 SND_SO 637 }, 638 { 639 .comp_ids = &adl_rt5682_rt5682 640 .drv_name = "adl_rt5682_def", 641 .sof_tplg_filename = "sof-adl" 642 .tplg_quirk_mask = SND_SOC_ACP 643 SND_SO 644 }, 645 /* place amp-only boards in the end of 646 { 647 .id = "CSC3541", 648 .drv_name = "adl_cs35l41", 649 .sof_tplg_filename = "sof-adl- 650 }, 651 { 652 .id = "INTC10B0", 653 .drv_name = "adl_lt6911_hdmi_s 654 .sof_tplg_filename = "sof-adl- 655 }, 656 {}, 657 }; 658 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_machi 659 660 /* this table is used when there is no I2S cod 661 struct snd_soc_acpi_mach snd_soc_acpi_intel_ad 662 { 663 .link_mask = BIT(0) | BIT(2) | 664 .links = adl_cs42l43_l0_cs35l5 665 .drv_name = "sof_sdw", 666 .sof_tplg_filename = "sof-adl- 667 }, 668 { 669 .link_mask = 0xF, /* 4 active 670 .links = adl_default, 671 .drv_name = "sof_sdw", 672 .sof_tplg_filename = "sof-adl- 673 }, 674 { 675 .link_mask = 0xF, /* 4 active 676 .links = adl_sdca_default, 677 .drv_name = "sof_sdw", 678 .sof_tplg_filename = "sof-adl- 679 }, 680 { 681 .link_mask = 0xF, /* 4 active 682 .links = adl_sdca_3_in_1, 683 .drv_name = "sof_sdw", 684 .sof_tplg_filename = "sof-adl- 685 }, 686 { 687 .link_mask = 0xF, /* 4 active 688 .links = adl_sdw_rt711_link2_r 689 .drv_name = "sof_sdw", 690 .sof_tplg_filename = "sof-adl- 691 }, 692 { 693 .link_mask = 0x7, /* rt1316 on 694 .links = adl_sdw_rt711_link2_r 695 .drv_name = "sof_sdw", 696 .sof_tplg_filename = "sof-adl- 697 }, 698 { 699 .link_mask = 0xC, /* rt1316 on 700 .links = adl_sdw_rt1316_link2_ 701 .drv_name = "sof_sdw", 702 .sof_tplg_filename = "sof-adl- 703 }, 704 { 705 .link_mask = 0x7, /* rt714 on 706 .links = adl_sdw_rt1316_link12 707 .drv_name = "sof_sdw", 708 .sof_tplg_filename = "sof-adl- 709 }, 710 { 711 .link_mask = 0x3, /* rt1316 on 712 .links = adl_sdw_rt1316_link1_ 713 .drv_name = "sof_sdw", 714 .sof_tplg_filename = "sof-adl- 715 }, 716 { 717 .link_mask = 0x5, /* 2 active 718 .links = adl_sdw_rt1316_link2_ 719 .drv_name = "sof_sdw", 720 .sof_tplg_filename = "sof-adl- 721 }, 722 { 723 .link_mask = 0x9, /* 2 active 724 .links = adl_sdw_rt711_link0_r 725 .drv_name = "sof_sdw", 726 .sof_tplg_filename = "sof-adl- 727 }, 728 { 729 .link_mask = 0x5, /* 2 active 730 .links = adl_sdw_rt711_link0_r 731 .drv_name = "sof_sdw", 732 .sof_tplg_filename = "sof-adl- 733 }, 734 { 735 .link_mask = 0x1, /* link0 req 736 .links = adl_rvp, 737 .drv_name = "sof_sdw", 738 .sof_tplg_filename = "sof-adl- 739 }, 740 { 741 .link_mask = 0x1, /* link0 req 742 .links = adlps_rvp, 743 .drv_name = "sof_sdw", 744 .sof_tplg_filename = "sof-adl- 745 }, 746 { 747 .link_mask = 0x5, /* rt5682 on 748 .links = adl_chromebook_base, 749 .drv_name = "sof_sdw", 750 .sof_tplg_filename = "sof-adl- 751 }, 752 {}, 753 }; 754 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_sdw_m 755
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.