]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ASoC: SOF: add disable_function_topology flag
authorBard Liao <yung-chuan.liao@linux.intel.com>
Tue, 6 May 2025 11:33:08 +0000 (19:33 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 6 May 2025 13:48:03 +0000 (22:48 +0900)
SOF driver will load required function topologies dynamically. However,
we prefer using the monolithic topology. Add a flag to allow user not
using the function topologies.

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-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/sof.h
sound/soc/sof/topology.c

index 64fd5504cb2b63eb05e1896cb17b693f7113282f..eddea82c7b5a907433a55f200d115431e3a8e774 100644 (file)
@@ -106,6 +106,7 @@ struct snd_sof_pdata {
        const char *fw_filename;
        const char *tplg_filename_prefix;
        const char *tplg_filename;
+       bool disable_function_topology;
 
        /* loadable external libraries available under this directory */
        const char *fw_lib_prefix;
index 5d3ee3a86392c5a3fbfd05f83acc99b102c8cf61..fd80451cb4c075c998504a904054e5fc216ee63d 100644 (file)
@@ -2481,7 +2481,8 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
        if (!tplg_files)
                return -ENOMEM;
 
-       if (sof_pdata->machine && sof_pdata->machine->get_function_tplg_files) {
+       if (!sof_pdata->disable_function_topology && sof_pdata->machine &&
+           sof_pdata->machine->get_function_tplg_files) {
                tplg_cnt = sof_pdata->machine->get_function_tplg_files(scomp->card,
                                                                       sof_pdata->machine,
                                                                       tplg_filename_prefix,