Skip to content

ASoC: apple: mca: restore the clusters' registers after a sleep that cuts the power - #2224

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/mca-sleep-restore
Nov 19, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/mca-sleep-restore

Conversation

@m0d16l14n1

Copy link
Copy Markdown
Contributor

A sleep that cuts the MCA's power loses the clusters' registers. hw_params, startup and prepare are the only places a stream's setup is written: cluster, serdes, port and DMA adapter. An open stream keeps that setup across a sleep; speakersafetyd keeps the sense capture open all the time.

Change:

  • each cluster's registers are saved after ASoC has suspended the streams;
  • they are written back before anything resumes them: configuration first, then the port routing, the enables last;
  • a back end restores only its port words.

Overlaps #1314 (niteria, T8132 deep sleep). It adds a suspend_late to the same driver that refuses a firmware sleep while a cluster is in use. With speakersafetyd running, that refusal blocks every deep sleep on the M5 Airs; this change keeps the open streams working instead. Happy to rebase onto #1314 or to fold the two together, whichever the maintainers prefer.

Tested on J815 (MacBook Air 15" M5) in every deep-sleep build since 2026-11-16, with audio and speakersafetyd/speakerguardd running:

  • the deep sleeps are no longer refused;
  • after the wake there is no kernel error, the speaker protection reports ready again, and the PipeWire sinks are back.

Playback after a wake was not measured separately.

  • checkpatch --strict clean.
  • Builds with W=1 on integration/aurora 0abc2f3.

Part of the J815 bring-up; board results are summarised in discussion #135.

🤖 Generated with Claude Code

…cuts the power

hw_params, startup and prepare are the only places a stream's cluster,
serdes, port and DMA adapter setup is written, and an open stream
(speakersafetyd keeps the sense capture open) keeps it across a sleep. A
deep sleep takes those registers. Each cluster's are saved after ASoC
suspended the streams and written back before anything resumes them:
configuration first, then the port routing, the enables last. A back end
restores only its port words.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
@DjDeveloperr
DjDeveloperr merged commit 4aa412b into aurora-silicon:integration/aurora Nov 19, 2026
1 check 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.

2 participants