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 cb65bd0dd35b..903594e6ed79 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c | |||
@@ -1225,10 +1225,11 @@ static int atc_dev_free(struct snd_device *dev) | |||
1225 | return ct_atc_destroy(atc); | 1225 | return ct_atc_destroy(atc); |
1226 | } | 1226 | } |
1227 | 1227 | ||
1228 | static int __devinit atc_identify_card(struct ct_atc *atc) | 1228 | static int __devinit atc_identify_card(struct ct_atc *atc, unsigned int ssid) |
1229 | { | 1229 | { |
1230 | const struct snd_pci_quirk *p; | 1230 | const struct snd_pci_quirk *p; |
1231 | const struct snd_pci_quirk *list; | 1231 | const struct snd_pci_quirk *list; |
1232 | u16 vendor_id, device_id; | ||
1232 | 1233 | ||
1233 | switch (atc->chip_type) { | 1234 | switch (atc->chip_type) { |
1234 | case ATC20K1: | 1235 | case ATC20K1: |
@@ -1242,13 +1243,19 @@ static int __devinit atc_identify_card(struct ct_atc *atc) | |||
1242 | default: | 1243 | default: |
1243 | return -ENOENT; | 1244 | return -ENOENT; |
1244 | } | 1245 | } |
1245 | p = snd_pci_quirk_lookup(atc->pci, list); | 1246 | if (ssid) { |
1247 | vendor_id = ssid >> 16; | ||
1248 | device_id = ssid & 0xffff; | ||
1249 | } else { | ||
1250 | vendor_id = atc->pci->subsystem_vendor; | ||
1251 | device_id = atc->pci->subsystem_device; | ||
1252 | } | ||
1253 | p = snd_pci_quirk_lookup_id(vendor_id, device_id, list); | ||
1246 | if (p) { | 1254 | if (p) { |
1247 | if (p->value < 0) { | 1255 | if (p->value < 0) { |
1248 | printk(KERN_ERR "ctxfi: " | 1256 | printk(KERN_ERR "ctxfi: " |
1249 | "Device %04x:%04x is black-listed\n", | 1257 | "Device %04x:%04x is black-listed\n", |
1250 | atc->pci->subsystem_vendor, | 1258 | vendor_id, device_id); |
1251 | atc->pci->subsystem_device); | ||
1252 | return -ENOENT; | 1259 | return -ENOENT; |
1253 | } | 1260 | } |
1254 | atc->model = p->value; | 1261 | atc->model = p->value; |
@@ -1261,8 +1268,7 @@ static int __devinit atc_identify_card(struct ct_atc *atc) | |||
1261 | atc->model_name = ct_subsys_name[atc->model]; | 1268 | atc->model_name = ct_subsys_name[atc->model]; |
1262 | snd_printd("ctxfi: chip %s model %s (%04x:%04x) is found\n", | 1269 | snd_printd("ctxfi: chip %s model %s (%04x:%04x) is found\n", |
1263 | atc->chip_name, atc->model_name, | 1270 | atc->chip_name, atc->model_name, |
1264 | atc->pci->subsystem_vendor, | 1271 | vendor_id, device_id); |
1265 | atc->pci->subsystem_device); | ||
1266 | return 0; | 1272 | return 0; |
1267 | } | 1273 | } |
1268 | 1274 | ||
@@ -1636,7 +1642,8 @@ static struct ct_atc atc_preset __devinitdata = { | |||
1636 | 1642 | ||
1637 | int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci, | 1643 | int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci, |
1638 | unsigned int rsr, unsigned int msr, | 1644 | unsigned int rsr, unsigned int msr, |
1639 | int chip_type, struct ct_atc **ratc) | 1645 | int chip_type, unsigned int ssid, |
1646 | struct ct_atc **ratc) | ||
1640 | { | 1647 | { |
1641 | struct ct_atc *atc; | 1648 | struct ct_atc *atc; |
1642 | static struct snd_device_ops ops = { | 1649 | static struct snd_device_ops ops = { |
@@ -1662,7 +1669,7 @@ int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci, | |||
1662 | mutex_init(&atc->atc_mutex); | 1669 | mutex_init(&atc->atc_mutex); |
1663 | 1670 | ||
1664 | /* Find card model */ | 1671 | /* Find card model */ |
1665 | err = atc_identify_card(atc); | 1672 | err = atc_identify_card(atc, ssid); |
1666 | if (err < 0) { | 1673 | if (err < 0) { |
1667 | printk(KERN_ERR "ctatc: Card not recognised\n"); | 1674 | printk(KERN_ERR "ctatc: Card not recognised\n"); |
1668 | goto error1; | 1675 | goto error1; |