public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ALSA: msnd: add suspend/resume support
@ 2026-04-09  5:07 Cássio Gabriel
  2026-04-09  5:07 ` [PATCH 1/2] ALSA: msnd: prepare system sleep support Cássio Gabriel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Cássio Gabriel @ 2026-04-09  5:07 UTC (permalink / raw)
  To: Takashi Iwai, Jaroslav Kysela
  Cc: linux-sound, linux-kernel, Cássio Gabriel

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@gmail.com>
---
Cássio Gabriel (2):
      ALSA: msnd: prepare system sleep support
      ALSA: msnd: add ISA and PnP system sleep callbacks

 sound/isa/msnd/msnd.c                | 72 ++++++++++++++++++---------
 sound/isa/msnd/msnd.h                |  3 ++
 sound/isa/msnd/msnd_pinnacle.c       | 95 +++++++++++++++++++++++++++++++++++-
 sound/isa/msnd/msnd_pinnacle_mixer.c |  4 ++
 4 files changed, 149 insertions(+), 25 deletions(-)
---
base-commit: 9f2a23bd5d30dc0968e56a2b6e5edb58aff1bc6d
change-id: 20260403-msnd-pm-support-e14d428ca426

Best regards,
--  
Cássio Gabriel <cassiogabrielcontato@gmail.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-09 10:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-09  5:07 [PATCH 0/2] ALSA: msnd: add suspend/resume support Cássio Gabriel
2026-04-09  5:07 ` [PATCH 1/2] ALSA: msnd: prepare system sleep support Cássio Gabriel
2026-04-09  5:07 ` [PATCH 2/2] ALSA: msnd: add ISA and PnP system sleep callbacks Cássio Gabriel
2026-04-09 10:02 ` [PATCH 0/2] ALSA: msnd: add suspend/resume support Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox