Skip to content

[not upstream] ASoC: SOF: amd: fix upstream-20261015 merge for load_f… - #5995

Merged
bardliao merged 1 commit into
thesofproject:topic/sof-devfrom
ujfalusi:peter/sof/pr/upstream-merge-amd-fix
Oct 22, 2026
Merged

bardliao merged 1 commit into
thesofproject:topic/sof-devfrom
ujfalusi:peter/sof/pr/upstream-merge-amd-fix

Conversation

@ujfalusi

Copy link
Copy Markdown
Collaborator

…irmware op

The upstream-20261015 merge (ec69dd1) brought in commit cec3598 ("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 651b1da ("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.

…irmware op

The upstream-20261015 merge (ec69dd1) brought in
commit cec3598 ("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 651b1da ("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 <peter.ujfalusi@linux.intel.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The matching signature updates resolve the callback type mismatch without changing runtime behavior.

No open issues 🎉

What changed in this PR

Fixes the sof-dev merge build failure by aligning the AMD carveout firmware loader with the two-argument load_firmware callback.

Changes:

  • Adds const char *fw_name to the loader declaration and definition.
  • Preserves firmware-loading behavior; the new parameter is intentionally unused.
File Description
sound/​soc/​sof/​amd/​acp.h Updates the loader declaration.
sound/​soc/​sof/​amd/​acp_asp_mailbox.c Updates the loader definition to match.

Review effort: Balanced

@bardliao
bardliao merged commit fc5eeea into thesofproject:topic/sof-dev Oct 22, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants