Skip to content

Commit 92b5f92

Browse files
bardliaobroonie
authored andcommitted
ASoC: SOF: set disable_function_topology if override_tplg_filename is set
User will expect the specified topology is used when override_tplg_filename is set. However, the using function topologies feature may use the function topologies instead of the specified topology. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20250506113311.45487-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent e48a906 commit 92b5f92

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

sound/soc/sof/core.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,8 @@ static void sof_probe_work(struct work_struct *work)
607607
}
608608

609609
static void
610-
sof_apply_profile_override(struct sof_loadable_file_profile *path_override)
610+
sof_apply_profile_override(struct sof_loadable_file_profile *path_override,
611+
struct snd_sof_pdata *plat_data)
611612
{
612613
if (override_ipc_type >= 0 && override_ipc_type < SOF_IPC_TYPE_COUNT)
613614
path_override->ipc_type = override_ipc_type;
@@ -619,8 +620,11 @@ sof_apply_profile_override(struct sof_loadable_file_profile *path_override)
619620
path_override->fw_lib_path = override_lib_path;
620621
if (override_tplg_path)
621622
path_override->tplg_path = override_tplg_path;
622-
if (override_tplg_filename)
623+
if (override_tplg_filename) {
623624
path_override->tplg_name = override_tplg_filename;
625+
/* User requested a specific topology file and expect it to be loaded */
626+
plat_data->disable_function_topology = true;
627+
}
624628
}
625629

626630
int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data)
@@ -654,7 +658,7 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data)
654658
}
655659
}
656660

657-
sof_apply_profile_override(&plat_data->ipc_file_profile_base);
661+
sof_apply_profile_override(&plat_data->ipc_file_profile_base, plat_data);
658662

659663
/* Initialize sof_ops based on the initial selected IPC version */
660664
ret = sof_init_sof_ops(sdev);

0 commit comments

Comments
 (0)