Commit b787ea36 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

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.
parent c45b306f
...@@ -1959,13 +1959,14 @@ static struct via823x_info via823x_cards[] __devinitdata = { ...@@ -1959,13 +1959,14 @@ static struct via823x_info via823x_cards[] __devinitdata = {
struct dxs_whitelist { struct dxs_whitelist {
unsigned short vendor; unsigned short vendor;
unsigned short device; 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 int __devinit check_dxs_list(struct pci_dev *pci)
{ {
static struct dxs_whitelist whitelist[] = { static struct dxs_whitelist whitelist[] = {
// { .vendor = xxxx, .device = yyyy, .action = x }, { .vendor = 0x1019, .device = 0x0996, .action = VIA_DXS_48K },
{ } /* terminator */ { } /* terminator */
}; };
struct dxs_whitelist *w; struct dxs_whitelist *w;
...@@ -1975,10 +1976,17 @@ static int __devinit check_dxs_list(struct pci_dev *pci) ...@@ -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_VENDOR_ID, &subsystem_vendor);
pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &subsystem_device); pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &subsystem_device);
for (w = whitelist; w->vendor; w++) for (w = whitelist; w->vendor; w++) {
if (w->vendor == subsystem_vendor && if (w->vendor != subsystem_vendor)
w->device == subsystem_device) continue;
if (w->mask) {
if ((w->mask & subsystem_device) == w->device)
return w->action;
} else {
if (subsystem_device == w->device)
return w->action; return w->action;
}
}
/* /*
* not detected, try 48k rate only to be sure. * not detected, try 48k rate only to be sure.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment