aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-08-17 03:17:36 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:59:15 -0400
commit669ba27a6e25251427bde8f4980f62733a8f0c7e (patch)
tree78416c06ceb3d2b6c0f2dc54266b1acc9a0a7bd1 /sound/pci
parent6bc9685796529754acd819d9c979227d823c408d (diff)
[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 <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_intel.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 14bcc108e778..3d06eccc9b9c 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)
1653 if (fix == POS_FIX_AUTO) { 1653 if (fix == POS_FIX_AUTO) {
1654 q = snd_pci_quirk_lookup(chip->pci, position_fix_list); 1654 q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
1655 if (q) { 1655 if (q) {
1656 snd_printdd(KERN_INFO 1656 printk(KERN_INFO
1657 "hda_intel: position_fix set to %d " 1657 "hda_intel: position_fix set to %d "
1658 "for device %04x:%04x\n", 1658 "for device %04x:%04x\n",
1659 q->value, q->subvendor, q->subdevice); 1659 q->value, q->subvendor, q->subdevice);
@@ -1664,6 +1664,36 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
1664} 1664}
1665 1665
1666/* 1666/*
1667 * black-lists for probe_mask
1668 */
1669static struct snd_pci_quirk probe_mask_list[] __devinitdata = {
1670 /* Thinkpad often breaks the controller communication when accessing
1671 * to the non-working (or non-existing) modem codec slot.
1672 */
1673 SND_PCI_QUIRK(0x1014, 0x05b7, "Thinkpad Z60", 0x01),
1674 SND_PCI_QUIRK(0x17aa, 0x2010, "Thinkpad X/T/R60", 0x01),
1675 SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X/T/R61", 0x01),
1676 {}
1677};
1678
1679static void __devinit check_probe_mask(struct azx *chip)
1680{
1681 const struct snd_pci_quirk *q;
1682
1683 if (probe_mask == -1) {
1684 q = snd_pci_quirk_lookup(chip->pci, probe_mask_list);
1685 if (q) {
1686 printk(KERN_INFO
1687 "hda_intel: probe_mask set to 0x%x "
1688 "for device %04x:%04x\n",
1689 q->value, q->subvendor, q->subdevice);
1690 probe_mask = q->value;
1691 }
1692 }
1693}
1694
1695
1696/*
1667 * constructor 1697 * constructor
1668 */ 1698 */
1669static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, 1699static 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,
1698 chip->msi = enable_msi; 1728 chip->msi = enable_msi;
1699 1729
1700 chip->position_fix = check_position_fix(chip, position_fix); 1730 chip->position_fix = check_position_fix(chip, position_fix);
1731 check_probe_mask(chip);
1701 1732
1702 chip->single_cmd = single_cmd; 1733 chip->single_cmd = single_cmd;
1703 1734