linux/sound/soc/sof/amd
Cristian Ciocaltea d9cacc1a2a
ASoC: SOF: amd: Compute file paths on firmware load
Commit 6c393ebbd7 ("ASoC: SOF: core: Implement IPC version fallback if
firmware files are missing") changed the order of some operations and
the firmware paths are not available anymore at snd_sof_probe() time.

Precisely, fw_filename_prefix is set by sof_select_ipc_and_paths() via

  plat_data->fw_filename_prefix = out_profile.fw_path;

but sof_init_environment() which calls this function was moved from
snd_sof_device_probe() to sof_probe_continue(). Moreover,
snd_sof_probe() was moved from sof_probe_continue() to
sof_init_environment(), but before the call to
sof_select_ipc_and_paths().

The problem here is that amd_sof_acp_probe() uses fw_filename_prefix to
compute fw_code_bin and fw_data_bin paths, and because the field is not
yet initialized, the paths end up containing (null):

snd_sof_amd_vangogh 0000:04:00.5: Direct firmware load for (null)/sof-vangogh-code.bin failed with error -2
snd_sof_amd_vangogh 0000:04:00.5: sof signed firmware code bin is missing
snd_sof_amd_vangogh 0000:04:00.5: error: failed to load DSP firmware -2
snd_sof_amd_vangogh: probe of 0000:04:00.5 failed with error -2

Move usage of fw_filename_prefix right before request_firmware() calls
in acp_sof_load_signed_firmware().

Fixes: 6c393ebbd7 ("ASoC: SOF: core: Implement IPC version fallback if firmware files are missing")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Link: https://msgid.link/r/20231219030728.2431640-9-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-22 00:06:31 +00:00
..
acp63.c ASoC: SOF: amd: add support for acp6.3 based platform 2023-10-23 13:29:54 +01:00
acp-common.c ASoC: SOF: amd: remove duplicated including 2023-12-15 12:58:07 +00:00
acp-dsp-offset.h ASoC: SOF: amd: Add support for signed fw image loading 2023-08-21 16:05:48 +01:00
acp-ipc.c ASoC: SOF: amd: Refactor spinlock_irq(&sdev->ipc_lock) sequence in irq_handler 2023-12-19 14:02:45 +00:00
acp-loader.c ASoC: SOF: amd: Compute file paths on firmware load 2024-01-22 00:06:31 +00:00
acp-pcm.c ASoC: sof: amd: convert not to use asoc_xxx() 2023-09-25 14:16:44 +02:00
acp-probes.c ASoC: SOF: amd: Add Probe functionality support for amd platforms. 2023-07-17 06:15:35 +01:00
acp-stream.c ASoC: SOF: amd: increase SRAM inbox and outbox size to 1024 2022-09-20 19:38:04 +01:00
acp-trace.c ASoC: SOF: Modify the host trace_init parameter list to include dmab 2022-05-19 16:44:17 +01:00
acp.c ASoC: SOF: amd: Compute file paths on firmware load 2024-01-22 00:06:31 +00:00
acp.h ASoC: SOF: amd: Add acp-psp mailbox interface for iram-dram fence register modification 2023-12-19 14:02:49 +00:00
Kconfig ASoC: SOF: amd: add support for acp6.3 based platform 2023-10-23 13:29:54 +01:00
Makefile ASoC: SOF: amd: add support for acp6.3 based platform 2023-10-23 13:29:54 +01:00
pci-acp63.c ASoC: SOF: amd: add support for acp6.3 based platform 2023-10-23 13:29:54 +01:00
pci-rmb.c ASoC: Merge fixes for consistent cs42l43 schema 2023-10-10 17:07:17 +01:00
pci-rn.c ASoC: SOF: amd: Use generic names for IPC types 2023-09-19 13:49:09 +01:00
pci-vangogh.c ASoC: SOF: amd: Use generic names for IPC types 2023-09-19 13:49:09 +01:00
rembrandt.c ASoC: SOF: amd: remove acp_dai_probe() function 2023-04-03 12:15:32 +01:00
renoir.c ASoC: SOF: amd: remove acp_dai_probe() function 2023-04-03 12:15:32 +01:00
vangogh.c ASoC: SOF: amd: Enable signed firmware image loading for Vangogh platform 2023-08-21 16:05:49 +01:00