From 2f23594c076f9d9096879743a9d6942e03744952 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Fri, 6 Feb 2026 17:01:16 +0800 Subject: [PATCH] ASoC: SOF: topology: Use acpi mach from the machine driver The parameters may be changed by the machine driver based on the actual hardware configuration. We need to use the acpi mach from the machine driver. Signed-off-by: Bard Liao --- sound/soc/sof/topology.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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);