1 // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 3 * soc-apci-intel-rpl-match.c - tables and sup 4 * 5 * Copyright (c) 2022 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_endpoint sing 13 .num = 0, 14 .aggregated = 0, 15 .group_position = 0, 16 .group_id = 0, 17 }; 18 19 static const struct snd_soc_acpi_endpoint spk_ 20 .num = 0, 21 .aggregated = 1, 22 .group_position = 0, 23 .group_id = 1, 24 }; 25 26 static const struct snd_soc_acpi_endpoint spk_ 27 .num = 0, 28 .aggregated = 1, 29 .group_position = 1, 30 .group_id = 1, 31 }; 32 33 static const struct snd_soc_acpi_endpoint cs42 34 { /* Jack Playback Endpoint */ 35 .num = 0, 36 .aggregated = 0, 37 .group_position = 0, 38 .group_id = 0, 39 }, 40 { /* DMIC Capture Endpoint */ 41 .num = 1, 42 .aggregated = 0, 43 .group_position = 0, 44 .group_id = 0, 45 }, 46 { /* Jack Capture Endpoint */ 47 .num = 2, 48 .aggregated = 0, 49 .group_position = 0, 50 .group_id = 0, 51 }, 52 { /* Speaker Playback Endpoint */ 53 .num = 3, 54 .aggregated = 0, 55 .group_position = 0, 56 .group_id = 0, 57 }, 58 }; 59 60 static const struct snd_soc_acpi_adr_device cs 61 { 62 .adr = 0x00003001FA424301ull, 63 .num_endpoints = ARRAY_SIZE(cs 64 .endpoints = cs42l43_endpoints 65 .name_prefix = "cs42l43" 66 } 67 }; 68 69 static const struct snd_soc_acpi_adr_device rt 70 { 71 .adr = 0x000020025D071100ull, 72 .num_endpoints = 1, 73 .endpoints = &single_endpoint, 74 .name_prefix = "rt711" 75 } 76 }; 77 78 static const struct snd_soc_acpi_link_adr rpl_ 79 { 80 .mask = BIT(0), 81 .num_adr = ARRAY_SIZE(rt711_0_ 82 .adr_d = rt711_0_adr, 83 }, 84 {} 85 }; 86 87 static const struct snd_soc_acpi_adr_device rt 88 { 89 .adr = 0x000030025D071101ull, 90 .num_endpoints = 1, 91 .endpoints = &single_endpoint, 92 .name_prefix = "rt711" 93 } 94 }; 95 96 static const struct snd_soc_acpi_adr_device rt 97 { 98 .adr = 0x000230025D071101ull, 99 .num_endpoints = 1, 100 .endpoints = &single_endpoint, 101 .name_prefix = "rt711" 102 } 103 }; 104 105 static const struct snd_soc_acpi_adr_device rt 106 { 107 .adr = 0x000131025D131601ull, 108 .num_endpoints = 1, 109 .endpoints = &spk_l_endpoint, 110 .name_prefix = "rt1316-1" 111 } 112 }; 113 114 static const struct snd_soc_acpi_adr_device rt 115 { 116 .adr = 0x000230025D131601ull, 117 .num_endpoints = 1, 118 .endpoints = &spk_r_endpoint, 119 .name_prefix = "rt1316-2" 120 } 121 }; 122 123 static const struct snd_soc_acpi_adr_device rt 124 { 125 .adr = 0x000330025D131601ull, 126 .num_endpoints = 1, 127 .endpoints = &spk_r_endpoint, 128 .name_prefix = "rt1316-2" 129 } 130 }; 131 132 static const struct snd_soc_acpi_adr_device rt 133 { 134 .adr = 0x000030025D131601ull, 135 .num_endpoints = 1, 136 .endpoints = &spk_l_endpoint, 137 .name_prefix = "rt1316-1" 138 } 139 }; 140 141 static const struct snd_soc_acpi_adr_device rt 142 { 143 .adr = 0x000131025D131601ull, 144 .num_endpoints = 1, 145 .endpoints = &spk_r_endpoint, 146 .name_prefix = "rt1316-2" 147 } 148 }; 149 150 static const struct snd_soc_acpi_adr_device rt 151 { 152 .adr = 0x000132025D131801ull, 153 .num_endpoints = 1, 154 .endpoints = &spk_l_endpoint, 155 .name_prefix = "rt1318-1" 156 } 157 }; 158 159 static const struct snd_soc_acpi_adr_device rt 160 { 161 .adr = 0x000230025D131801ull, 162 .num_endpoints = 1, 163 .endpoints = &spk_r_endpoint, 164 .name_prefix = "rt1318-2" 165 } 166 }; 167 168 static const struct snd_soc_acpi_adr_device rt 169 { 170 .adr = 0x000030025D071401ull, 171 .num_endpoints = 1, 172 .endpoints = &single_endpoint, 173 .name_prefix = "rt714" 174 } 175 }; 176 177 static const struct snd_soc_acpi_adr_device rt 178 { 179 .adr = 0x000230025D071401ull, 180 .num_endpoints = 1, 181 .endpoints = &single_endpoint, 182 .name_prefix = "rt714" 183 } 184 }; 185 186 static const struct snd_soc_acpi_adr_device rt 187 { 188 .adr = 0x000330025D071401ull, 189 .num_endpoints = 1, 190 .endpoints = &single_endpoint, 191 .name_prefix = "rt714" 192 } 193 }; 194 195 static const struct snd_soc_acpi_link_adr rpl_ 196 { 197 .mask = BIT(0), 198 .num_adr = ARRAY_SIZE(cs42l43_ 199 .adr_d = cs42l43_0_adr, 200 }, 201 {} 202 }; 203 204 static const struct snd_soc_acpi_link_adr rpl_ 205 { 206 .mask = BIT(0), 207 .num_adr = ARRAY_SIZE(rt711_sd 208 .adr_d = rt711_sdca_0_adr, 209 }, 210 { 211 .mask = BIT(1), 212 .num_adr = ARRAY_SIZE(rt1316_1 213 .adr_d = rt1316_1_group1_adr, 214 }, 215 { 216 .mask = BIT(2), 217 .num_adr = ARRAY_SIZE(rt714_2_ 218 .adr_d = rt714_2_adr, 219 }, 220 { 221 .mask = BIT(3), 222 .num_adr = ARRAY_SIZE(rt1316_3 223 .adr_d = rt1316_3_group1_adr, 224 }, 225 {} 226 }; 227 228 static const struct snd_soc_acpi_link_adr rpl_ 229 { 230 .mask = BIT(0), 231 .num_adr = ARRAY_SIZE(rt711_sd 232 .adr_d = rt711_sdca_0_adr, 233 }, 234 { 235 .mask = BIT(1), 236 .num_adr = ARRAY_SIZE(rt1316_1 237 .adr_d = rt1316_1_group1_adr, 238 }, 239 { 240 .mask = BIT(2), 241 .num_adr = ARRAY_SIZE(rt1316_2 242 .adr_d = rt1316_2_group1_adr, 243 }, 244 { 245 .mask = BIT(3), 246 .num_adr = ARRAY_SIZE(rt714_3_ 247 .adr_d = rt714_3_adr, 248 }, 249 {} 250 }; 251 252 static const struct snd_soc_acpi_link_adr rpl_ 253 { 254 .mask = BIT(2), 255 .num_adr = ARRAY_SIZE(rt711_sd 256 .adr_d = rt711_sdca_2_adr, 257 }, 258 { 259 .mask = BIT(0), 260 .num_adr = ARRAY_SIZE(rt1316_0 261 .adr_d = rt1316_0_group2_adr, 262 }, 263 { 264 .mask = BIT(1), 265 .num_adr = ARRAY_SIZE(rt1316_1 266 .adr_d = rt1316_1_group2_adr, 267 }, 268 { 269 .mask = BIT(3), 270 .num_adr = ARRAY_SIZE(rt714_3_ 271 .adr_d = rt714_3_adr, 272 }, 273 {} 274 }; 275 276 static const struct snd_soc_acpi_link_adr rpl_ 277 { 278 .mask = BIT(2), 279 .num_adr = ARRAY_SIZE(rt711_sd 280 .adr_d = rt711_sdca_2_adr, 281 }, 282 { 283 .mask = BIT(0), 284 .num_adr = ARRAY_SIZE(rt1316_0 285 .adr_d = rt1316_0_group2_adr, 286 }, 287 { 288 .mask = BIT(1), 289 .num_adr = ARRAY_SIZE(rt1316_1 290 .adr_d = rt1316_1_group2_adr, 291 }, 292 {} 293 }; 294 295 static const struct snd_soc_acpi_link_adr rpl_ 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 }; 313 314 static const struct snd_soc_acpi_link_adr rpl_ 315 { 316 .mask = BIT(0), 317 .num_adr = ARRAY_SIZE(rt711_sd 318 .adr_d = rt711_sdca_0_adr, 319 }, 320 { 321 .mask = BIT(1), 322 .num_adr = ARRAY_SIZE(rt1318_1 323 .adr_d = rt1318_1_group1_adr, 324 }, 325 { 326 .mask = BIT(2), 327 .num_adr = ARRAY_SIZE(rt1318_2 328 .adr_d = rt1318_2_group1_adr, 329 }, 330 { 331 .mask = BIT(3), 332 .num_adr = ARRAY_SIZE(rt714_3_ 333 .adr_d = rt714_3_adr, 334 }, 335 {} 336 }; 337 338 static const struct snd_soc_acpi_link_adr rpl_ 339 { 340 .mask = BIT(0), 341 .num_adr = ARRAY_SIZE(rt711_sd 342 .adr_d = rt711_sdca_0_adr, 343 }, 344 { 345 .mask = BIT(1), 346 .num_adr = ARRAY_SIZE(rt1318_1 347 .adr_d = rt1318_1_group1_adr, 348 }, 349 { 350 .mask = BIT(2), 351 .num_adr = ARRAY_SIZE(rt1318_2 352 .adr_d = rt1318_2_group1_adr, 353 }, 354 {} 355 }; 356 357 static const struct snd_soc_acpi_link_adr rpl_ 358 { 359 .mask = BIT(1), 360 .num_adr = ARRAY_SIZE(rt1316_1 361 .adr_d = rt1316_1_group1_adr, 362 }, 363 { 364 .mask = BIT(2), 365 .num_adr = ARRAY_SIZE(rt1316_2 366 .adr_d = rt1316_2_group1_adr, 367 }, 368 { 369 .mask = BIT(0), 370 .num_adr = ARRAY_SIZE(rt714_0_ 371 .adr_d = rt714_0_adr, 372 }, 373 {} 374 }; 375 376 static const struct snd_soc_acpi_link_adr rpl_ 377 { 378 .mask = BIT(0), 379 .num_adr = ARRAY_SIZE(rt711_sd 380 .adr_d = rt711_sdca_0_adr, 381 }, 382 {} 383 }; 384 385 static const struct snd_soc_acpi_link_adr rplp 386 { 387 .mask = BIT(2), 388 .num_adr = ARRAY_SIZE(rt711_sd 389 .adr_d = rt711_sdca_2_adr, 390 }, 391 {} 392 }; 393 394 static const struct snd_soc_acpi_codecs rpl_rt 395 .num_codecs = 2, 396 .codecs = {RT5682_ACPI_HID, RT5682S_AC 397 }; 398 399 static const struct snd_soc_acpi_codecs rpl_es 400 .num_codecs = 3, 401 .codecs = { "ESSX8316", "ESSX8326", "E 402 }; 403 404 static const struct snd_soc_acpi_codecs rpl_ma 405 .num_codecs = 1, 406 .codecs = {"MX98357A"} 407 }; 408 409 static const struct snd_soc_acpi_codecs rpl_lt 410 .num_codecs = 1, 411 .codecs = {"INTC10B0"} 412 }; 413 414 struct snd_soc_acpi_mach snd_soc_acpi_intel_rp 415 { 416 .comp_ids = &rpl_rt5682_hp, 417 .drv_name = "rpl_mx98357_rt568 418 .machine_quirk = snd_soc_acpi_ 419 .quirk_data = &rpl_max98357a_a 420 .sof_tplg_filename = "sof-rpl- 421 }, 422 { 423 .comp_ids = &rpl_rt5682_hp, 424 .drv_name = "rpl_rt5682_c1_h02 425 .machine_quirk = snd_soc_acpi_ 426 .quirk_data = &rpl_lt6911_hdmi 427 .sof_tplg_filename = "sof-rpl- 428 }, 429 { 430 .comp_ids = &rpl_essx_83x6, 431 .drv_name = "rpl_es83x6_c1_h02 432 .machine_quirk = snd_soc_acpi_ 433 .quirk_data = &rpl_lt6911_hdmi 434 .sof_tplg_filename = "sof-rpl- 435 }, 436 { 437 .comp_ids = &rpl_essx_83x6, 438 .drv_name = "sof-essx8336", 439 .sof_tplg_filename = "sof-rpl- 440 .tplg_quirk_mask = SND_SOC_ACP 441 SND_SO 442 SND_SO 443 }, 444 /* place boards for each headphone cod 445 * tplg name and machine driver will d 446 */ 447 { 448 .id = CS42L42_ACPI_HID, 449 .drv_name = "rpl_cs42l42_def", 450 .sof_tplg_filename = "sof-rpl" 451 .tplg_quirk_mask = SND_SOC_ACP 452 SND_SO 453 }, 454 { 455 .id = DA7219_ACPI_HID, 456 .drv_name = "rpl_da7219_def", 457 .sof_tplg_filename = "sof-rpl" 458 .tplg_quirk_mask = SND_SOC_ACP 459 SND_SO 460 }, 461 { 462 .id = NAU8825_ACPI_HID, 463 .drv_name = "rpl_nau8825_def", 464 .sof_tplg_filename = "sof-rpl" 465 .tplg_quirk_mask = SND_SOC_ACP 466 SND_SO 467 }, 468 { 469 .id = RT5650_ACPI_HID, 470 .drv_name = "rpl_rt5682_def", 471 .sof_tplg_filename = "sof-rpl" 472 .tplg_quirk_mask = SND_SOC_ACP 473 SND_SO 474 }, 475 { 476 .comp_ids = &rpl_rt5682_hp, 477 .drv_name = "rpl_rt5682_def", 478 .sof_tplg_filename = "sof-rpl" 479 .tplg_quirk_mask = SND_SOC_ACP 480 SND_SO 481 }, 482 /* place amp-only boards in the end of 483 { 484 .id = "INTC10B0", 485 .drv_name = "rpl_lt6911_hdmi_s 486 .sof_tplg_filename = "sof-rpl- 487 }, 488 {}, 489 }; 490 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_rpl_machi 491 492 /* this table is used when there is no I2S cod 493 struct snd_soc_acpi_mach snd_soc_acpi_intel_rp 494 { 495 .link_mask = BIT(0), 496 .links = rpl_cs42l43_l0, 497 .drv_name = "sof_sdw", 498 .sof_tplg_filename = "sof-rpl- 499 }, 500 { 501 .link_mask = 0xF, /* 4 active 502 .links = rpl_sdca_3_in_1, 503 .drv_name = "sof_sdw", 504 .sof_tplg_filename = "sof-rpl- 505 }, 506 { 507 .link_mask = 0xF, /* 4 active 508 .links = rpl_sdw_rt711_link2_r 509 .drv_name = "sof_sdw", 510 .sof_tplg_filename = "sof-rpl- 511 }, 512 { 513 .link_mask = 0xF, /* 4 active 514 .links = rpl_sdw_rt711_link0_r 515 .drv_name = "sof_sdw", 516 .sof_tplg_filename = "sof-rpl- 517 }, 518 { 519 .link_mask = 0xF, /* 4 active 520 .links = rpl_sdw_rt711_link0_r 521 .drv_name = "sof_sdw", 522 .sof_tplg_filename = "sof-rpl- 523 }, 524 { 525 .link_mask = 0x7, /* rt711 on 526 .links = rpl_sdw_rt711_link0_r 527 .drv_name = "sof_sdw", 528 .sof_tplg_filename = "sof-rpl- 529 }, 530 { 531 .link_mask = 0x7, /* rt711 on 532 .links = rpl_sdw_rt711_link0_r 533 .drv_name = "sof_sdw", 534 .sof_tplg_filename = "sof-rpl- 535 }, 536 { 537 .link_mask = 0x7, /* rt714 on 538 .links = rpl_sdw_rt1316_link12 539 .drv_name = "sof_sdw", 540 .sof_tplg_filename = "sof-rpl- 541 }, 542 { 543 .link_mask = 0x7, /* rt711 on 544 .links = rpl_sdw_rt711_link2_r 545 .drv_name = "sof_sdw", 546 .sof_tplg_filename = "sof-rpl- 547 }, 548 { 549 .link_mask = 0x1, /* link0 req 550 .links = rpl_rvp, 551 .drv_name = "sof_sdw", 552 .sof_tplg_filename = "sof-rpl- 553 }, 554 { 555 .link_mask = 0x1, /* link0 req 556 .links = rpl_sdca_rvp, 557 .drv_name = "sof_sdw", 558 .sof_tplg_filename = "sof-rpl- 559 }, 560 { 561 .link_mask = 0x4, /* link2 req 562 .links = rplp_crb, 563 .drv_name = "sof_sdw", 564 .sof_tplg_filename = "sof-rpl- 565 }, 566 {}, 567 }; 568 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_rpl_sdw_m 569
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.