Skip to content

Commit 7b400c9

Browse files
bardliaobroonie
authored andcommitted
ASoC: SOF: add disable_function_topology module parameter
User can disable the loading function topology feature. 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-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 92b5f92 commit 7b400c9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

sound/soc/sof/topology.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
#include "sof-audio.h"
2020
#include "ops.h"
2121

22+
static bool disable_function_topology;
23+
module_param(disable_function_topology, bool, 0444);
24+
MODULE_PARM_DESC(disable_function_topology, "Disable function topology loading");
25+
2226
#define COMP_ID_UNASSIGNED 0xffffffff
2327
/*
2428
* Constants used in the computation of linear volume gain
@@ -2481,8 +2485,8 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
24812485
if (!tplg_files)
24822486
return -ENOMEM;
24832487

2484-
if (!sof_pdata->disable_function_topology && sof_pdata->machine &&
2485-
sof_pdata->machine->get_function_tplg_files) {
2488+
if (!sof_pdata->disable_function_topology && !disable_function_topology &&
2489+
sof_pdata->machine && sof_pdata->machine->get_function_tplg_files) {
24862490
tplg_cnt = sof_pdata->machine->get_function_tplg_files(scomp->card,
24872491
sof_pdata->machine,
24882492
tplg_filename_prefix,

0 commit comments

Comments
 (0)