From: "Mukunda,Vijendar" <vijendar.mukunda@amd.com>
To: Mark Brown <broonie@kernel.org>, sravisar@amd.com
Cc: alsa-devel@alsa-project.org, lgirdwood@gmail.com, perex@perex.cz,
tiwai@suse.com, yung-chuan.liao@linux.intel.com,
Basavaraj.Hiregoudar@amd.com, Sunil-kumar.Dommati@amd.com,
venkataprasad.potturu@amd.com, Syed.SabaKareem@amd.com,
Mario.Limonciello@amd.com, Richard.Gong@amd.com,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
sound-open-firmware@alsa-project.org
Subject: Re: [PATCH v2 0/2] ASoC: SOF: amd: acp7x: fix S4 resume with ASP carveout firmware loading
Date: Tue, 1 Dec 2026 11:09:05 +0530 [thread overview]
Message-ID: <0d3b3974-e0ef-4b39-8f06-730f31a4b86a@amd.com> (raw)
In-Reply-To: <179605566796.253439.12897690593012106755.b4-review@b4>
On 11/30/26 21:51, Mark Brown wrote:
>> From: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
>>
>> 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.
> I'll apply this but I'm not convinced it does the right thing on
> hibernate, we don't notice that the DSP was powered down since the
> snapshot is taken before that.
The DSP is stopped before the snapshot. amd_sof_acp7x_suspend()
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.
next prev parent reply other threads:[~2026-12-01 5:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 9:02 [PATCH v2 0/2] ASoC: SOF: amd: acp7x: fix S4 resume with ASP carveout firmware loading sravisar
2026-11-30 9:02 ` [PATCH v2 1/2] ASoC: SOF: amd: acp7x: enable ACPI target power states sravisar
2026-11-30 9:02 ` [PATCH v2 2/2] ASoC: SOF: amd: acp7x: reload firmware from disk on S4 resume sravisar
2026-11-30 9:14 ` [PATCH v2 0/2] ASoC: SOF: amd: acp7x: fix S4 resume with ASP carveout firmware loading Mukunda,Vijendar
2026-11-30 16:21 ` Mark Brown
2026-12-01 5:39 ` Mukunda,Vijendar [this message]
2026-11-30 16:24 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0d3b3974-e0ef-4b39-8f06-730f31a4b86a@amd.com \
--to=vijendar.mukunda@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Richard.Gong@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=Syed.SabaKareem@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sound-open-firmware@alsa-project.org \
--cc=sravisar@amd.com \
--cc=tiwai@suse.com \
--cc=venkataprasad.potturu@amd.com \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.