Re: [PATCH v2 0/2] ALSA: sscape: add suspend/resume support

From: Takashi Iwai

Date: Sun Apr 12 2026 - 04:01:14 EST


On Sat, 11 Apr 2026 20:14:39 +0200,
Cássio Gabriel wrote:
>
> The SoundScape driver does more during probe than a plain WSS bring-up.
> It programs board-specific gate-array routing and, on non-VIVO boards,
> loads MIDI firmware and restores MIDI state before the MPU-401 side is
> usable. The driver still lacks suspend and resume callbacks, so that
> probe-time state is not restored after a system sleep cycle.
>
> Generic WSS power management is not sufficient here because it only
> restores codec state. SoundScape resume also needs to restore the board
> routing, and on non-VIVO boards it needs to reinitialize the MIDI side
> when it was successfully enabled at probe time.
>
> - Patch 1 stores the resolved per-card resources in struct soundscape,
> factors the board reinitialization path into a helper, and reuses the
> MIDI state programming sequence.
> - Patch 2 adds ISA and ISA-PnP PM callbacks, reapplies the board
> configuration on resume, restores the non-VIVO MIDI firmware and MIDI
> state when applicable, and keeps the WSS side available even if MIDI
> restoration fails.
>
> The board restore path also replays the OPUS AD1845 activation step used
> during detection so that resume matches the existing bring-up sequence
> more closely.
>
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@xxxxxxxxx>
> ---
> Changes in v2:
> - Change host_write_unsafe() and host_write_ctrl_unsafe() to return bool
> - Document the helper return semantics in the function comments
> - Rewrite sscape_restore_midi_state() to use the same chained-success
> style as sscape_midi_put()
> - Link to v1: https://patch.msgid.link/20260411-alsa-sscape-pm-v1-0-3058d988783a@xxxxxxxxx
>
> ---
> Cássio Gabriel (2):
> ALSA: sscape: Cache per-card resources for board reinitialization
> ALSA: sscape: Add suspend and resume support

Applied both patches now. Thanks.


Takashi