From 234d39ffdd0e306590bfcd8b32d525c3a2408581 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Aug 11 2009 12:39:50 +0000
Subject: - patches.drivers/alsa-hda-41-msi-white-list: ALSA: hda - Add

  a white-list for MSI option (bnc#529971).

---

diff --git a/kernel-source.changes b/kernel-source.changes
index 1faa6fd..4b803c1 100644
--- a/kernel-source.changes
+++ b/kernel-source.changes
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Tue Aug 11 14:39:42 CEST 2009 - tiwai@suse.de
+
+- patches.drivers/alsa-hda-41-msi-white-list: ALSA: hda - Add
+  a white-list for MSI option (bnc#529971).
+
+-------------------------------------------------------------------
 Tue Aug 11 13:05:37 CEST 2009 - tiwai@suse.de
 
 - patches.drivers/alsa-hda-39-dont-override-ADC-definitions:
diff --git a/patches.drivers/alsa-hda-41-msi-white-list b/patches.drivers/alsa-hda-41-msi-white-list
new file mode 100644
index 0000000..6c498d5
--- /dev/null
+++ b/patches.drivers/alsa-hda-41-msi-white-list
@@ -0,0 +1,67 @@
+From 4d8e22e0f6aacb365db2cb9bf69e38310b37f418 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 11 Aug 2009 14:21:26 +0200
+Subject: ALSA: hda - Add a white-list for MSI option
+Patch-mainline: 
+References: bnc#529971
+
+Created a white-list to enable MSI since some devices require MSI
+explicitly due to BIOS/ACPI problems.  Simply using a quirk list.
+As the first case, take HP Compaq CQ40.
+
+Reference: Novell bnc#529971
+	https://bugzilla.novell.com/show_bug.cgi?id=529971
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ sound/pci/hda/hda_intel.c |   26 +++++++++++++++++++++++++-
+ 1 files changed, 25 insertions(+), 1 deletions(-)
+
+diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
+index 754de4f..20a66f8 100644
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -2299,6 +2299,30 @@ static void __devinit check_probe_mask(struct azx *chip, int dev)
+ 	}
+ }
+ 
++/*
++ * white-list for enable_msi
++ */
++static struct snd_pci_quirk msi_white_list[] __devinitdata = {
++	SND_PCI_QUIRK(0x103c, 0x3607, "HP Compa CQ40", 1),
++	{}
++};
++
++static void __devinit check_msi(struct azx *chip)
++{
++	const struct snd_pci_quirk *q;
++
++	chip->msi = enable_msi;
++	if (chip->msi)
++		return;
++	q = snd_pci_quirk_lookup(chip->pci, msi_white_list);
++	if (q) {
++		printk(KERN_INFO
++		       "hda_intel: msi for device %04x:%04x set to %d\n",
++		       q->subvendor, q->subdevice, q->value);
++		chip->msi = q->value;
++	}
++}
++
+ 
+ /*
+  * constructor
+@@ -2333,7 +2357,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
+ 	chip->pci = pci;
+ 	chip->irq = -1;
+ 	chip->driver_type = driver_type;
+-	chip->msi = enable_msi;
++	check_msi(chip);
+ 	chip->dev_index = dev;
+ 	INIT_WORK(&chip->irq_pending_work, azx_irq_pending_work);
+ 
+-- 
+1.6.3.3
+
diff --git a/series.conf b/series.conf
index 5d1c1ad..660fecb 100644
--- a/series.conf
+++ b/series.conf
@@ -488,6 +488,7 @@
 	patches.drivers/alsa-hda-38-fix-ALC269-vmaster
 	patches.drivers/alsa-hda-39-dont-override-ADC-definitions
 	patches.drivers/alsa-hda-40-auto-mic-support-for-realtek
+	patches.drivers/alsa-hda-41-msi-white-list
 
 	patches.drivers/alsa-ctxfi-01-Native-timer-support-for-emu20k2
 	patches.drivers/alsa-ctxfi-03-Simple-code-clean-up