Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=669ba27a6e25251427bde8f4980f62733a8f0c7e
Commit:     669ba27a6e25251427bde8f4980f62733a8f0c7e
Parent:     6bc9685796529754acd819d9c979227d823c408d
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 17 09:17:36 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 15:59:15 2007 +0200

    [ALSA] hda-intel - Add probe_mask blacklist
    
    Added the black-list of probe_mask option to set the default value for
    known non-working devices.  Currently, Thinkpad *60 and *61 series are set.
    I'm afraid more will be added to the list in near future...
    
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/hda/hda_intel.c |   33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 14bcc10..3d06ecc 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1653,7 +1653,7 @@ static int __devinit check_position_fix(struct azx *chip, 
int fix)
        if (fix == POS_FIX_AUTO) {
                q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
                if (q) {
-                       snd_printdd(KERN_INFO
+                       printk(KERN_INFO
                                    "hda_intel: position_fix set to %d "
                                    "for device %04x:%04x\n",
                                    q->value, q->subvendor, q->subdevice);
@@ -1664,6 +1664,36 @@ static int __devinit check_position_fix(struct azx 
*chip, int fix)
 }
 
 /*
+ * black-lists for probe_mask
+ */
+static struct snd_pci_quirk probe_mask_list[] __devinitdata = {
+       /* Thinkpad often breaks the controller communication when accessing
+        * to the non-working (or non-existing) modem codec slot.
+        */
+       SND_PCI_QUIRK(0x1014, 0x05b7, "Thinkpad Z60", 0x01),
+       SND_PCI_QUIRK(0x17aa, 0x2010, "Thinkpad X/T/R60", 0x01),
+       SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X/T/R61", 0x01),
+       {}
+};
+
+static void __devinit check_probe_mask(struct azx *chip)
+{
+       const struct snd_pci_quirk *q;
+
+       if (probe_mask == -1) {
+               q = snd_pci_quirk_lookup(chip->pci, probe_mask_list);
+               if (q) {
+                       printk(KERN_INFO
+                              "hda_intel: probe_mask set to 0x%x "
+                              "for device %04x:%04x\n",
+                              q->value, q->subvendor, q->subdevice);
+                       probe_mask = q->value;
+               }
+       }
+}
+
+
+/*
  * constructor
  */
 static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
@@ -1698,6 +1728,7 @@ static int __devinit azx_create(struct snd_card *card, 
struct pci_dev *pci,
        chip->msi = enable_msi;
 
        chip->position_fix = check_position_fix(chip, position_fix);
+       check_probe_mask(chip);
 
        chip->single_cmd = single_cmd;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to