[PATCH 2/2] ASoC: SOF: amd: acp7x: reload firmware from disk on S4 resume
From: sravisar
Date: Wed Nov 25 2026 - 00:39:09 EST
From: Siva Subramanian Ravi Saravanan <sravisar@xxxxxxx>
On S4 (hibernate) the ASP carveout in DDR loses power, so the raw
firmware image previously deposited there by VALIDATE_IMAGE is gone.
acp7x_load_firmware_carveout() skips VALIDATE_IMAGE whenever
fw_code_carveout_addr is already set and SHA-DMAs directly from the
carveout, which on S4 resume would read an empty carveout and fail to
boot the DSP.
Clear fw_code_carveout_addr on S4 resume so the loader takes the full
request_firmware() + VALIDATE_IMAGE path and re-deposits the image into
the carveout. S3 resume is unaffected, as the carveout contents are
preserved across S3.
Fixes: cec3598305a6 ("ASoC: SOF: amd: add ASP carveout firmware loading for ACP7.B/7.F")
Signed-off-by: Siva Subramanian Ravi Saravanan <sravisar@xxxxxxx>
---
sound/soc/sof/amd/acp.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c
index 8039b2450cf3e..b6befa9712567 100644
--- a/sound/soc/sof/amd/acp.c
+++ b/sound/soc/sof/amd/acp.c
@@ -1673,6 +1673,15 @@ int amd_sof_acp7x_resume(struct snd_sof_dev *sdev)
return ret;
}
+ /*
+ * S4 powers down the carveout, invalidating its cached firmware. Clear
+ * fw_code_carveout_addr to force a full reload via VALIDATE_IMAGE on
+ * resume instead of a SHA-DMA from the stale carveout.
+ */
+ if (acp_data->asp_carveout_base &&
+ sdev->system_suspend_target == SOF_SUSPEND_S4)
+ acp_data->fw_code_carveout_addr = 0;
+
return 0;
}
EXPORT_SYMBOL_NS(amd_sof_acp7x_resume, "SND_SOC_SOF_AMD_COMMON");
--
2.43.0