Re: [PATCH v2 0/2] ASoC: SOF: amd: acp7x: fix S4 resume with ASP carveout firmware loading
From: Mukunda,Vijendar
Date: Tue Dec 01 2026 - 00:40:31 EST
On 11/30/26 21:51, Mark Brown wrote:
The DSP is stopped before the snapshot. amd_sof_acp7x_suspend()From: Siva Subramanian Ravi Saravanan <sravisar@xxxxxxx>I'll apply this but I'm not convinced it does the right thing on
On ACP7.B/7.F with signed firmware, the DSP firmware is loaded through
the ASP carveout in DDR. The carveout loses its contents across S4
(hibernate), but on resume the loader still SHA-DMAs the image from it,
so the DSP fails to boot.
Patch 1 enables ACPI target power states for ACP7.B/7.F so the driver
can tell S4 apart from S3. It does not change behaviour on its own.
Patch 2 clears the cached carveout firmware address on S4/S5 resume,
forcing a full request_firmware() + VALIDATE_IMAGE reload. S0ix/s2idle
resume keeps the fast path.
hibernate, we don't notice that the DSP was powered down since the
snapshot is taken before that.
applies ACP soft reset (ACP_ASSERT_RESET / ACP_RELEASE_RESET) which
resets all ACP registers to their default values including
ACP_DSP0_RUNSTALL which defaults to 0x01 (stalled). DSP firmware
execution stops before create_image() is called.
What the snapshot does not capture is the subsequent loss of DDR
carveout content, which only happens after the image is written to
disk and the platform enters S4/S5. Patch 2 handles this by clearing
fw_code_carveout_addr at the start of amd_sof_acp7x_resume() when
system_suspend_target > SOF_SUSPEND_S3, before the firmware loader
runs. The loader's fast-path gate:
if (adata->fw_code_carveout_addr)
goto load_data_binary;
always sees zero on S4/S5 restore, forcing a full
request_firmware() + VALIDATE_IMAGE before the DSP is started.
However, while reviewing this further we identified a gap in the
SoundWire clock-stop path. For S3, amd_sof_acp7x_resume() takes
an early return when sdw_en_stat is true (SoundWire was clock-stopped)
since the ACP power tiles and SoundWire link state are preserved.
For S4/S5 this early return is incorrect -- the ACP power tiles
lose power, the SoundWire link is completely reset and the codec
must re-enumerate. The current code takes the same clock-stop fast
path based on the stale snapshot value of sdw_en_stat, skipping
the acp_init() and acp_memory_init() needed for full re-enumeration.
We will send a follow-up patch to gate the sdw_en_stat early return
on system_suspend_target <= SOF_SUSPEND_S3, so S4/S5 always falls
through to the full ACP re-initialization path.