aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-22 01:36:52 -0400
committerTakashi Iwai <tiwai@suse.de>2009-06-22 01:36:52 -0400
commita8f4310be59a2e7fc80fba945bcb32b18f4ad54f (patch)
tree4af8e8d5f219e3d26e1ad2cbeaa6e4fb854a8cbf /sound
parent8dca419721d188bfee5f19fad45275856c619a5c (diff)
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/ctxfi/ctatc.c25
-rw-r--r--sound/pci/ctxfi/cthardware.h3
2 files changed, 22 insertions, 6 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
index b0adc8094009..32e3c26e969e 100644
--- a/sound/pci/ctxfi/ctatc.c
+++ b/sound/pci/ctxfi/ctatc.c
@@ -46,8 +46,6 @@ static struct snd_pci_quirk __devinitdata subsys_20k1_list[] = {
46 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0031, "SB073x", CTSB073X), 46 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0031, "SB073x", CTSB073X),
47 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_CREATIVE, 0xf000, 0x6000, 47 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_CREATIVE, 0xf000, 0x6000,
48 "UAA", CTUAA), 48 "UAA", CTUAA),
49 SND_PCI_QUIRK_VENDOR(PCI_VENDOR_ID_CREATIVE,
50 "Unknown", CT20K1_UNKNOWN),
51 { } /* terminator */ 49 { } /* terminator */
52}; 50};
53 51
@@ -67,13 +65,16 @@ static struct snd_pci_quirk __devinitdata subsys_20k2_list[] = {
67}; 65};
68 66
69static const char *ct_subsys_name[NUM_CTCARDS] = { 67static const char *ct_subsys_name[NUM_CTCARDS] = {
68 /* 20k1 models */
70 [CTSB055X] = "SB055x", 69 [CTSB055X] = "SB055x",
71 [CTSB073X] = "SB073x", 70 [CTSB073X] = "SB073x",
72 [CTSB0760] = "SB076x",
73 [CTUAA] = "UAA", 71 [CTUAA] = "UAA",
74 [CT20K1_UNKNOWN] = "Unknown", 72 [CT20K1_UNKNOWN] = "Unknown",
73 /* 20k2 models */
74 [CTSB0760] = "SB076x",
75 [CTHENDRIX] = "Hendrix", 75 [CTHENDRIX] = "Hendrix",
76 [CTSB0880] = "SB0880", 76 [CTSB0880] = "SB0880",
77 [CT20K2_UNKNOWN] = "Unknown",
77}; 78};
78 79
79static struct { 80static struct {
@@ -1240,9 +1241,21 @@ static int __devinit atc_identify_card(struct ct_atc *atc)
1240 return -ENOENT; 1241 return -ENOENT;
1241 } 1242 }
1242 p = snd_pci_quirk_lookup(atc->pci, list); 1243 p = snd_pci_quirk_lookup(atc->pci, list);
1243 if (!p) 1244 if (p) {
1244 return -ENOENT; 1245 if (p->value < 0) {
1245 atc->model = p->value; 1246 printk(KERN_ERR "ctxfi: "
1247 "Device %04x:%04x is black-listed\n",
1248 atc->pci->subsystem_vendor,
1249 atc->pci->subsystem_device);
1250 return -ENOENT;
1251 }
1252 atc->model = p->value;
1253 } else {
1254 if (atc->chip_type == ATC20K1)
1255 atc->model = CT20K1_UNKNOWN;
1256 else
1257 atc->model = CT20K2_UNKNOWN;
1258 }
1246 atc->model_name = ct_subsys_name[atc->model]; 1259 atc->model_name = ct_subsys_name[atc->model];
1247 snd_printd("ctxfi: chip %s model %s (%04x:%04x) is found\n", 1260 snd_printd("ctxfi: chip %s model %s (%04x:%04x) is found\n",
1248 atc->chip_name, atc->model_name, 1261 atc->chip_name, atc->model_name,
diff --git a/sound/pci/ctxfi/cthardware.h b/sound/pci/ctxfi/cthardware.h
index 4a8e04f090a4..a4c2cad80f3a 100644
--- a/sound/pci/ctxfi/cthardware.h
+++ b/sound/pci/ctxfi/cthardware.h
@@ -30,13 +30,16 @@ enum CHIPTYP {
30enum CTCARDS { 30enum CTCARDS {
31 /* 20k1 models */ 31 /* 20k1 models */
32 CTSB055X, 32 CTSB055X,
33 CT20K1_MODEL_FIRST = CTSB055X,
33 CTSB073X, 34 CTSB073X,
34 CTUAA, 35 CTUAA,
35 CT20K1_UNKNOWN, 36 CT20K1_UNKNOWN,
36 /* 20k2 models */ 37 /* 20k2 models */
37 CTSB0760, 38 CTSB0760,
39 CT20K2_MODEL_FIRST = CTSB0760,
38 CTHENDRIX, 40 CTHENDRIX,
39 CTSB0880, 41 CTSB0880,
42 CT20K2_UNKNOWN,
40 NUM_CTCARDS /* This should always be the last */ 43 NUM_CTCARDS /* This should always be the last */
41}; 44};
42 45