summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCássio Gabriel <cassiogabrielcontato@gmail.com>2026-04-06 06:20:04 +0300
committerTakashi Iwai <tiwai@suse.de>2026-04-06 12:08:35 +0300
commitd9bfa935a9855664f5cea12131fa809fd56ff82c (patch)
treef9a00186b97799945a575122cca37d3d38fbfdcd
parentd38e9457ddf0780dd55c953886ae48abbe4d33b8 (diff)
downloadlinux-d9bfa935a9855664f5cea12131fa809fd56ff82c.tar.xz
ALSA: gusclassic: add ISA suspend and resume callbacks
gusclassic still leaves its ISA PM callbacks disabled because the shared GF1 core had no suspend and resume path suitable for PM recovery. Wire the driver up to the new shared GUS suspend and resume helpers so a suspend/resume cycle restores usable GF1 operation without rerunning probe-only detection or tearing down the runtime bookkeeping kept by the card instance. 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-2-b6829a7457cd@gmail.com
-rw-r--r--sound/isa/gus/gusclassic.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c
index 101202acefb3..363c819ced89 100644
--- a/sound/isa/gus/gusclassic.c
+++ b/sound/isa/gus/gusclassic.c
@@ -145,6 +145,7 @@ static int snd_gusclassic_probe(struct device *dev, unsigned int n)
error = snd_gusclassic_create(card, dev, n, &gus);
if (error < 0)
return error;
+ card->private_data = gus;
error = snd_gusclassic_detect(gus);
if (error < 0)
@@ -193,11 +194,29 @@ static int snd_gusclassic_probe(struct device *dev, unsigned int n)
return 0;
}
+#ifdef CONFIG_PM
+static int snd_gusclassic_suspend(struct device *dev, unsigned int n,
+ pm_message_t state)
+{
+ struct snd_card *card = dev_get_drvdata(dev);
+
+ return snd_gus_suspend(card->private_data);
+}
+
+static int snd_gusclassic_resume(struct device *dev, unsigned int n)
+{
+ struct snd_card *card = dev_get_drvdata(dev);
+
+ return snd_gus_resume(card->private_data);
+}
+#endif
+
static struct isa_driver snd_gusclassic_driver = {
.match = snd_gusclassic_match,
.probe = snd_gusclassic_probe,
-#if 0 /* FIXME */
+#ifdef CONFIG_PM
.suspend = snd_gusclassic_suspend,
+ .resume = snd_gusclassic_resume,
#endif
.driver = {
.name = DEV_NAME