[PATCH] ASoC: SOF: sof-of-dev: add parameter to override tplg/fw_filename

Daniel Baluta posted 1 patch 1 month, 1 week ago
sound/soc/sof/sof-of-dev.c | 10 ++++++++++
1 file changed, 10 insertions(+)
[PATCH] ASoC: SOF: sof-of-dev: add parameter to override tplg/fw_filename
Posted by Daniel Baluta 1 month, 1 week ago
From: Anne Onciulescu <anne.onciulescu@gmail.com>

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>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Chao Song <chao.song@linux.intel.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
 sound/soc/sof/sof-of-dev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c
index 71f7153cf79c..f245c1b48c47 100644
--- a/sound/soc/sof/sof-of-dev.c
+++ b/sound/soc/sof/sof-of-dev.c
@@ -18,10 +18,18 @@ static char *fw_path;
 module_param(fw_path, charp, 0444);
 MODULE_PARM_DESC(fw_path, "alternate path for SOF firmware.");
 
+static char *fw_filename;
+module_param(fw_filename, charp, 0444);
+MODULE_PARM_DESC(fw_filename, "alternate filename for SOF firmware.");
+
 static char *tplg_path;
 module_param(tplg_path, charp, 0444);
 MODULE_PARM_DESC(tplg_path, "alternate path for SOF topology.");
 
+static char *tplg_filename;
+module_param(tplg_filename, charp, 0444);
+MODULE_PARM_DESC(tplg_filename, "alternate filename for SOF topology.");
+
 const struct dev_pm_ops sof_of_pm = {
 	.prepare = snd_sof_prepare,
 	.complete = snd_sof_complete,
@@ -68,6 +76,8 @@ int sof_of_probe(struct platform_device *pdev)
 	sof_pdata->ipc_file_profile_base.ipc_type = desc->ipc_default;
 	sof_pdata->ipc_file_profile_base.fw_path = fw_path;
 	sof_pdata->ipc_file_profile_base.tplg_path = tplg_path;
+	sof_pdata->ipc_file_profile_base.fw_name = fw_filename;
+	sof_pdata->ipc_file_profile_base.tplg_name = tplg_filename;
 
 	/* set callback to be called on successful device probe to enable runtime_pm */
 	sof_pdata->sof_probe_complete = sof_of_probe_complete;
-- 
2.43.0
Re: [PATCH] ASoC: SOF: sof-of-dev: add parameter to override tplg/fw_filename
Posted by Mark Brown 1 month, 1 week ago
On Thu, 17 Oct 2024 14:03:13 +0300, Daniel Baluta wrote:
> Add support to override topology and firmware filename,
> using module parameters. This is helpful for development
> and also for testing various scenarios.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: sof-of-dev: add parameter to override tplg/fw_filename
      commit: 9cb86a9cf12504c8dd60b40a6a200856852c1813

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark