]> git.hungrycats.org Git - linux/commitdiff
ALSA CVS update
authorJaroslav Kysela <perex@suse.cz>
Thu, 25 Sep 2003 17:17:56 +0000 (19:17 +0200)
committerJaroslav Kysela <perex@suse.cz>
Thu, 25 Sep 2003 17:17:56 +0000 (19:17 +0200)
D:2003/09/08 10:32:23
C:VIA82xx driver
A:Takashi Iwai <tiwai@suse.de>
F:pci/via82xx.c:1.48->1.49
L:- added device mask bits to DXS channel check.
L:- added an entry for DXS channel check.

sound/pci/via82xx.c

index c33ff6b57e5df71e3006d86c174c5fe29592c7fd..405c03d28dc0007e7eb938b449e5f79e5ea73af3 100644 (file)
@@ -1959,13 +1959,14 @@ static struct via823x_info via823x_cards[] __devinitdata = {
 struct dxs_whitelist {
        unsigned short vendor;
        unsigned short device; 
-       int action;     /* new dxs_support value */
+       unsigned short mask; 
+       short action;   /* new dxs_support value */
 };
 
 static int __devinit check_dxs_list(struct pci_dev *pci)
 {
        static struct dxs_whitelist whitelist[] = {
-               // { .vendor = xxxx, .device = yyyy, .action = x },
+               { .vendor = 0x1019, .device = 0x0996, .action = VIA_DXS_48K },
                { } /* terminator */
        };
        struct dxs_whitelist *w;
@@ -1975,10 +1976,17 @@ static int __devinit check_dxs_list(struct pci_dev *pci)
        pci_read_config_word(pci, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vendor);
        pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &subsystem_device);
 
-       for (w = whitelist; w->vendor; w++)
-               if (w->vendor == subsystem_vendor &&
-                   w->device == subsystem_device)
-                       return w->action;
+       for (w = whitelist; w->vendor; w++) {
+               if (w->vendor != subsystem_vendor)
+                       continue;
+               if (w->mask) {
+                       if ((w->mask & subsystem_device) == w->device)
+                               return w->action;
+               } else {
+                       if (subsystem_device == w->device)
+                               return w->action;
+               }
+       }
 
        /*
         * not detected, try 48k rate only to be sure.