aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@suse.cz>2004-04-24 20:31:02 +0200
committerJaroslav Kysela <perex@suse.cz>2004-04-24 20:31:02 +0200
commit17e0e8c035594de49caa08593b2b1ba88648c28d (patch)
tree2e220d6199f9410e9dceb9ef8267df9760f40412 /sound
parenta89b4af087a4af5eee428aed1993e48ee04bd063 (diff)
downloadhistory-17e0e8c035594de49caa08593b2b1ba88648c28d.tar.gz
ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
Intel8x0 driver From: Giridhar Pemmasani <giri@lmc.cs.sunysb.edu> It seems that pci config space is messed up after resume for Intel ICH4 audio controller (on Dell Latitude D600, but I notice that others also complain about this problem). Consequently resume from S3 causes oops with snd_intel8x0 module. If the module is removed before suspend and loaded afterwards, I still get oops. The following simple patch fixes the problem. With this, I can leave alsa untouched during suspend/resume.
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/intel8x0.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 060d7c61c2f678..c2db99ef0c63fc 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -444,6 +444,10 @@ struct _snd_intel8x0 {
struct snd_dma_buffer bdbars;
u32 int_sta_reg; /* interrupt status register */
u32 int_sta_mask; /* interrupt status mask */
+
+#ifdef CONFIG_PM
+ u32 pci_state[64 / sizeof(u32)];
+#endif
};
static struct pci_device_id snd_intel8x0_ids[] = {
@@ -2208,6 +2212,7 @@ static int intel8x0_suspend(snd_card_t *card, unsigned int state)
for (i = 0; i < 3; i++)
if (chip->ac97[i])
snd_ac97_suspend(chip->ac97[i]);
+ pci_save_state(chip->pci, chip->pci_state);
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
return 0;
}
@@ -2217,6 +2222,7 @@ static int intel8x0_resume(snd_card_t *card, unsigned int state)
intel8x0_t *chip = snd_magic_cast(intel8x0_t, card->pm_private_data, return -EINVAL);
int i;
+ pci_restore_state(chip->pci, chip->pci_state);
pci_enable_device(chip->pci);
pci_set_master(chip->pci);
snd_intel8x0_chip_init(chip, 0);