]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: gus: add shared GF1 suspend and resume helpers
authorCássio Gabriel <cassiogabrielcontato@gmail.com>
Mon, 6 Apr 2026 03:20:03 +0000 (00:20 -0300)
committerTakashi Iwai <tiwai@suse.de>
Mon, 6 Apr 2026 09:08:35 +0000 (11:08 +0200)
commitd38e9457ddf0780dd55c953886ae48abbe4d33b8
treee818466b6a785992053f87e9c6a8a6f822a07f88
parent7d61662197ecdc458e33e475b6ada7f6da61d364
ALSA: gus: add shared GF1 suspend and resume helpers

gusclassic and gusextreme still leave their ISA PM callbacks disabled
because the shared GF1 core only provides probe-time startup and full
shutdown paths.

Those helpers are not suitable for suspend and resume. They reset software
handlers and tear down runtime state such as the DRAM allocator, timer
state, DMA queues, PCM state and UART setup. Resume instead needs a
narrower recovery path that rebuilds the GF1 hardware state without
rerunning probe-only detection or discarding the bookkeeping kept by the
card instance.

Add shared GF1 suspend and resume helpers for that recovery path. Suspend
now quiesces GF1 PCM, aborts queued GF1 DMA work, resets the UART and
powers the chip down without tearing down allocator, timer or rawmidi
bookkeeping. Resume rebuilds the GF1 hardware state, restores timer and
UART handlers, and brings the chip back to a usable post-resume state for
the ISA front-ends.

The scope is limited to restoring post-resume usability. It does not
attempt transparent continuation of active GF1 PCM or synth state across
suspend, and userspace may still need to reprepare streams or reload
onboard sample data after resume. Open rawmidi substreams are restored
only to a usable post-resume state.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260406-b4-alsa-gus-isa-pm-v1-1-b6829a7457cd@gmail.com
include/sound/gus.h
sound/isa/gus/gus_dma.c
sound/isa/gus/gus_main.c
sound/isa/gus/gus_pcm.c
sound/isa/gus/gus_reset.c
sound/isa/gus/gus_timer.c
sound/isa/gus/gus_uart.c