File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ struct snd_sof_pdata {
106
106
const char * fw_filename ;
107
107
const char * tplg_filename_prefix ;
108
108
const char * tplg_filename ;
109
+ bool disable_function_topology ;
109
110
110
111
/* loadable external libraries available under this directory */
111
112
const char * fw_lib_prefix ;
Original file line number Diff line number Diff line change @@ -607,7 +607,8 @@ static void sof_probe_work(struct work_struct *work)
607
607
}
608
608
609
609
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 )
611
612
{
612
613
if (override_ipc_type >= 0 && override_ipc_type < SOF_IPC_TYPE_COUNT )
613
614
path_override -> ipc_type = override_ipc_type ;
@@ -619,8 +620,11 @@ sof_apply_profile_override(struct sof_loadable_file_profile *path_override)
619
620
path_override -> fw_lib_path = override_lib_path ;
620
621
if (override_tplg_path )
621
622
path_override -> tplg_path = override_tplg_path ;
622
- if (override_tplg_filename )
623
+ if (override_tplg_filename ) {
623
624
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
+ }
624
628
}
625
629
626
630
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)
654
658
}
655
659
}
656
660
657
- sof_apply_profile_override (& plat_data -> ipc_file_profile_base );
661
+ sof_apply_profile_override (& plat_data -> ipc_file_profile_base , plat_data );
658
662
659
663
/* Initialize sof_ops based on the initial selected IPC version */
660
664
ret = sof_init_sof_ops (sdev );
Original file line number Diff line number Diff line change 19
19
#include "sof-audio.h"
20
20
#include "ops.h"
21
21
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
+
22
26
#define COMP_ID_UNASSIGNED 0xffffffff
23
27
/*
24
28
* Constants used in the computation of linear volume gain
@@ -2481,7 +2485,8 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
2481
2485
if (!tplg_files )
2482
2486
return - ENOMEM ;
2483
2487
2484
- if (sof_pdata -> machine && 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 ) {
2485
2490
tplg_cnt = sof_pdata -> machine -> get_function_tplg_files (scomp -> card ,
2486
2491
sof_pdata -> machine ,
2487
2492
tplg_filename_prefix ,
You can’t perform that action at this time.
0 commit comments