diff options
Diffstat (limited to 'sound/pci/ctxfi/ctatc.c')
-rw-r--r-- | sound/pci/ctxfi/ctatc.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index 459c1f62783b..480cb1e905b6 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c | |||
@@ -1214,10 +1214,11 @@ static int atc_dev_free(struct snd_device *dev) | |||
1214 | return ct_atc_destroy(atc); | 1214 | return ct_atc_destroy(atc); |
1215 | } | 1215 | } |
1216 | 1216 | ||
1217 | static int __devinit atc_identify_card(struct ct_atc *atc) | 1217 | static int __devinit atc_identify_card(struct ct_atc *atc, unsigned int ssid) |
1218 | { | 1218 | { |
1219 | const struct snd_pci_quirk *p; | 1219 | const struct snd_pci_quirk *p; |
1220 | const struct snd_pci_quirk *list; | 1220 | const struct snd_pci_quirk *list; |
1221 | u16 vendor_id, device_id; | ||
1221 | 1222 | ||
1222 | switch (atc->chip_type) { | 1223 | switch (atc->chip_type) { |
1223 | case ATC20K1: | 1224 | case ATC20K1: |
@@ -1231,13 +1232,19 @@ static int __devinit atc_identify_card(struct ct_atc *atc) | |||
1231 | default: | 1232 | default: |
1232 | return -ENOENT; | 1233 | return -ENOENT; |
1233 | } | 1234 | } |
1234 | p = snd_pci_quirk_lookup(atc->pci, list); | 1235 | if (ssid) { |
1236 | vendor_id = ssid >> 16; | ||
1237 | device_id = ssid & 0xffff; | ||
1238 | } else { | ||
1239 | vendor_id = atc->pci->subsystem_vendor; | ||
1240 | device_id = atc->pci->subsystem_device; | ||
1241 | } | ||
1242 | p = snd_pci_quirk_lookup_id(vendor_id, device_id, list); | ||
1235 | if (p) { | 1243 | if (p) { |
1236 | if (p->value < 0) { | 1244 | if (p->value < 0) { |
1237 | printk(KERN_ERR "ctxfi: " | 1245 | printk(KERN_ERR "ctxfi: " |
1238 | "Device %04x:%04x is black-listed\n", | 1246 | "Device %04x:%04x is black-listed\n", |
1239 | atc->pci->subsystem_vendor, | 1247 | vendor_id, device_id); |
1240 | atc->pci->subsystem_device); | ||
1241 | return -ENOENT; | 1248 | return -ENOENT; |
1242 | } | 1249 | } |
1243 | atc->model = p->value; | 1250 | atc->model = p->value; |
@@ -1250,8 +1257,7 @@ static int __devinit atc_identify_card(struct ct_atc *atc) | |||
1250 | atc->model_name = ct_subsys_name[atc->model]; | 1257 | atc->model_name = ct_subsys_name[atc->model]; |
1251 | snd_printd("ctxfi: chip %s model %s (%04x:%04x) is found\n", | 1258 | snd_printd("ctxfi: chip %s model %s (%04x:%04x) is found\n", |
1252 | atc->chip_name, atc->model_name, | 1259 | atc->chip_name, atc->model_name, |
1253 | atc->pci->subsystem_vendor, | 1260 | vendor_id, device_id); |
1254 | atc->pci->subsystem_device); | ||
1255 | return 0; | 1261 | return 0; |
1256 | } | 1262 | } |
1257 | 1263 | ||
@@ -1625,7 +1631,8 @@ static struct ct_atc atc_preset __devinitdata = { | |||
1625 | 1631 | ||
1626 | int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci, | 1632 | int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci, |
1627 | unsigned int rsr, unsigned int msr, | 1633 | unsigned int rsr, unsigned int msr, |
1628 | int chip_type, struct ct_atc **ratc) | 1634 | int chip_type, unsigned int ssid, |
1635 | struct ct_atc **ratc) | ||
1629 | { | 1636 | { |
1630 | struct ct_atc *atc; | 1637 | struct ct_atc *atc; |
1631 | static struct snd_device_ops ops = { | 1638 | static struct snd_device_ops ops = { |
@@ -1651,7 +1658,7 @@ int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci, | |||
1651 | mutex_init(&atc->atc_mutex); | 1658 | mutex_init(&atc->atc_mutex); |
1652 | 1659 | ||
1653 | /* Find card model */ | 1660 | /* Find card model */ |
1654 | err = atc_identify_card(atc); | 1661 | err = atc_identify_card(atc, ssid); |
1655 | if (err < 0) { | 1662 | if (err < 0) { |
1656 | printk(KERN_ERR "ctatc: Card not recognised\n"); | 1663 | printk(KERN_ERR "ctatc: Card not recognised\n"); |
1657 | goto error1; | 1664 | goto error1; |