Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: use sof_sdw as default Intel SOF SDW machine

Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

Currently, we create a ACPI mach table for every new audio
configuration. And all Intel SOF SoundWire configurations point to the
same sof_sdw machine driver. Also, we don't need a specific topology for
a coufguration, we can use the function topology instead. That give us a
change to generate an ACPI mach table based on the SoundWire codec
information reported by the ACPI table and use the sof_sdw machine
driver as the default machine driver.
This will reduce the effort to support a new Intel SOF SoundWire audio
configuration.

+276 -11
+4 -4
include/sound/soc-acpi.h
··· 114 114 * @name_prefix: string used for codec controls 115 115 */ 116 116 struct snd_soc_acpi_adr_device { 117 - const u64 adr; 118 - const u8 num_endpoints; 117 + u64 adr; 118 + u8 num_endpoints; 119 119 const struct snd_soc_acpi_endpoint *endpoints; 120 120 const char *name_prefix; 121 121 }; ··· 131 131 */ 132 132 133 133 struct snd_soc_acpi_link_adr { 134 - const u32 mask; 135 - const u32 num_adr; 134 + u32 mask; 135 + u32 num_adr; 136 136 const struct snd_soc_acpi_adr_device *adr_d; 137 137 }; 138 138
+2
include/sound/soc_sdw_utils.h
··· 68 68 const int part_id; 69 69 const int version_id; 70 70 const char *codec_name; 71 + const char *name_prefix; 71 72 int amp_num; 72 73 const u8 acpi_id[ACPI_ID_LEN]; 73 74 const bool ignore_internal_dmic; ··· 169 168 170 169 struct asoc_sdw_dailink *asoc_sdw_find_dailink(struct asoc_sdw_dailink *dailinks, 171 170 const struct snd_soc_acpi_endpoint *new); 171 + int asoc_sdw_get_dai_type(u32 type); 172 172 173 173 int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card, 174 174 struct asoc_sdw_dailink *soc_dais,
+6 -2
sound/soc/intel/common/sof-function-topology-lib.c
··· 126 126 if (!ret) { 127 127 release_firmware(fw); 128 128 } else { 129 - dev_dbg(card->dev, "Failed to open topology file: %s\n", (*tplg_files)[i]); 129 + dev_warn(card->dev, 130 + "Failed to open topology file: %s, you might need to\n", 131 + (*tplg_files)[i]); 132 + dev_warn(card->dev, 133 + "download it from https://github.com/thesofproject/sof-bin/\n"); 130 134 return 0; 131 135 } 132 136 } 133 137 134 138 return tplg_num; 135 139 } 136 - 140 + EXPORT_SYMBOL_GPL(sof_sdw_get_tplg_files);
+29 -1
sound/soc/sdw_utils/soc_sdw_utils.c
··· 78 78 }, 79 79 { 80 80 .part_id = 0x700, 81 + .name_prefix = "rt700", 81 82 .dais = { 82 83 { 83 84 .direction = {true, true}, ··· 96 95 }, 97 96 { 98 97 .part_id = 0x711, 98 + .name_prefix = "rt711", 99 99 .version_id = 3, 100 100 .dais = { 101 101 { ··· 117 115 }, 118 116 { 119 117 .part_id = 0x711, 118 + .name_prefix = "rt711", 120 119 .version_id = 2, 121 120 .dais = { 122 121 { ··· 138 135 }, 139 136 { 140 137 .part_id = 0x712, 138 + .name_prefix = "rt712", 141 139 .version_id = 3, 142 140 .dais = { 143 141 { ··· 180 176 }, 181 177 { 182 178 .part_id = 0x1712, 179 + .name_prefix = "rt712-dmic", 183 180 .version_id = 3, 184 181 .dais = { 185 182 { ··· 195 190 }, 196 191 { 197 192 .part_id = 0x713, 193 + .name_prefix = "rt713", 198 194 .version_id = 3, 199 195 .dais = { 200 196 { ··· 223 217 }, 224 218 { 225 219 .part_id = 0x1713, 220 + .name_prefix = "rt713-dmic", 226 221 .version_id = 3, 227 222 .dais = { 228 223 { ··· 238 231 }, 239 232 { 240 233 .part_id = 0x1308, 234 + .name_prefix = "rt1308", 241 235 .acpi_id = "10EC1308", 242 236 .dais = { 243 237 { ··· 261 253 }, 262 254 { 263 255 .part_id = 0x1316, 256 + .name_prefix = "rt1316", 264 257 .dais = { 265 258 { 266 259 .direction = {true, true}, ··· 282 273 }, 283 274 { 284 275 .part_id = 0x1318, 276 + .name_prefix = "rt1318", 285 277 .dais = { 286 278 { 287 279 .direction = {true, true}, ··· 303 293 }, 304 294 { 305 295 .part_id = 0x1320, 296 + .name_prefix = "rt1320", 306 297 .dais = { 307 298 { 308 299 .direction = {true, false}, ··· 324 313 }, 325 314 { 326 315 .part_id = 0x714, 316 + .name_prefix = "rt714", 327 317 .version_id = 3, 328 318 .ignore_internal_dmic = true, 329 319 .dais = { ··· 340 328 }, 341 329 { 342 330 .part_id = 0x715, 331 + .name_prefix = "rt715", 343 332 .version_id = 3, 344 333 .ignore_internal_dmic = true, 345 334 .dais = { ··· 356 343 }, 357 344 { 358 345 .part_id = 0x714, 346 + .name_prefix = "rt714", 359 347 .version_id = 2, 360 348 .ignore_internal_dmic = true, 361 349 .dais = { ··· 372 358 }, 373 359 { 374 360 .part_id = 0x715, 361 + .name_prefix = "rt715", 375 362 .version_id = 2, 376 363 .ignore_internal_dmic = true, 377 364 .dais = { ··· 388 373 }, 389 374 { 390 375 .part_id = 0x721, 376 + .name_prefix = "rt721", 391 377 .version_id = 3, 392 378 .dais = { 393 379 { ··· 431 415 }, 432 416 { 433 417 .part_id = 0x722, 418 + .name_prefix = "rt722", 434 419 .version_id = 3, 435 420 .dais = { 436 421 { ··· 476 459 }, 477 460 { 478 461 .part_id = 0x8373, 462 + .name_prefix = "Left", 479 463 .dais = { 480 464 { 481 465 .direction = {true, true}, ··· 496 478 }, 497 479 { 498 480 .part_id = 0x8363, 481 + .name_prefix = "Left", 499 482 .dais = { 500 483 { 501 484 .direction = {true, false}, ··· 516 497 }, 517 498 { 518 499 .part_id = 0x5682, 500 + .name_prefix = "rt5682", 519 501 .dais = { 520 502 { 521 503 .direction = {true, true}, ··· 534 514 }, 535 515 { 536 516 .part_id = 0x3556, 517 + .name_prefix = "AMP", 537 518 .dais = { 538 519 { 539 520 .direction = {true, false}, ··· 587 566 }, 588 567 { 589 568 .part_id = 0x4242, 569 + .name_prefix = "cs42l42", 590 570 .dais = { 591 571 { 592 572 .direction = {true, true}, ··· 605 583 }, 606 584 { 607 585 .part_id = 0x4243, 586 + .name_prefix = "cs42l43", 608 587 .codec_name = "cs42l43-codec", 609 588 .count_sidecar = asoc_sdw_bridge_cs35l56_count_sidecar, 610 589 .add_sidecar = asoc_sdw_bridge_cs35l56_add_sidecar, ··· 657 634 }, 658 635 { 659 636 .part_id = 0xaaaa, /* generic codec mockup */ 637 + .name_prefix = "sdw_mockup_mmulti-function", 660 638 .version_id = 0, 661 639 .dais = { 662 640 { ··· 683 659 }, 684 660 { 685 661 .part_id = 0xaa55, /* headset codec mockup */ 662 + .name_prefix = "sdw_mockup_headset0", 686 663 .version_id = 0, 687 664 .dais = { 688 665 { ··· 697 672 }, 698 673 { 699 674 .part_id = 0x55aa, /* amplifier mockup */ 675 + .name_prefix = "sdw_mockup_amp1", 700 676 .version_id = 0, 701 677 .dais = { 702 678 { ··· 711 685 }, 712 686 { 713 687 .part_id = 0x5555, 688 + .name_prefix = "sdw_mockup_mic0", 714 689 .version_id = 0, 715 690 .dais = { 716 691 { ··· 1239 1212 } 1240 1213 EXPORT_SYMBOL_NS(asoc_sdw_find_dailink, "SND_SOC_SDW_UTILS"); 1241 1214 1242 - static int asoc_sdw_get_dai_type(u32 type) 1215 + int asoc_sdw_get_dai_type(u32 type) 1243 1216 { 1244 1217 switch (type) { 1245 1218 case SDCA_FUNCTION_TYPE_SMART_AMP: ··· 1257 1230 return -EINVAL; 1258 1231 } 1259 1232 } 1233 + EXPORT_SYMBOL_NS(asoc_sdw_get_dai_type, "SND_SOC_SDW_UTILS"); 1260 1234 1261 1235 /* 1262 1236 * Check if the SDCA endpoint is present by the SDW peripheral
+11 -1
sound/soc/sof/fw-file-profile.c
··· 73 73 if (!profile->tplg_path || !profile->tplg_name) 74 74 return 0; 75 75 76 + /* Dummy topology does not exist and should not be used */ 77 + if (strstr(profile->tplg_name, "dummy")) 78 + return 0; 79 + 76 80 tplg_filename = kasprintf(GFP_KERNEL, "%s/%s", profile->tplg_path, 77 81 profile->tplg_name); 78 82 if (!tplg_filename) ··· 270 266 enum sof_ipc_type ipc_type, 271 267 struct sof_loadable_file_profile *profile) 272 268 { 269 + struct snd_sof_pdata *plat_data = sdev->pdata; 273 270 struct device *dev = sdev->dev; 274 271 275 272 if (ipc_type != profile->ipc_type) ··· 287 282 288 283 if (profile->fw_lib_path) 289 284 dev_info(dev, " Firmware lib path: %s\n", profile->fw_lib_path); 290 - dev_info(dev, " Topology file: %s/%s\n", profile->tplg_path, profile->tplg_name); 285 + 286 + if (plat_data->machine->get_function_tplg_files && !plat_data->disable_function_topology) 287 + dev_info(dev, " Topology file: function topologies\n"); 288 + else 289 + dev_info(dev, " Topology file: %s/%s\n", 290 + profile->tplg_path, profile->tplg_name); 291 291 } 292 292 293 293 int sof_create_ipc_file_profile(struct snd_sof_dev *sdev,
+1
sound/soc/sof/intel/apl.c
··· 118 118 .power_down_dsp = hda_power_down_dsp, 119 119 .disable_interrupts = hda_dsp_disable_interrupts, 120 120 .hw_ip_version = SOF_INTEL_CAVS_1_5_PLUS, 121 + .platform = "apl", 121 122 };
+2
sound/soc/sof/intel/cnl.c
··· 479 479 .power_down_dsp = hda_power_down_dsp, 480 480 .disable_interrupts = hda_dsp_disable_interrupts, 481 481 .hw_ip_version = SOF_INTEL_CAVS_1_8, 482 + .platform = "cnl", 482 483 }; 483 484 484 485 /* ··· 516 515 .power_down_dsp = hda_power_down_dsp, 517 516 .disable_interrupts = hda_dsp_disable_interrupts, 518 517 .hw_ip_version = SOF_INTEL_CAVS_2_0, 518 + .platform = "jsl", 519 519 }; 520 520 EXPORT_SYMBOL_NS(jsl_chip_info, "SND_SOC_SOF_INTEL_CNL");
+203 -2
sound/soc/sof/intel/hda.c
··· 26 26 #include <sound/intel-dsp-config.h> 27 27 #include <sound/intel-nhlt.h> 28 28 #include <sound/soc-acpi-intel-ssp-common.h> 29 + #include <sound/soc_sdw_utils.h> 29 30 #include <sound/sof.h> 30 31 #include <sound/sof/xtensa.h> 31 32 #include <sound/hda-mlink.h> ··· 34 33 #include "../sof-pci-dev.h" 35 34 #include "../ops.h" 36 35 #include "../ipc4-topology.h" 36 + #include "../../intel/common/sof-function-topology-lib.h" 37 37 #include "hda.h" 38 38 39 39 #include <trace/events/sof_intel.h> ··· 1133 1131 1134 1132 #if IS_ENABLED(CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE) 1135 1133 1134 + static bool is_endpoint_present(struct sdw_slave *sdw_device, 1135 + struct asoc_sdw_codec_info *dai_info, int dai_type) 1136 + { 1137 + int i; 1138 + 1139 + for (i = 0; i < sdw_device->sdca_data.num_functions; i++) { 1140 + if (dai_type == dai_info->dais[i].dai_type) 1141 + return true; 1142 + } 1143 + dev_dbg(&sdw_device->dev, "Endpoint DAI type %d not found\n", dai_type); 1144 + return false; 1145 + } 1146 + 1147 + static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev, 1148 + struct sdw_slave *sdw_device, 1149 + struct snd_soc_acpi_link_adr *link, 1150 + int *amp_index) 1151 + { 1152 + struct snd_soc_acpi_adr_device *adr_dev; 1153 + const char *name_prefix = ""; 1154 + int index = link->num_adr; 1155 + bool is_amp = true; /* Set it to false if the codec wiah any NON-AMP DAI type */ 1156 + int ep_index = 0; 1157 + int i, j; 1158 + 1159 + link->mask = BIT(sdw_device->bus->link_id); 1160 + /* index is 0 based, we need allocate index + 1 for the array size */ 1161 + if (!index) 1162 + adr_dev = devm_kzalloc(dev, sizeof(*adr_dev), GFP_KERNEL); 1163 + else 1164 + adr_dev = devm_krealloc(dev, (struct snd_soc_acpi_adr_device *)link->adr_d, 1165 + (index + 1) * sizeof(*adr_dev), GFP_KERNEL); 1166 + 1167 + if (!adr_dev) 1168 + return NULL; 1169 + 1170 + for (i = 0; i < asoc_sdw_get_codec_info_list_count(); i++) { 1171 + struct snd_soc_acpi_endpoint *endpoints; 1172 + int amp_group_id = 1; 1173 + 1174 + if (sdw_device->id.part_id != codec_info_list[i].part_id) 1175 + continue; 1176 + 1177 + endpoints = devm_kcalloc(dev, codec_info_list[i].dai_num, 1178 + sizeof(struct snd_soc_acpi_endpoint), GFP_KERNEL); 1179 + if (!endpoints) 1180 + return NULL; 1181 + 1182 + name_prefix = codec_info_list[i].name_prefix; 1183 + /* 1184 + * This should not happen, but add a paranoid check to avoid NULL pointer 1185 + * dereference 1186 + */ 1187 + if (!name_prefix) { 1188 + dev_err(dev, "codec_info_list name_prefix of part id %#x is missing\n", 1189 + codec_info_list[i].part_id); 1190 + return NULL; 1191 + } 1192 + for (j = 0; j < codec_info_list[i].dai_num; j++) { 1193 + /* Check if the endpoint is present by the SDCA DisCo table */ 1194 + if (!is_endpoint_present(sdw_device, &codec_info_list[i], 1195 + codec_info_list[i].dais[j].dai_type)) 1196 + continue; 1197 + 1198 + endpoints[ep_index].num = ep_index; 1199 + if (codec_info_list[i].dais[j].dai_type == SOC_SDW_DAI_TYPE_AMP) { 1200 + /* Assume all amp are aggregated */ 1201 + endpoints[ep_index].aggregated = 1; 1202 + endpoints[ep_index].group_id = amp_group_id; 1203 + endpoints[ep_index].group_position = *amp_index; 1204 + /* Set group id = 2 for feedback capture endpoint */ 1205 + amp_group_id++; 1206 + } else { 1207 + endpoints[ep_index].aggregated = 0; 1208 + endpoints[ep_index].group_id = 0; 1209 + endpoints[ep_index].group_position = 0; 1210 + is_amp = false; 1211 + } 1212 + ep_index++; 1213 + } 1214 + adr_dev[index].endpoints = endpoints; 1215 + adr_dev[index].num_endpoints = ep_index; 1216 + break; 1217 + } 1218 + 1219 + if (i == asoc_sdw_get_codec_info_list_count()) { 1220 + dev_err(dev, "part id %#x is not supported\n", sdw_device->id.part_id); 1221 + return NULL; 1222 + } 1223 + 1224 + adr_dev[index].adr = ((u64)sdw_device->id.class_id & 0xFF) | 1225 + ((u64)sdw_device->id.part_id & 0xFFFF) << 8 | 1226 + ((u64)sdw_device->id.mfg_id & 0xFFFF) << 24 | 1227 + ((u64)(sdw_device->id.unique_id & 0xF) << 40) | 1228 + ((u64)(sdw_device->id.sdw_version & 0xF) << 44) | 1229 + ((u64)(sdw_device->bus->link_id & 0xF) << 48); 1230 + 1231 + if (!is_amp) { 1232 + /* For non-amp codecs, get name_prefix from codec_info_list[] */ 1233 + adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, "%s", name_prefix); 1234 + goto done_name_prefix; 1235 + } 1236 + 1237 + /* 1238 + * The name_prefix comes from codec_info_list which has a name_prefix per codec. 1239 + * And we need to give a unique name_prefix for each amp and should be backwards 1240 + * compatible to the existing acpi match tables to not break existing UCMs. 1241 + * For the common name_prefix, we append the amp index to it. However, for the 1242 + * "Left" name_prefix, we convert the second amp name_prefix to "Right" and 1243 + * for the third and further amps, we set the name_prefix to "AMP<amp_index>". 1244 + */ 1245 + if (!strcmp(name_prefix, "Left")) { 1246 + switch (*amp_index) { 1247 + case 1: 1248 + adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, 1249 + "%s", "Left"); 1250 + break; 1251 + case 2: 1252 + adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, 1253 + "%s", "Right"); 1254 + break; 1255 + default: 1256 + /* Set the name_fix to AMP<amp_index> if there are more than 2 amps */ 1257 + adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, "%s%d", 1258 + "AMP", *amp_index); 1259 + break; 1260 + } 1261 + } else { 1262 + adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, "%s%d", 1263 + name_prefix, 1264 + *amp_index); 1265 + } 1266 + (*amp_index)++; 1267 + 1268 + done_name_prefix: 1269 + if (!adr_dev[index].name_prefix) { 1270 + dev_err(dev, "failed to allocate memory for name_prefix\n"); 1271 + return NULL; 1272 + } 1273 + 1274 + dev_dbg(dev, "adr[%d] 0x%llx link id %d name_prefix \"%s\" is found\n", 1275 + index, adr_dev[index].adr, sdw_device->bus->link_id, adr_dev[index].name_prefix); 1276 + 1277 + link->num_adr++; 1278 + 1279 + return adr_dev; 1280 + } 1281 + 1136 1282 static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev) 1137 1283 { 1138 1284 struct snd_sof_pdata *pdata = sdev->pdata; 1139 1285 const struct snd_soc_acpi_link_adr *link; 1286 + const struct sof_intel_dsp_desc *chip; 1287 + struct snd_soc_acpi_link_adr *links; 1140 1288 struct sdw_peripherals *peripherals; 1141 1289 struct snd_soc_acpi_mach *mach; 1142 1290 struct sof_intel_hda_dev *hdev; 1143 - u32 link_mask; 1291 + int link_index, link_num; 1292 + int amp_index = 1; 1293 + u32 link_mask = 0; 1144 1294 int i; 1145 1295 1146 1296 hdev = pdata->hw_pdata; ··· 1369 1215 peripherals->array[i]->id.part_id, 1370 1216 peripherals->array[i]->id.sdw_version); 1371 1217 1372 - return NULL; 1218 + chip = get_chip_info(sdev->pdata); 1219 + 1220 + /* SDCA was not well supported in the BIOS before ACE2.0 */ 1221 + if (chip->hw_ip_version < SOF_INTEL_ACE_2_0) 1222 + return NULL; 1223 + 1224 + if (!peripherals->num_peripherals) 1225 + return NULL; 1226 + 1227 + /* Create default SDW mach */ 1228 + mach = devm_kzalloc(sdev->dev, sizeof(*mach), GFP_KERNEL); 1229 + if (!mach) 1230 + return NULL; 1231 + 1232 + /* Get link mask and link number */ 1233 + for (i = 0; i < peripherals->num_peripherals; i++) 1234 + link_mask |= BIT(peripherals->array[i]->bus->link_id); 1235 + 1236 + link_num = hweight32(link_mask); 1237 + links = devm_kcalloc(sdev->dev, link_num, sizeof(*links), GFP_KERNEL); 1238 + if (!links) 1239 + return NULL; 1240 + 1241 + /* Generate snd_soc_acpi_link_adr struct for each peripheral reported by the ACPI table */ 1242 + for (i = 0; i < peripherals->num_peripherals; i++) { 1243 + /* link_index = the number of used links below the current link */ 1244 + link_index = hweight32(link_mask & (BIT(peripherals->array[i]->bus->link_id) - 1)); 1245 + links[link_index].adr_d = find_acpi_adr_device(sdev->dev, peripherals->array[i], 1246 + &links[link_index], &amp_index); 1247 + if (!links[link_index].adr_d) 1248 + return NULL; 1249 + } 1250 + 1251 + mach->drv_name = "sof_sdw"; 1252 + mach->mach_params.links = links; 1253 + mach->mach_params.link_mask = link_mask; 1254 + mach->mach_params.platform = dev_name(sdev->dev); 1255 + mach->get_function_tplg_files = sof_sdw_get_tplg_files; 1256 + /* 1257 + * Set mach->sof_tplg_filename as a dummy topology to avoid tplg file checking 1258 + * and being used. 1259 + */ 1260 + mach->sof_tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, 1261 + "sof-%s-dummy.tplg", chip->platform); 1262 + 1263 + dev_info(sdev->dev, "Use SoundWire default machine driver with function topologies\n"); 1264 + return mach; 1373 1265 } 1374 1266 #else 1375 1267 static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev) ··· 1743 1543 MODULE_IMPORT_NS("SND_INTEL_SOUNDWIRE_ACPI"); 1744 1544 MODULE_IMPORT_NS("SOUNDWIRE_INTEL_INIT"); 1745 1545 MODULE_IMPORT_NS("SOUNDWIRE_INTEL"); 1546 + MODULE_IMPORT_NS("SND_SOC_SDW_UTILS"); 1746 1547 MODULE_IMPORT_NS("SND_SOC_SOF_HDA_MLINK"); 1747 1548 MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_HDA_COMMON"); 1748 1549 MODULE_IMPORT_NS("SND_SOC_ACPI_INTEL_MATCH");
+1
sound/soc/sof/intel/icl.c
··· 193 193 .power_down_dsp = hda_power_down_dsp, 194 194 .disable_interrupts = hda_dsp_disable_interrupts, 195 195 .hw_ip_version = SOF_INTEL_CAVS_2_0, 196 + .platform = "icl", 196 197 };
+1
sound/soc/sof/intel/lnl.c
··· 183 183 .power_down_dsp = mtl_power_down_dsp, 184 184 .disable_interrupts = lnl_dsp_disable_interrupts, 185 185 .hw_ip_version = SOF_INTEL_ACE_2_0, 186 + .platform = "lnl", 186 187 }; 187 188 188 189 MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_MTL");
+2
sound/soc/sof/intel/mtl.c
··· 786 786 .power_down_dsp = mtl_power_down_dsp, 787 787 .disable_interrupts = mtl_dsp_disable_interrupts, 788 788 .hw_ip_version = SOF_INTEL_ACE_1_0, 789 + .platform = "mtl", 789 790 }; 790 791 791 792 const struct sof_intel_dsp_desc arl_s_chip_info = { ··· 815 814 .power_down_dsp = mtl_power_down_dsp, 816 815 .disable_interrupts = mtl_dsp_disable_interrupts, 817 816 .hw_ip_version = SOF_INTEL_ACE_1_0, 817 + .platform = "arl", 818 818 };
+2
sound/soc/sof/intel/ptl.c
··· 125 125 .power_down_dsp = mtl_power_down_dsp, 126 126 .disable_interrupts = lnl_dsp_disable_interrupts, 127 127 .hw_ip_version = SOF_INTEL_ACE_3_0, 128 + .platform = "ptl", 128 129 }; 129 130 130 131 const struct sof_intel_dsp_desc wcl_chip_info = { ··· 150 149 .power_down_dsp = mtl_power_down_dsp, 151 150 .disable_interrupts = lnl_dsp_disable_interrupts, 152 151 .hw_ip_version = SOF_INTEL_ACE_3_0, 152 + .platform = "wcl", 153 153 }; 154 154 155 155 MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_MTL");
+1
sound/soc/sof/intel/shim.h
··· 186 186 u32 sdw_alh_base; 187 187 u32 d0i3_offset; 188 188 u32 quirks; 189 + const char *platform; 189 190 enum sof_intel_hw_ip_version hw_ip_version; 190 191 int (*read_sdw_lcount)(struct snd_sof_dev *sdev); 191 192 void (*enable_sdw_irq)(struct snd_sof_dev *sdev, bool enable);
+1
sound/soc/sof/intel/skl.c
··· 113 113 .power_down_dsp = hda_power_down_dsp, 114 114 .disable_interrupts = hda_dsp_disable_interrupts, 115 115 .hw_ip_version = SOF_INTEL_CAVS_1_5, 116 + .platform = "skl", 116 117 }; 117 118 EXPORT_SYMBOL_NS(skl_chip_info, "SND_SOC_SOF_INTEL_HDA_COMMON");
+4
sound/soc/sof/intel/tgl.c
··· 162 162 .power_down_dsp = hda_power_down_dsp, 163 163 .disable_interrupts = hda_dsp_disable_interrupts, 164 164 .hw_ip_version = SOF_INTEL_CAVS_2_5, 165 + .platform = "tgl", 165 166 }; 166 167 167 168 const struct sof_intel_dsp_desc tglh_chip_info = { ··· 192 191 .power_down_dsp = hda_power_down_dsp, 193 192 .disable_interrupts = hda_dsp_disable_interrupts, 194 193 .hw_ip_version = SOF_INTEL_CAVS_2_5, 194 + .platform = "tgl", 195 195 }; 196 196 197 197 const struct sof_intel_dsp_desc ehl_chip_info = { ··· 222 220 .power_down_dsp = hda_power_down_dsp, 223 221 .disable_interrupts = hda_dsp_disable_interrupts, 224 222 .hw_ip_version = SOF_INTEL_CAVS_2_5, 223 + .platform = "ehl", 225 224 }; 226 225 227 226 const struct sof_intel_dsp_desc adls_chip_info = { ··· 252 249 .power_down_dsp = hda_power_down_dsp, 253 250 .disable_interrupts = hda_dsp_disable_interrupts, 254 251 .hw_ip_version = SOF_INTEL_CAVS_2_5, 252 + .platform = "adl", 255 253 };
+6 -1
sound/soc/sof/topology.c
··· 2523 2523 * callback or the callback returns 0. 2524 2524 */ 2525 2525 if (!tplg_cnt) { 2526 + if (strstr(file, "dummy")) { 2527 + dev_err(scomp->dev, 2528 + "Function topology is required, please upgrade sof-firmware\n"); 2529 + return -EINVAL; 2530 + } 2526 2531 tplg_files[0] = file; 2527 2532 tplg_cnt = 1; 2528 - dev_dbg(scomp->dev, "loading topology: %s\n", file); 2533 + dev_info(scomp->dev, "loading topology: %s\n", file); 2529 2534 } else { 2530 2535 dev_info(scomp->dev, "Using function topologies instead %s\n", file); 2531 2536 }