summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-09-08 12:30:03 +0200
committerJaroslav Kysela <perex@suse.cz>2006-09-23 10:47:00 +0200
commit43001c9515cf87935c50e84b3e27b1f3b3776b5d (patch)
tree295e87add08bfec4a2a4fada76fd1cac7ac0123b
parent854b66e44260320c21ebe4b8a18e189f2e45b5be (diff)
[ALSA] hda-intel - Fix suspend/resume with MSI
Fixed suspend/resume with MSI enablement. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r--sound/pci/hda/hda_intel.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 6309e0c67e6a..4d2df771112e 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1381,6 +1381,10 @@ static int azx_suspend(struct pci_dev *pci, pm_message_t state)
snd_pcm_suspend_all(chip->pcm[i]);
snd_hda_suspend(chip->bus, state);
azx_free_cmd_io(chip);
+ if (chip->irq >= 0)
+ free_irq(chip->irq, chip);
+ if (!disable_msi)
+ pci_disable_msi(chip->pci);
pci_disable_device(pci);
pci_save_state(pci);
return 0;
@@ -1393,6 +1397,12 @@ static int azx_resume(struct pci_dev *pci)
pci_restore_state(pci);
pci_enable_device(pci);
+ if (!disable_msi)
+ pci_enable_msi(pci);
+ /* FIXME: need proper error handling */
+ request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
+ "HDA Intel", chip);
+ chip->irq = pci->irq;
pci_set_master(pci);
azx_init_chip(chip);
snd_hda_resume(chip->bus);