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

From: Takashi Iwai

Date: Thu Apr 09 2026 - 06:07:58 EST


On Thu, 09 Apr 2026 07:07:44 +0200,
Cássio Gabriel wrote:
>
> The msnd drivers still have no system-sleep callbacks, and the shared
> driver file still carries a FIXME for suspend/resume. Probe already
> depends on rebuilding volatile device state by resetting the DSP,
> uploading firmware, reinitializing shared memory, restoring mixer
> settings, and calibrating the ADC. Without matching PM callbacks, the
> driver has no defined way to recover that state after suspend.
>
> This small series adds the missing suspend/resume support with the
> minimum scope needed for the current driver.
>
> Patch 1 prepares the driver for PM by:
> - accepting SNDRV_PCM_TRIGGER_SUSPEND in the PCM trigger callbacks
> - factoring the IRQ enable/disable bodies and adding a helper that can
> quiesce or rearm the shared IRQ without disturbing irq_ref
> - restoring cached master-volume values when mixer state is rebuilt
> after DSP reinitialization
>
> Patch 2 adds the actual PM callbacks by:
> - saving the current capture-source selection and msnd-side MIDI input
> state
> - adding shared card suspend/resume helpers
> - wiring those helpers into the ISA driver and the Pinnacle PnP card
> driver with the current callback signatures
>
> The series intentionally does not add trigger-level PCM resume support.
> The driver can rebuild hardware state on system resume, but it does not
> preserve enough runtime queue state to justify advertising full
> SNDRV_PCM_INFO_RESUME semantics in this change.
>
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@xxxxxxxxx>
> ---
> Cássio Gabriel (2):
> ALSA: msnd: prepare system sleep support
> ALSA: msnd: add ISA and PnP system sleep callbacks

Applied both patches to for-next branch. Thanks.


Takashi