Skip to content

Commit a8cc01c

Browse files
AnneOnciulescudbaluta
authored andcommitted
ASoC: SOF: sof-of-dev: add parameter to override tplg/fw_filename
Add support to override topology and firmware filename, using module parameters. This is helpful for development and also for testing various scenarios. Signed-off-by: Anne Onciulescu <anne.onciulescu@gmail.com>
1 parent 2e6038a commit a8cc01c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

sound/soc/sof/sof-of-dev.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,18 @@ static char *fw_path;
1818
module_param(fw_path, charp, 0444);
1919
MODULE_PARM_DESC(fw_path, "alternate path for SOF firmware.");
2020

21+
static char *fw_filename;
22+
module_param(fw_filename, charp, 0444);
23+
MODULE_PARM_DESC(fw_filename, "alternate filename for SOF firmware.");
24+
2125
static char *tplg_path;
2226
module_param(tplg_path, charp, 0444);
2327
MODULE_PARM_DESC(tplg_path, "alternate path for SOF topology.");
2428

29+
static char *tplg_filename;
30+
module_param(tplg_filename, charp, 0444);
31+
MODULE_PARM_DESC(tplg_filename, "alternate filename for SOF topology.");
32+
2533
const struct dev_pm_ops sof_of_pm = {
2634
.prepare = snd_sof_prepare,
2735
.complete = snd_sof_complete,
@@ -68,6 +76,8 @@ int sof_of_probe(struct platform_device *pdev)
6876
sof_pdata->ipc_file_profile_base.ipc_type = desc->ipc_default;
6977
sof_pdata->ipc_file_profile_base.fw_path = fw_path;
7078
sof_pdata->ipc_file_profile_base.tplg_path = tplg_path;
79+
sof_pdata->ipc_file_profile_base.fw_name = fw_filename;
80+
sof_pdata->ipc_file_profile_base.tplg_name = tplg_filename;
7181

7282
/* set callback to be called on successful device probe to enable runtime_pm */
7383
sof_pdata->sof_probe_complete = sof_of_probe_complete;

0 commit comments

Comments
 (0)