diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index 98157b942eedb3..934fc9aa56a3ce 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -2516,6 +2516,7 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file) /* Try to use function topologies if possible */ if (!sof_pdata->disable_function_topology && !disable_function_topology && sof_pdata->machine && sof_pdata->machine->get_function_tplg_files) { + struct snd_soc_acpi_mach *card_mach = dev_get_platdata(scomp->card->dev); /* * When the topology name contains 'dummy' word, it means that * there is no fallback option to monolithic topology in case @@ -2530,8 +2531,12 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file) */ bool no_fallback = strstr(file, "dummy"); + /* + * Use the acpi mach from the machine driver because the machine driver may + * change the parameters based on the actual hardware configuration. + */ tplg_cnt = sof_pdata->machine->get_function_tplg_files(scomp->card, - sof_pdata->machine, + card_mach, tplg_filename_prefix, &tplg_files, no_fallback);