Update of /cvsroot/alsa/alsa-kernel/pci/nm256 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13394/pci/nm256
Modified Files: nm256.c Log Message: - added a blacklist to avoid the possible hang-up at module loading. - added notes about the hang-up problem to ALSA-Configuration.txt. Index: nm256.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/nm256/nm256.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- nm256.c 14 Apr 2004 17:27:05 -0000 1.37 +++ nm256.c 4 May 2004 15:19:25 -0000 1.38 @@ -1532,6 +1532,21 @@ } +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 @@ 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 @@ 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; ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog