From 9a1d0ed78ee90f429bcef31c5122fdf753dafb20 Mon Sep 17 00:00:00 2001 From: Stefan Ghetu Date: Wed, 2 Dec 2026 16:56:00 +0200 Subject: [PATCH] ASoC: SOF: keep the topology module parameter on DT platforms A topology name given with the tplg_filename module parameter is saved in sof_pdata->tplg_filename before the machine is selected. On DT platforms sof_of_machine_select() then overwrites it unconditionally with the machine table entry, so the parameter is ignored. With an IPC type override this also breaks the IPC selection: the file check looks for the machine's default topology in the IPC4 topology directory, does not find it and falls back to IPC3, e.g. on i.MX8MP: sof-audio-of-imx8 3b6e8000.dsp: Using fallback IPC type 0 (requested type was 1) Only take the machine's topology name when none was given, as the HDA machine selection already does. Fixes: d0ae9dc48e24 ("ASoC: SOF: Move sof_of_machine_select() to core.c from sof-of-dev.c") Signed-off-by: Stefan Ghetu --- sound/soc/sof/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c index ee01991c00a66f..da0c131cc271a5 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -191,7 +191,9 @@ static struct snd_sof_of_mach *sof_of_machine_select(struct snd_sof_dev *sdev) for (; mach->compatible; mach++) { if (of_machine_is_compatible(mach->compatible)) { - sof_pdata->tplg_filename = mach->sof_tplg_filename; + /* keep a topology name given as a module parameter */ + if (!sof_pdata->tplg_filename) + sof_pdata->tplg_filename = mach->sof_tplg_filename; if (mach->fw_filename) sof_pdata->fw_filename = mach->fw_filename;