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