Skip to content

ASoC: SOF: amd: acp7x: fix S4 resume with ASP carveout firmware loading - #6051

Open
Sivasubramanian678 wants to merge 2 commits into
thesofproject:topic/sof-devfrom
Sivasubramanian678:topic/sof-dev
Open

Sivasubramanian678 wants to merge 2 commits into
thesofproject:topic/sof-devfrom
Sivasubramanian678:topic/sof-dev

Conversation

@Sivasubramanian678

Copy link
Copy Markdown

On ACP7.B/7.F with signed firmware, the ASP carveout loses its contents
across S4, but the loader still SHA-DMAs from it on resume, so the DSP
fails to boot.

Patch 1 enables ACPI target states so the driver can tell S4 from S3.
Patch 2 clears the cached carveout address on S4 resume, forcing a full
firmware reload. S3 is unchanged.

The ACP7.x suspend and resume handlers need to tell S4 (hibernate)
apart from S3, because the ASP firmware carveout in DDR loses its
contents across S4 but not across S3. They rely on
sdev->system_suspend_target for this, but snd_sof_prepare() only
derives it from acpi_target_system_state() when the device descriptor
sets use_acpi_target_states. Otherwise system_suspend_target stays at
its SOF_SUSPEND_S3 default and the S4 path is never taken.

Set use_acpi_target_states in the ACP7.B and ACP7.F descriptors so that
system_suspend_target reflects the actual target state (S0ix, S3, S4 or
S5).

Signed-off-by: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
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: cec3598 ("ASoC: SOF: amd: add ASP carveout firmware loading for ACP7.B/7.F")
Signed-off-by: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
@sofci

sofci commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

reply test this please to run this test once

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.

2 participants