1 // SPDX-License-Identifier: GPL-2.0-only 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 2 /* 3 * soc-apci-intel-adl-match.c - tables and sup 3 * soc-apci-intel-adl-match.c - tables and support for ADL ACPI enumeration. 4 * 4 * 5 * Copyright (c) 2020, Intel Corporation. 5 * Copyright (c) 2020, Intel Corporation. 6 */ 6 */ 7 7 8 #include <sound/soc-acpi.h> 8 #include <sound/soc-acpi.h> 9 #include <sound/soc-acpi-intel-match.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 10 17 static const struct snd_soc_acpi_endpoint sing 11 static const struct snd_soc_acpi_endpoint single_endpoint = { 18 .num = 0, 12 .num = 0, 19 .aggregated = 0, 13 .aggregated = 0, 20 .group_position = 0, 14 .group_position = 0, 21 .group_id = 0, 15 .group_id = 0, 22 }; 16 }; 23 17 24 static const struct snd_soc_acpi_endpoint spk_ 18 static const struct snd_soc_acpi_endpoint spk_l_endpoint = { 25 .num = 0, 19 .num = 0, 26 .aggregated = 1, 20 .aggregated = 1, 27 .group_position = 0, 21 .group_position = 0, 28 .group_id = 1, 22 .group_id = 1, 29 }; 23 }; 30 24 31 static const struct snd_soc_acpi_endpoint spk_ 25 static const struct snd_soc_acpi_endpoint spk_r_endpoint = { 32 .num = 0, 26 .num = 0, 33 .aggregated = 1, 27 .aggregated = 1, 34 .group_position = 1, 28 .group_position = 1, 35 .group_id = 1, 29 .group_id = 1, 36 }; 30 }; 37 31 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 32 static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { 119 { 33 { 120 .adr = 0x000020025D071100ull, 34 .adr = 0x000020025D071100ull, 121 .num_endpoints = 1, 35 .num_endpoints = 1, 122 .endpoints = &single_endpoint, 36 .endpoints = &single_endpoint, 123 .name_prefix = "rt711" 37 .name_prefix = "rt711" 124 } 38 } 125 }; 39 }; 126 40 127 static const struct snd_soc_acpi_adr_device rt 41 static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = { 128 { 42 { 129 .adr = 0x000120025D130800ull, 43 .adr = 0x000120025D130800ull, 130 .num_endpoints = 1, 44 .num_endpoints = 1, 131 .endpoints = &spk_l_endpoint, 45 .endpoints = &spk_l_endpoint, 132 .name_prefix = "rt1308-1" 46 .name_prefix = "rt1308-1" 133 } 47 } 134 }; 48 }; 135 49 136 static const struct snd_soc_acpi_adr_device rt 50 static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = { 137 { 51 { 138 .adr = 0x000220025D130800ull, 52 .adr = 0x000220025D130800ull, 139 .num_endpoints = 1, 53 .num_endpoints = 1, 140 .endpoints = &spk_r_endpoint, 54 .endpoints = &spk_r_endpoint, 141 .name_prefix = "rt1308-2" 55 .name_prefix = "rt1308-2" 142 } 56 } 143 }; 57 }; 144 58 145 static const struct snd_soc_acpi_adr_device rt 59 static const struct snd_soc_acpi_adr_device rt715_3_adr[] = { 146 { 60 { 147 .adr = 0x000320025D071500ull, 61 .adr = 0x000320025D071500ull, 148 .num_endpoints = 1, 62 .num_endpoints = 1, 149 .endpoints = &single_endpoint, 63 .endpoints = &single_endpoint, 150 .name_prefix = "rt715" 64 .name_prefix = "rt715" 151 } 65 } 152 }; 66 }; 153 67 154 static const struct snd_soc_acpi_adr_device rt 68 static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { 155 { 69 { 156 .adr = 0x000030025D071101ull, 70 .adr = 0x000030025D071101ull, 157 .num_endpoints = 1, 71 .num_endpoints = 1, 158 .endpoints = &single_endpoint, 72 .endpoints = &single_endpoint, 159 .name_prefix = "rt711" 73 .name_prefix = "rt711" 160 } 74 } 161 }; 75 }; 162 76 163 static const struct snd_soc_acpi_adr_device rt 77 static const struct snd_soc_acpi_adr_device rt711_sdca_2_adr[] = { 164 { 78 { 165 .adr = 0x000230025D071101ull, 79 .adr = 0x000230025D071101ull, 166 .num_endpoints = 1, 80 .num_endpoints = 1, 167 .endpoints = &single_endpoint, 81 .endpoints = &single_endpoint, 168 .name_prefix = "rt711" 82 .name_prefix = "rt711" 169 } 83 } 170 }; 84 }; 171 85 172 static const struct snd_soc_acpi_adr_device rt 86 static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = { 173 { 87 { 174 .adr = 0x000131025D131601ull, 88 .adr = 0x000131025D131601ull, /* unique ID is set for some reason */ 175 .num_endpoints = 1, 89 .num_endpoints = 1, 176 .endpoints = &spk_l_endpoint, 90 .endpoints = &spk_l_endpoint, 177 .name_prefix = "rt1316-1" 91 .name_prefix = "rt1316-1" 178 } 92 } 179 }; 93 }; 180 94 181 static const struct snd_soc_acpi_adr_device rt 95 static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = { 182 { 96 { 183 .adr = 0x000230025D131601ull, 97 .adr = 0x000230025D131601ull, 184 .num_endpoints = 1, 98 .num_endpoints = 1, 185 .endpoints = &spk_r_endpoint, 99 .endpoints = &spk_r_endpoint, 186 .name_prefix = "rt1316-2" 100 .name_prefix = "rt1316-2" 187 } 101 } 188 }; 102 }; 189 103 190 static const struct snd_soc_acpi_adr_device rt 104 static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = { 191 { 105 { 192 .adr = 0x000330025D131601ull, 106 .adr = 0x000330025D131601ull, 193 .num_endpoints = 1, 107 .num_endpoints = 1, 194 .endpoints = &spk_r_endpoint, 108 .endpoints = &spk_r_endpoint, 195 .name_prefix = "rt1316-2" 109 .name_prefix = "rt1316-2" 196 } 110 } 197 }; 111 }; 198 112 199 static const struct snd_soc_acpi_adr_device rt 113 static const struct snd_soc_acpi_adr_device rt1316_0_group2_adr[] = { 200 { 114 { 201 .adr = 0x000031025D131601ull, 115 .adr = 0x000031025D131601ull, 202 .num_endpoints = 1, 116 .num_endpoints = 1, 203 .endpoints = &spk_l_endpoint, 117 .endpoints = &spk_l_endpoint, 204 .name_prefix = "rt1316-1" 118 .name_prefix = "rt1316-1" 205 } 119 } 206 }; 120 }; 207 121 208 static const struct snd_soc_acpi_adr_device rt 122 static const struct snd_soc_acpi_adr_device rt1316_1_group2_adr[] = { 209 { 123 { 210 .adr = 0x000130025D131601ull, 124 .adr = 0x000130025D131601ull, 211 .num_endpoints = 1, 125 .num_endpoints = 1, 212 .endpoints = &spk_r_endpoint, 126 .endpoints = &spk_r_endpoint, 213 .name_prefix = "rt1316-2" 127 .name_prefix = "rt1316-2" 214 } 128 } 215 }; 129 }; 216 130 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 131 static const struct snd_soc_acpi_adr_device rt1316_2_single_adr[] = { 227 { 132 { 228 .adr = 0x000230025D131601ull, 133 .adr = 0x000230025D131601ull, 229 .num_endpoints = 1, 134 .num_endpoints = 1, 230 .endpoints = &single_endpoint, 135 .endpoints = &single_endpoint, 231 .name_prefix = "rt1316-1" 136 .name_prefix = "rt1316-1" 232 } 137 } 233 }; 138 }; 234 139 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 140 static const struct snd_soc_acpi_adr_device rt714_0_adr[] = { 245 { 141 { 246 .adr = 0x000030025D071401ull, 142 .adr = 0x000030025D071401ull, 247 .num_endpoints = 1, 143 .num_endpoints = 1, 248 .endpoints = &single_endpoint, 144 .endpoints = &single_endpoint, 249 .name_prefix = "rt714" 145 .name_prefix = "rt714" 250 } 146 } 251 }; 147 }; 252 148 253 static const struct snd_soc_acpi_adr_device rt 149 static const struct snd_soc_acpi_adr_device rt714_2_adr[] = { 254 { 150 { 255 .adr = 0x000230025D071401ull, 151 .adr = 0x000230025D071401ull, 256 .num_endpoints = 1, 152 .num_endpoints = 1, 257 .endpoints = &single_endpoint, 153 .endpoints = &single_endpoint, 258 .name_prefix = "rt714" 154 .name_prefix = "rt714" 259 } 155 } 260 }; 156 }; 261 157 262 static const struct snd_soc_acpi_adr_device rt 158 static const struct snd_soc_acpi_adr_device rt714_3_adr[] = { 263 { 159 { 264 .adr = 0x000330025D071401ull, 160 .adr = 0x000330025D071401ull, 265 .num_endpoints = 1, 161 .num_endpoints = 1, 266 .endpoints = &single_endpoint, 162 .endpoints = &single_endpoint, 267 .name_prefix = "rt714" 163 .name_prefix = "rt714" 268 } 164 } 269 }; 165 }; 270 166 271 static const struct snd_soc_acpi_link_adr adl_ 167 static const struct snd_soc_acpi_link_adr adl_default[] = { 272 { 168 { 273 .mask = BIT(0), 169 .mask = BIT(0), 274 .num_adr = ARRAY_SIZE(rt711_0_ 170 .num_adr = ARRAY_SIZE(rt711_0_adr), 275 .adr_d = rt711_0_adr, 171 .adr_d = rt711_0_adr, 276 }, 172 }, 277 { 173 { 278 .mask = BIT(1), 174 .mask = BIT(1), 279 .num_adr = ARRAY_SIZE(rt1308_1 175 .num_adr = ARRAY_SIZE(rt1308_1_group1_adr), 280 .adr_d = rt1308_1_group1_adr, 176 .adr_d = rt1308_1_group1_adr, 281 }, 177 }, 282 { 178 { 283 .mask = BIT(2), 179 .mask = BIT(2), 284 .num_adr = ARRAY_SIZE(rt1308_2 180 .num_adr = ARRAY_SIZE(rt1308_2_group1_adr), 285 .adr_d = rt1308_2_group1_adr, 181 .adr_d = rt1308_2_group1_adr, 286 }, 182 }, 287 { 183 { 288 .mask = BIT(3), 184 .mask = BIT(3), 289 .num_adr = ARRAY_SIZE(rt715_3_ 185 .num_adr = ARRAY_SIZE(rt715_3_adr), 290 .adr_d = rt715_3_adr, 186 .adr_d = rt715_3_adr, 291 }, 187 }, 292 {} 188 {} 293 }; 189 }; 294 190 295 static const struct snd_soc_acpi_link_adr adl_ 191 static const struct snd_soc_acpi_link_adr adl_sdca_default[] = { 296 { 192 { 297 .mask = BIT(0), 193 .mask = BIT(0), 298 .num_adr = ARRAY_SIZE(rt711_sd 194 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr), 299 .adr_d = rt711_sdca_0_adr, 195 .adr_d = rt711_sdca_0_adr, 300 }, 196 }, 301 { 197 { 302 .mask = BIT(1), 198 .mask = BIT(1), 303 .num_adr = ARRAY_SIZE(rt1316_1 199 .num_adr = ARRAY_SIZE(rt1316_1_group1_adr), 304 .adr_d = rt1316_1_group1_adr, 200 .adr_d = rt1316_1_group1_adr, 305 }, 201 }, 306 { 202 { 307 .mask = BIT(2), 203 .mask = BIT(2), 308 .num_adr = ARRAY_SIZE(rt1316_2 204 .num_adr = ARRAY_SIZE(rt1316_2_group1_adr), 309 .adr_d = rt1316_2_group1_adr, 205 .adr_d = rt1316_2_group1_adr, 310 }, 206 }, 311 { 207 { 312 .mask = BIT(3), 208 .mask = BIT(3), 313 .num_adr = ARRAY_SIZE(rt714_3_ 209 .num_adr = ARRAY_SIZE(rt714_3_adr), 314 .adr_d = rt714_3_adr, 210 .adr_d = rt714_3_adr, 315 }, 211 }, 316 {} 212 {} 317 }; 213 }; 318 214 319 static const struct snd_soc_acpi_link_adr adl_ 215 static const struct snd_soc_acpi_link_adr adl_sdca_3_in_1[] = { 320 { 216 { 321 .mask = BIT(0), 217 .mask = BIT(0), 322 .num_adr = ARRAY_SIZE(rt711_sd 218 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr), 323 .adr_d = rt711_sdca_0_adr, 219 .adr_d = rt711_sdca_0_adr, 324 }, 220 }, 325 { 221 { 326 .mask = BIT(1), 222 .mask = BIT(1), 327 .num_adr = ARRAY_SIZE(rt1316_1 223 .num_adr = ARRAY_SIZE(rt1316_1_group1_adr), 328 .adr_d = rt1316_1_group1_adr, 224 .adr_d = rt1316_1_group1_adr, 329 }, 225 }, 330 { 226 { 331 .mask = BIT(2), 227 .mask = BIT(2), 332 .num_adr = ARRAY_SIZE(rt714_2_ 228 .num_adr = ARRAY_SIZE(rt714_2_adr), 333 .adr_d = rt714_2_adr, 229 .adr_d = rt714_2_adr, 334 }, 230 }, 335 { 231 { 336 .mask = BIT(3), 232 .mask = BIT(3), 337 .num_adr = ARRAY_SIZE(rt1316_3 233 .num_adr = ARRAY_SIZE(rt1316_3_group1_adr), 338 .adr_d = rt1316_3_group1_adr, 234 .adr_d = rt1316_3_group1_adr, 339 }, 235 }, 340 {} 236 {} 341 }; 237 }; 342 238 343 static const struct snd_soc_acpi_link_adr adl_ 239 static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link2_rt1316_link01_rt714_link3[] = { 344 { 240 { 345 .mask = BIT(2), 241 .mask = BIT(2), 346 .num_adr = ARRAY_SIZE(rt711_sd 242 .num_adr = ARRAY_SIZE(rt711_sdca_2_adr), 347 .adr_d = rt711_sdca_2_adr, 243 .adr_d = rt711_sdca_2_adr, 348 }, 244 }, 349 { 245 { 350 .mask = BIT(0), 246 .mask = BIT(0), 351 .num_adr = ARRAY_SIZE(rt1316_0 247 .num_adr = ARRAY_SIZE(rt1316_0_group2_adr), 352 .adr_d = rt1316_0_group2_adr, 248 .adr_d = rt1316_0_group2_adr, 353 }, 249 }, 354 { 250 { 355 .mask = BIT(1), 251 .mask = BIT(1), 356 .num_adr = ARRAY_SIZE(rt1316_1 252 .num_adr = ARRAY_SIZE(rt1316_1_group2_adr), 357 .adr_d = rt1316_1_group2_adr, 253 .adr_d = rt1316_1_group2_adr, 358 }, 254 }, 359 { 255 { 360 .mask = BIT(3), 256 .mask = BIT(3), 361 .num_adr = ARRAY_SIZE(rt714_3_ 257 .num_adr = ARRAY_SIZE(rt714_3_adr), 362 .adr_d = rt714_3_adr, 258 .adr_d = rt714_3_adr, 363 }, 259 }, 364 {} 260 {} 365 }; 261 }; 366 262 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_ 263 static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link12_rt714_link0[] = { 387 { 264 { 388 .mask = BIT(1), 265 .mask = BIT(1), 389 .num_adr = ARRAY_SIZE(rt1316_1 266 .num_adr = ARRAY_SIZE(rt1316_1_group1_adr), 390 .adr_d = rt1316_1_group1_adr, 267 .adr_d = rt1316_1_group1_adr, 391 }, 268 }, 392 { 269 { 393 .mask = BIT(2), 270 .mask = BIT(2), 394 .num_adr = ARRAY_SIZE(rt1316_2 271 .num_adr = ARRAY_SIZE(rt1316_2_group1_adr), 395 .adr_d = rt1316_2_group1_adr, 272 .adr_d = rt1316_2_group1_adr, 396 }, 273 }, 397 { 274 { 398 .mask = BIT(0), 275 .mask = BIT(0), 399 .num_adr = ARRAY_SIZE(rt714_0_ 276 .num_adr = ARRAY_SIZE(rt714_0_adr), 400 .adr_d = rt714_0_adr, 277 .adr_d = rt714_0_adr, 401 }, 278 }, 402 {} 279 {} 403 }; 280 }; 404 281 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_ 282 static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link2_rt714_link3[] = { 420 { 283 { 421 .mask = BIT(2), 284 .mask = BIT(2), 422 .num_adr = ARRAY_SIZE(rt1316_2 285 .num_adr = ARRAY_SIZE(rt1316_2_single_adr), 423 .adr_d = rt1316_2_single_adr, 286 .adr_d = rt1316_2_single_adr, 424 }, 287 }, 425 { 288 { 426 .mask = BIT(3), 289 .mask = BIT(3), 427 .num_adr = ARRAY_SIZE(rt714_3_ 290 .num_adr = ARRAY_SIZE(rt714_3_adr), 428 .adr_d = rt714_3_adr, 291 .adr_d = rt714_3_adr, 429 }, 292 }, 430 {} 293 {} 431 }; 294 }; 432 295 433 static const struct snd_soc_acpi_link_adr adl_ 296 static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link2_rt714_link0[] = { 434 { 297 { 435 .mask = BIT(2), 298 .mask = BIT(2), 436 .num_adr = ARRAY_SIZE(rt1316_2 299 .num_adr = ARRAY_SIZE(rt1316_2_single_adr), 437 .adr_d = rt1316_2_single_adr, 300 .adr_d = rt1316_2_single_adr, 438 }, 301 }, 439 { 302 { 440 .mask = BIT(0), 303 .mask = BIT(0), 441 .num_adr = ARRAY_SIZE(rt714_0_ 304 .num_adr = ARRAY_SIZE(rt714_0_adr), 442 .adr_d = rt714_0_adr, 305 .adr_d = rt714_0_adr, 443 }, 306 }, 444 {} 307 {} 445 }; 308 }; 446 309 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 310 static const struct snd_soc_acpi_adr_device mx8373_2_adr[] = { 476 { 311 { 477 .adr = 0x000223019F837300ull, 312 .adr = 0x000223019F837300ull, 478 .num_endpoints = 1, 313 .num_endpoints = 1, 479 .endpoints = &spk_l_endpoint, 314 .endpoints = &spk_l_endpoint, 480 .name_prefix = "Left" 315 .name_prefix = "Left" 481 }, 316 }, 482 { 317 { 483 .adr = 0x000227019F837300ull, 318 .adr = 0x000227019F837300ull, 484 .num_endpoints = 1, 319 .num_endpoints = 1, 485 .endpoints = &spk_r_endpoint, 320 .endpoints = &spk_r_endpoint, 486 .name_prefix = "Right" 321 .name_prefix = "Right" 487 } 322 } 488 }; 323 }; 489 324 490 static const struct snd_soc_acpi_adr_device rt 325 static const struct snd_soc_acpi_adr_device rt5682_0_adr[] = { 491 { 326 { 492 .adr = 0x000021025D568200ull, 327 .adr = 0x000021025D568200ull, 493 .num_endpoints = 1, 328 .num_endpoints = 1, 494 .endpoints = &single_endpoint, 329 .endpoints = &single_endpoint, 495 .name_prefix = "rt5682" 330 .name_prefix = "rt5682" 496 } 331 } 497 }; 332 }; 498 333 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_ 334 static const struct snd_soc_acpi_link_adr adl_rvp[] = { 519 { 335 { 520 .mask = BIT(0), 336 .mask = BIT(0), 521 .num_adr = ARRAY_SIZE(rt711_0_ 337 .num_adr = ARRAY_SIZE(rt711_0_adr), 522 .adr_d = rt711_0_adr, 338 .adr_d = rt711_0_adr, 523 }, 339 }, 524 {} 340 {} 525 }; 341 }; 526 342 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_ 343 static const struct snd_soc_acpi_link_adr adl_chromebook_base[] = { 537 { 344 { 538 .mask = BIT(0), 345 .mask = BIT(0), 539 .num_adr = ARRAY_SIZE(rt5682_0 346 .num_adr = ARRAY_SIZE(rt5682_0_adr), 540 .adr_d = rt5682_0_adr, 347 .adr_d = rt5682_0_adr, 541 }, 348 }, 542 { 349 { 543 .mask = BIT(2), 350 .mask = BIT(2), 544 .num_adr = ARRAY_SIZE(mx8373_2 351 .num_adr = ARRAY_SIZE(mx8373_2_adr), 545 .adr_d = mx8373_2_adr, 352 .adr_d = mx8373_2_adr, 546 }, 353 }, 547 {} 354 {} 548 }; 355 }; 549 356 >> 357 static const struct snd_soc_acpi_codecs adl_max98373_amp = { >> 358 .num_codecs = 1, >> 359 .codecs = {"MX98373"} >> 360 }; >> 361 550 static const struct snd_soc_acpi_codecs adl_ma 362 static const struct snd_soc_acpi_codecs adl_max98357a_amp = { 551 .num_codecs = 1, 363 .num_codecs = 1, 552 .codecs = {"MX98357A"} 364 .codecs = {"MX98357A"} 553 }; 365 }; 554 366 >> 367 static const struct snd_soc_acpi_codecs adl_max98360a_amp = { >> 368 .num_codecs = 1, >> 369 .codecs = {"MX98360A"} >> 370 }; >> 371 555 static const struct snd_soc_acpi_codecs adl_rt 372 static const struct snd_soc_acpi_codecs adl_rt5682_rt5682s_hp = { 556 .num_codecs = 2, 373 .num_codecs = 2, 557 .codecs = {RT5682_ACPI_HID, RT5682S_AC !! 374 .codecs = {"10EC5682", "RTL5682"}, 558 }; 375 }; 559 376 560 static const struct snd_soc_acpi_codecs adl_rt 377 static const struct snd_soc_acpi_codecs adl_rt1019p_amp = { 561 .num_codecs = 1, 378 .num_codecs = 1, 562 .codecs = {"RTL1019"} 379 .codecs = {"RTL1019"} 563 }; 380 }; 564 381 565 static const struct snd_soc_acpi_codecs adl_lt !! 382 static const struct snd_soc_acpi_codecs adl_max98390_amp = { 566 .num_codecs = 1, 383 .num_codecs = 1, 567 .codecs = {"INTC10B0"} !! 384 .codecs = {"MX98390"} 568 }; 385 }; 569 386 570 struct snd_soc_acpi_mach snd_soc_acpi_intel_ad 387 struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { 571 { 388 { 572 .comp_ids = &adl_rt5682_rt5682 389 .comp_ids = &adl_rt5682_rt5682s_hp, >> 390 .drv_name = "adl_mx98373_rt5682", >> 391 .machine_quirk = snd_soc_acpi_codec_list, >> 392 .quirk_data = &adl_max98373_amp, >> 393 .sof_fw_filename = "sof-adl.ri", >> 394 .sof_tplg_filename = "sof-adl-max98373-rt5682.tplg", >> 395 }, >> 396 { >> 397 .comp_ids = &adl_rt5682_rt5682s_hp, 573 .drv_name = "adl_mx98357_rt568 398 .drv_name = "adl_mx98357_rt5682", 574 .machine_quirk = snd_soc_acpi_ 399 .machine_quirk = snd_soc_acpi_codec_list, 575 .quirk_data = &adl_max98357a_a 400 .quirk_data = &adl_max98357a_amp, >> 401 .sof_fw_filename = "sof-adl.ri", 576 .sof_tplg_filename = "sof-adl- 402 .sof_tplg_filename = "sof-adl-max98357a-rt5682.tplg", 577 }, 403 }, 578 { 404 { >> 405 .comp_ids = &adl_rt5682_rt5682s_hp, >> 406 .drv_name = "adl_mx98360_rt5682", >> 407 .machine_quirk = snd_soc_acpi_codec_list, >> 408 .quirk_data = &adl_max98360a_amp, >> 409 .sof_fw_filename = "sof-adl.ri", >> 410 .sof_tplg_filename = "sof-adl-max98360a-rt5682.tplg", >> 411 }, >> 412 { 579 .id = "10508825", 413 .id = "10508825", 580 .drv_name = "adl_rt1019p_8825" !! 414 .drv_name = "adl_rt1019p_nau8825", 581 .machine_quirk = snd_soc_acpi_ 415 .machine_quirk = snd_soc_acpi_codec_list, 582 .quirk_data = &adl_rt1019p_amp 416 .quirk_data = &adl_rt1019p_amp, >> 417 .sof_fw_filename = "sof-adl.ri", 583 .sof_tplg_filename = "sof-adl- 418 .sof_tplg_filename = "sof-adl-rt1019-nau8825.tplg", 584 }, 419 }, 585 { 420 { 586 .comp_ids = &adl_rt5682_rt5682 !! 421 .id = "10508825", 587 .drv_name = "adl_rt5682_c1_h02 !! 422 .drv_name = "adl_max98373_nau8825", 588 .machine_quirk = snd_soc_acpi_ 423 .machine_quirk = snd_soc_acpi_codec_list, 589 .quirk_data = &adl_lt6911_hdmi !! 424 .quirk_data = &adl_max98373_amp, 590 .sof_tplg_filename = "sof-adl- !! 425 .sof_fw_filename = "sof-adl.ri", >> 426 .sof_tplg_filename = "sof-adl-max98373-nau8825.tplg", 591 }, 427 }, 592 { 428 { 593 .comp_ids = &essx_83x6, !! 429 .id = "10508825", 594 .drv_name = "adl_es83x6_c1_h02 !! 430 .drv_name = "adl_mx98360a_nau8825", 595 .machine_quirk = snd_soc_acpi_ 431 .machine_quirk = snd_soc_acpi_codec_list, 596 .quirk_data = &adl_lt6911_hdmi !! 432 .quirk_data = &adl_max98360a_amp, 597 .sof_tplg_filename = "sof-adl- !! 433 .sof_fw_filename = "sof-adl.ri", >> 434 .sof_tplg_filename = "sof-adl-mx98360a-nau8825.tplg", 598 }, 435 }, 599 { 436 { 600 .comp_ids = &essx_83x6, !! 437 .id = "10508825", 601 .drv_name = "sof-essx8336", !! 438 .drv_name = "sof_nau8825", 602 .sof_tplg_filename = "sof-adl- !! 439 .sof_fw_filename = "sof-adl.ri", 603 .tplg_quirk_mask = SND_SOC_ACP !! 440 .sof_tplg_filename = "sof-adl-nau8825.tplg", 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 }, 441 }, 638 { 442 { 639 .comp_ids = &adl_rt5682_rt5682 443 .comp_ids = &adl_rt5682_rt5682s_hp, 640 .drv_name = "adl_rt5682_def", !! 444 .drv_name = "adl_max98390_rt5682", 641 .sof_tplg_filename = "sof-adl" !! 445 .machine_quirk = snd_soc_acpi_codec_list, 642 .tplg_quirk_mask = SND_SOC_ACP !! 446 .quirk_data = &adl_max98390_amp, 643 SND_SO !! 447 .sof_fw_filename = "sof-adl.ri", 644 }, !! 448 .sof_tplg_filename = "sof-adl-max98390-rt5682.tplg", 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 }, 449 }, 656 {}, 450 {}, 657 }; 451 }; 658 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_machi 452 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_machines); 659 453 660 /* this table is used when there is no I2S cod 454 /* this table is used when there is no I2S codec present */ 661 struct snd_soc_acpi_mach snd_soc_acpi_intel_ad 455 struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { 662 { 456 { 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 457 .link_mask = 0xF, /* 4 active links required */ 670 .links = adl_default, 458 .links = adl_default, 671 .drv_name = "sof_sdw", 459 .drv_name = "sof_sdw", 672 .sof_tplg_filename = "sof-adl- 460 .sof_tplg_filename = "sof-adl-rt711-l0-rt1308-l12-rt715-l3.tplg", 673 }, 461 }, 674 { 462 { 675 .link_mask = 0xF, /* 4 active 463 .link_mask = 0xF, /* 4 active links required */ 676 .links = adl_sdca_default, 464 .links = adl_sdca_default, 677 .drv_name = "sof_sdw", 465 .drv_name = "sof_sdw", 678 .sof_tplg_filename = "sof-adl- 466 .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l12-rt714-l3.tplg", 679 }, 467 }, 680 { 468 { 681 .link_mask = 0xF, /* 4 active 469 .link_mask = 0xF, /* 4 active links required */ 682 .links = adl_sdca_3_in_1, 470 .links = adl_sdca_3_in_1, 683 .drv_name = "sof_sdw", 471 .drv_name = "sof_sdw", 684 .sof_tplg_filename = "sof-adl- 472 .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l13-rt714-l2.tplg", 685 }, 473 }, 686 { 474 { 687 .link_mask = 0xF, /* 4 active 475 .link_mask = 0xF, /* 4 active links required */ 688 .links = adl_sdw_rt711_link2_r 476 .links = adl_sdw_rt711_link2_rt1316_link01_rt714_link3, 689 .drv_name = "sof_sdw", 477 .drv_name = "sof_sdw", >> 478 .sof_fw_filename = "sof-adl.ri", 690 .sof_tplg_filename = "sof-adl- 479 .sof_tplg_filename = "sof-adl-rt711-l2-rt1316-l01-rt714-l3.tplg", 691 }, 480 }, 692 { 481 { 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 482 .link_mask = 0xC, /* rt1316 on link2 & rt714 on link3 */ 700 .links = adl_sdw_rt1316_link2_ 483 .links = adl_sdw_rt1316_link2_rt714_link3, 701 .drv_name = "sof_sdw", 484 .drv_name = "sof_sdw", >> 485 .sof_fw_filename = "sof-adl.ri", 702 .sof_tplg_filename = "sof-adl- 486 .sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l3.tplg", 703 }, 487 }, 704 { 488 { 705 .link_mask = 0x7, /* rt714 on 489 .link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */ 706 .links = adl_sdw_rt1316_link12 490 .links = adl_sdw_rt1316_link12_rt714_link0, 707 .drv_name = "sof_sdw", 491 .drv_name = "sof_sdw", >> 492 .sof_fw_filename = "sof-adl.ri", 708 .sof_tplg_filename = "sof-adl- 493 .sof_tplg_filename = "sof-adl-rt1316-l12-rt714-l0.tplg", 709 }, 494 }, 710 { 495 { 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 496 .link_mask = 0x5, /* 2 active links required */ 718 .links = adl_sdw_rt1316_link2_ 497 .links = adl_sdw_rt1316_link2_rt714_link0, 719 .drv_name = "sof_sdw", 498 .drv_name = "sof_sdw", 720 .sof_tplg_filename = "sof-adl- 499 .sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l0.tplg", 721 }, 500 }, 722 { 501 { 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 502 .link_mask = 0x1, /* link0 required */ 736 .links = adl_rvp, 503 .links = adl_rvp, 737 .drv_name = "sof_sdw", 504 .drv_name = "sof_sdw", 738 .sof_tplg_filename = "sof-adl- 505 .sof_tplg_filename = "sof-adl-rt711.tplg", 739 }, 506 }, 740 { 507 { 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 508 .link_mask = 0x5, /* rt5682 on link0 & 2xmax98373 on link 2 */ 748 .links = adl_chromebook_base, 509 .links = adl_chromebook_base, 749 .drv_name = "sof_sdw", 510 .drv_name = "sof_sdw", >> 511 .sof_fw_filename = "sof-adl.ri", 750 .sof_tplg_filename = "sof-adl- 512 .sof_tplg_filename = "sof-adl-sdw-max98373-rt5682.tplg", 751 }, 513 }, 752 {}, 514 {}, 753 }; 515 }; 754 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_sdw_m 516 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_sdw_machines); 755 517
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.