From cdba7acd253ae27cc89e6048e2bd9593853257b9 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Wed, 21 Oct 2026 17:12:21 +0300 Subject: [PATCH] [not upstream] ASoC: SOF: amd: fix upstream-20261015 merge for load_firmware op The upstream-20261015 merge (ec69dd1e9c24) brought in commit cec3598305a6 ("ASoC: SOF: amd: add ASP carveout firmware loading for ACP7.B/7.F"), which adds acp7x_load_firmware_carveout() using the upstream one-argument load_firmware op signature: int (*load_firmware)(struct snd_sof_dev *sof_dev); In sof-dev the op signature has been changed by commit 651b1dad6685 ("ASoC: SOF: Modify the signature of load_firmware op") to take the firmware filename as well. That change is not upstream, so the merge applied cleanly, but the result fails to build: sound/soc/sof/amd/acp7x.c: In function 'sof_acp7x_ops_init': sound/soc/sof/amd/acp7x.c:180:45: error: assignment to 'int (*)(struct snd_sof_dev *, const char *)' from incompatible pointer type 'int (*)(struct snd_sof_dev *)' [-Wincompatible-pointer-types] Add the fw_name parameter to acp7x_load_firmware_carveout() to match the sof-dev op signature. Like acp_sof_load_signed_firmware(), the parameter is unused, as the code and data binary names are taken from adata->fw_code_bin and adata->fw_data_bin. This patch is needed only in sof-dev for as long as the load_firmware op signature change is not upstream. Signed-off-by: Peter Ujfalusi --- sound/soc/sof/amd/acp.h | 2 +- sound/soc/sof/amd/acp_asp_mailbox.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h index 8c8a565f893efd..83cb8599cd4472 100644 --- a/sound/soc/sof/amd/acp.h +++ b/sound/soc/sof/amd/acp.h @@ -423,7 +423,7 @@ int acp_get_bar_index(struct snd_sof_dev *sdev, u32 type); /* ACP7.B/7.F ASP carveout firmware load helper functions */ int acp7x_query_asp_carveout(struct snd_sof_dev *sdev); -int acp7x_load_firmware_carveout(struct snd_sof_dev *sdev); +int acp7x_load_firmware_carveout(struct snd_sof_dev *sdev, const char *fw_name); int acp7x_configure_carveout_pte(struct snd_sof_dev *sdev); /* Block IO callbacks */ diff --git a/sound/soc/sof/amd/acp_asp_mailbox.c b/sound/soc/sof/amd/acp_asp_mailbox.c index a9c0edfe0c3fde..761e09ac58ff90 100644 --- a/sound/soc/sof/amd/acp_asp_mailbox.c +++ b/sound/soc/sof/amd/acp_asp_mailbox.c @@ -336,7 +336,7 @@ int acp7x_query_asp_carveout(struct snd_sof_dev *sdev) } EXPORT_SYMBOL_NS(acp7x_query_asp_carveout, "SND_SOC_SOF_AMD_COMMON"); -int acp7x_load_firmware_carveout(struct snd_sof_dev *sdev) +int acp7x_load_firmware_carveout(struct snd_sof_dev *sdev, const char *fw_name) { struct snd_sof_pdata *plat_data = sdev->pdata; struct acp_dev_data *adata = plat_data->hw_pdata;