aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMartin Josefsson <gandalf@wlug.westbo.se>2004-12-04 16:32:07 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-12-04 16:32:07 -0800
commit5a530b5a070ae4f682f51b54848276b6ba715bee (patch)
tree2c8de954b20a4152c0b96d983986086dbbb5d554 /sound
parent58561763197b0656a8fffbcd464c99f0bccfa10a (diff)
downloadhistory-5a530b5a070ae4f682f51b54848276b6ba715bee.tar.gz
[PATCH] Fix ALSA resume
Some time ago, a patch was merged that removed pci_save_state() and pci_restore_state() from various ALSA drivers. That patch also added pci_restore_state() to sound/core/init.c but didn't add pci_save_state() anywhere. This is needed since the core pci handling doesn't do this for us anymore. My laptop doesn't resume (gets what I assume is an ACPI timeout and hangs solid) without this small obvious patch. Signed-off-by: Martin Josefsson <gandalf@wlug.westbo.se> Fixed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/init.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/core/init.c b/sound/core/init.c
index 2873a17bd34b82..efa128c275e8ec 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -785,12 +785,15 @@ int snd_card_set_dev_pm_callback(snd_card_t *card, int type,
int snd_card_pci_suspend(struct pci_dev *dev, u32 state)
{
snd_card_t *card = pci_get_drvdata(dev);
+ int err;
if (! card || ! card->pm_suspend)
return 0;
if (card->power_state == SNDRV_CTL_POWER_D3hot)
return 0;
/* FIXME: correct state value? */
- return card->pm_suspend(card, 0);
+ err = card->pm_suspend(card, 0);
+ pci_save_state(dev);
+ return err;
}
int snd_card_pci_resume(struct pci_dev *dev)