Update of /cvsroot/alsa/alsa-kernel/pci
In directory sc8-pr-cvs1:/tmp/cvs-serv7996
Modified Files:
via82xx.c
Log Message:
- added device mask bits to DXS channel check.
- added an entry for DXS channel check.
Index: via82xx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/via82xx.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- via82xx.c 28 Aug 2003 15:07:25 -0000 1.48
+++ via82xx.c 8 Sep 2003 09:32:23 -0000 1.49
@@ -1959,13 +1959,14 @@
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 @@
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.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog