[PATCH] [UBUNTU:sound/pci/hda/] Fix suspend/resume for HDA when MSI is enabled

crimsun at fungus.sh.nu crimsun at fungus.sh.nu
Sun Oct 8 03:01:27 BST 2006


From c409e2fb13de04e059a29323d8ecfecb0e420d4d Mon Sep 17 00:00:00 2001
From: Daniel T. Chen <crimsun at garnish.localdomain>
Date: Sat, 7 Oct 2006 21:37:23 -0400
Subject: [PATCH] [UBUNTU:sound/pci/hda/] Fix suspend/resume for HDA when MSI is enabled

UpstreamStatus: Added in upstream alsa-kernel hg changeset:
		fac764f0371c [http://hg-mirror.alsa-project.org/alsa-kernel?cmd=changeset;node=fac764f0371c0525559b71b98e55838d3dd15570;style=raw]

This patch from Takashi Iwai fixes suspend and resume for HDA when
MSI is enabled.

This commit is applicable to both Dapper and Edgy linux-source.

Signed-off-by: Daniel T Chen <crimsun at ubuntu.com>
---
 sound/pci/hda/hda_intel.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index b855942..7897fd3 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1357,6 +1357,10 @@ static int azx_suspend(struct pci_dev *p
 		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;
@@ -1369,6 +1373,12 @@ static int azx_resume(struct pci_dev *pc
 
 	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);
-- 
1.4.1


-- 
Daniel T. Chen            crimsun at ubuntu.com
GPG key:  0xC88ABDA3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/kernel-team/attachments/20061007/a6da3e58/attachment.pgp 


More information about the kernel-team mailing list