ALSA: ctxfi - Allow unknown PCI SSIDs

Allow unknown PCI SSIDs for emu20k1 and emu20k2 as "unknown" model.
Also, add a black-list check in case any device has to be listed
as "unsupported".  It has a negative value in the pci quirk entry.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2009-06-22 07:36:52 +02:00
parent 8dca419721
commit a8f4310be5
2 changed files with 22 additions and 6 deletions

View file

@ -46,8 +46,6 @@ static struct snd_pci_quirk __devinitdata subsys_20k1_list[] = {
SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0031, "SB073x", CTSB073X), SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0031, "SB073x", CTSB073X),
SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_CREATIVE, 0xf000, 0x6000, SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_CREATIVE, 0xf000, 0x6000,
"UAA", CTUAA), "UAA", CTUAA),
SND_PCI_QUIRK_VENDOR(PCI_VENDOR_ID_CREATIVE,
"Unknown", CT20K1_UNKNOWN),
{ } /* terminator */ { } /* terminator */
}; };
@ -67,13 +65,16 @@ static struct snd_pci_quirk __devinitdata subsys_20k2_list[] = {
}; };
static const char *ct_subsys_name[NUM_CTCARDS] = { static const char *ct_subsys_name[NUM_CTCARDS] = {
/* 20k1 models */
[CTSB055X] = "SB055x", [CTSB055X] = "SB055x",
[CTSB073X] = "SB073x", [CTSB073X] = "SB073x",
[CTSB0760] = "SB076x",
[CTUAA] = "UAA", [CTUAA] = "UAA",
[CT20K1_UNKNOWN] = "Unknown", [CT20K1_UNKNOWN] = "Unknown",
/* 20k2 models */
[CTSB0760] = "SB076x",
[CTHENDRIX] = "Hendrix", [CTHENDRIX] = "Hendrix",
[CTSB0880] = "SB0880", [CTSB0880] = "SB0880",
[CT20K2_UNKNOWN] = "Unknown",
}; };
static struct { static struct {
@ -1240,9 +1241,21 @@ static int __devinit atc_identify_card(struct ct_atc *atc)
return -ENOENT; return -ENOENT;
} }
p = snd_pci_quirk_lookup(atc->pci, list); p = snd_pci_quirk_lookup(atc->pci, list);
if (!p) if (p) {
return -ENOENT; if (p->value < 0) {
atc->model = p->value; printk(KERN_ERR "ctxfi: "
"Device %04x:%04x is black-listed\n",
atc->pci->subsystem_vendor,
atc->pci->subsystem_device);
return -ENOENT;
}
atc->model = p->value;
} else {
if (atc->chip_type == ATC20K1)
atc->model = CT20K1_UNKNOWN;
else
atc->model = CT20K2_UNKNOWN;
}
atc->model_name = ct_subsys_name[atc->model]; atc->model_name = ct_subsys_name[atc->model];
snd_printd("ctxfi: chip %s model %s (%04x:%04x) is found\n", snd_printd("ctxfi: chip %s model %s (%04x:%04x) is found\n",
atc->chip_name, atc->model_name, atc->chip_name, atc->model_name,

View file

@ -30,13 +30,16 @@ enum CHIPTYP {
enum CTCARDS { enum CTCARDS {
/* 20k1 models */ /* 20k1 models */
CTSB055X, CTSB055X,
CT20K1_MODEL_FIRST = CTSB055X,
CTSB073X, CTSB073X,
CTUAA, CTUAA,
CT20K1_UNKNOWN, CT20K1_UNKNOWN,
/* 20k2 models */ /* 20k2 models */
CTSB0760, CTSB0760,
CT20K2_MODEL_FIRST = CTSB0760,
CTHENDRIX, CTHENDRIX,
CTSB0880, CTSB0880,
CT20K2_UNKNOWN,
NUM_CTCARDS /* This should always be the last */ NUM_CTCARDS /* This should always be the last */
}; };