diff options
author | Jaroslav Kysela <perex@suse.cz> | 2004-05-17 19:25:22 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2004-05-17 19:25:22 +0200 |
commit | 646134728d204d55a225b08b348f3d8f46b24379 (patch) | |
tree | a17173c82e2deae33c924d386d06f855154a83fb /sound | |
parent | 9c9b6622d65a988aebb93f7cbcecb269a6a2c0ae (diff) | |
download | history-646134728d204d55a225b08b348f3d8f46b24379.tar.gz |
ALSA CVS update - Takashi Iwai <tiwai@suse.de>
Documentation,NM256 driver
- added a blacklist to avoid the possible hang-up at module loading.
- added notes about the hang-up problem to ALSA-Configuration.txt.
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/nm256/nm256.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index cd4c94cbc818c0..6947d84ca52d18 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c @@ -1532,6 +1532,21 @@ __error: } +struct nm256_quirk { + unsigned short vendor; + unsigned short device; + int type; +}; + +#define NM_BLACKLISTED 1 + +static struct nm256_quirk nm256_quirks[] __devinitdata = { + /* HP omnibook 4150 has cs4232 codec internally */ + { .vendor = 0x103c, .device = 0x0007, .type = NM_BLACKLISTED }, + { } /* terminator */ +}; + + static int __devinit snd_nm256_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { @@ -1540,6 +1555,8 @@ static int __devinit snd_nm256_probe(struct pci_dev *pci, nm256_t *chip; int err; unsigned int xbuffer_top; + struct nm256_quirk *q; + u16 subsystem_vendor, subsystem_device; if ((err = pci_enable_device(pci)) < 0) return err; @@ -1551,6 +1568,18 @@ static int __devinit snd_nm256_probe(struct pci_dev *pci, return -ENOENT; } + pci_read_config_word(pci, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vendor); + pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &subsystem_device); + + for (q = nm256_quirks; q->vendor; q++) { + if (q->vendor == subsystem_vendor && q->device == subsystem_device) { + if (q->type == NM_BLACKLISTED) { + printk(KERN_INFO "nm256: The device is blacklisted. Loading stopped\n"); + return -ENODEV; + } + } + } + card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); if (card == NULL) return -ENOMEM; |