ALSA: hda - Add MSI quirk list

It is reported that models of HP dv7 laptops needs MSI to function
properly. This adds a MSI quirk list support to snd-hda-intel to
preset enable_msi option for machines that needs MSI disabled/enabled
and set required setting for HP dv7 laptops.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>

---
 sound/pci/hda/hda_intel.c |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff -p -up linux-2.6.27/sound/pci/hda/hda_intel.c.orig linux-2.6.27/sound/pci/hda/hda_intel.c
--- linux-2.6.27/sound/pci/hda/hda_intel.c.orig	2009-01-22 06:52:07.000000000 -0500
+++ linux-2.6.27/sound/pci/hda/hda_intel.c	2009-01-22 06:55:20.000000000 -0500
@@ -2050,6 +2050,30 @@ static int azx_dev_free(struct snd_devic
 }
 
 /*
+ * white/black-listing for enable_msi
+ */
+static struct snd_pci_quirk msi_list[] __devinitdata = {
+	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4, "HP dv7", 0x01),
+	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, "HP dv7", 0x01),
+	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fd, "HP dv7", 0x01),
+	{}
+};
+
+static void __devinit check_msi(struct azx *chip)
+{
+	const struct snd_pci_quirk *q;
+
+	q = snd_pci_quirk_lookup(chip->pci, msi_list);
+	if (q) {
+		printk(KERN_INFO
+		       "hda_intel: enable_msi set to 0x%x "
+		       "for device %04x:%04x\n",
+		       q->value, q->subvendor, q->subdevice);
+		enable_msi = q->value;
+	}
+}
+
+/*
  * white/black-listing for position_fix
  */
 static struct snd_pci_quirk position_fix_list[] __devinitdata = {
@@ -2148,6 +2172,7 @@ static int __devinit azx_create(struct s
 	chip->pci = pci;
 	chip->irq = -1;
 	chip->driver_type = driver_type;
+	check_msi(chip);
 	chip->msi = enable_msi;
 	chip->dev_index = dev;
 	INIT_WORK(&chip->irq_pending_work, azx_irq_pending_work);
