diff mbox series

[1/3] ASoC: SOF: allow soundwire use desc->default_fw_filename

Message ID 20210125070500.807474-1-kai.vehmanen@linux.intel.com
State New
Headers show
Series [1/3] ASoC: SOF: allow soundwire use desc->default_fw_filename | expand

Commit Message

Kai Vehmanen Jan. 25, 2021, 7:04 a.m. UTC
From: Libin Yang <libin.yang@intel.com>

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: Libin Yang <libin.yang@intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/sof/intel/hda.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Jaroslav Kysela Jan. 26, 2021, 4:42 p.m. UTC | #1
Dne 25. 01. 21 v 8:04 Kai Vehmanen napsal(a):
> From: Libin Yang <libin.yang@intel.com>
> 
> 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: Libin Yang <libin.yang@intel.com>
> Reviewed-by: Bard Liao <bard.liao@intel.com>
> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>

Tested-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela Jan. 26, 2021, 4:43 p.m. UTC | #2
Dne 25. 01. 21 v 8:04 Kai Vehmanen napsal(a):
> From: Libin Yang <libin.yang@intel.com>
> 
> tgl_3_in_1_default link topology may be used by both TGL-LP and TGL-H.
> Let's remove the sof_fw_filename setting in struct snd_soc_acpi_mach
> and use the default_fw_filename setting in struct sof_dev_desc.
> 
> Signed-off-by: Libin Yang <libin.yang@intel.com>
> Reviewed-by: Bard Liao <bard.liao@intel.com>
> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>

Tested-by: Jaroslav Kysela <perex@perex.cz>
Mark Brown Jan. 27, 2021, 5:13 p.m. UTC | #3
On Mon, 25 Jan 2021 09:04:58 +0200, Kai Vehmanen wrote:
> 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.

Applied to

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

Thanks!

[1/3] ASoC: SOF: allow soundwire use desc->default_fw_filename
      commit: 7da99ef9757a3dd6e66a9b4854c5e58cd65a0b9a
[2/3] ASoC: Intel: tgl: remove sof_fw_filename set for tgl_3_in_1_default
      commit: 3d14932527ff09517f052e54e7c25d676120b33a

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
Mark Brown Jan. 27, 2021, 5:45 p.m. UTC | #4
On Mon, 25 Jan 2021 09:04:58 +0200, Kai Vehmanen wrote:
> 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.

Applied to

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

Thanks!

[3/3] ASoC: Intel: adl: remove sof_fw_filename setting in ADL snd_soc_acpi_mach
      commit: e32df142359fb6f4d27977b7652549f0844aa62f

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
diff mbox series

Patch

diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 7e703ce22fcd..d99a552eea53 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -1169,7 +1169,10 @@  static int hda_sdw_machine_select(struct snd_sof_dev *sdev)
 			mach->mach_params.links = mach->links;
 			mach->mach_params.link_mask = mach->link_mask;
 			mach->mach_params.platform = dev_name(sdev->dev);
-			pdata->fw_filename = mach->sof_fw_filename;
+			if (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;
 		} else {
 			dev_info(sdev->dev,