Commit 7da99ef9 authored by Libin Yang's avatar Libin Yang Committed by Mark Brown

ASoC: SOF: allow soundwire use desc->default_fw_filename

The old code always uses sof_fw_filename in struct snd_soc_acpi_mach
as the firmware name. However, firmware name should depend on the platform
instead of the machine. For example, different machines may use the same
soundwire link topology, but they are using the different firmware. In this
case, it's hard to determine in struct snd_soc_acpi_mach which firmware it
should use.
Signed-off-by: default avatarLibin Yang <libin.yang@intel.com>
Reviewed-by: default avatarBard Liao <bard.liao@intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Tested-by: default avatarJaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210125070500.807474-1-kai.vehmanen@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ae07f5c7
...@@ -1173,7 +1173,10 @@ static int hda_sdw_machine_select(struct snd_sof_dev *sdev) ...@@ -1173,7 +1173,10 @@ static int hda_sdw_machine_select(struct snd_sof_dev *sdev)
mach->mach_params.links = mach->links; mach->mach_params.links = mach->links;
mach->mach_params.link_mask = mach->link_mask; mach->mach_params.link_mask = mach->link_mask;
mach->mach_params.platform = dev_name(sdev->dev); mach->mach_params.platform = dev_name(sdev->dev);
if (mach->sof_fw_filename)
pdata->fw_filename = mach->sof_fw_filename; pdata->fw_filename = mach->sof_fw_filename;
else
pdata->fw_filename = pdata->desc->default_fw_filename;
pdata->tplg_filename = mach->sof_tplg_filename; pdata->tplg_filename = mach->sof_tplg_filename;
} else { } else {
dev_info(sdev->dev, dev_info(sdev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment