Skip to content

Commit fb66eed

Browse files
bardliaoranj063
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>
1 parent 1d2c70e commit fb66eed

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sound/soc/sof/topology.c

Lines changed: 6 additions & 1 deletion
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 = false;
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
@@ -2502,7 +2506,8 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
25022506
if (!tplg_files)
25032507
return -ENOMEM;
25042508

2505-
if (!sof_pdata->disable_function_topology && sof_pdata->machine->get_function_tplg_files) {
2509+
if (!sof_pdata->disable_function_topology && !disable_function_topology &&
2510+
sof_pdata->machine->get_function_tplg_files) {
25062511
tplg_cnt = sof_pdata->machine->get_function_tplg_files(scomp->card,
25072512
sof_pdata->machine,
25082513
tplg_filename_prefix,

0 commit comments

Comments
 (0)