diff options
-rw-r--r-- | Documentation/sound/alsa/ALSA-Configuration.txt | 3 | ||||
-rw-r--r-- | sound/pci/ctxfi/ctatc.c | 23 | ||||
-rw-r--r-- | sound/pci/ctxfi/ctatc.h | 2 | ||||
-rw-r--r-- | sound/pci/ctxfi/xfi.c | 5 |
4 files changed, 23 insertions, 10 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index c540637eb16a..c83fd7b64201 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -482,6 +482,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
482 | 482 | ||
483 | reference_rate - reference sample rate, 44100 or 48000 (default) | 483 | reference_rate - reference sample rate, 44100 or 48000 (default) |
484 | multiple - multiple to ref. sample rate, 1 or 2 (default) | 484 | multiple - multiple to ref. sample rate, 1 or 2 (default) |
485 | subsystem - override the PCI SSID for probing; the value | ||
486 | consists of SSVID << 16 | SSDID. The default is | ||
487 | zero, which means no override. | ||
485 | 488 | ||
486 | This module supports multiple cards. | 489 | This module supports multiple cards. |
487 | 490 | ||
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; |
diff --git a/sound/pci/ctxfi/ctatc.h b/sound/pci/ctxfi/ctatc.h index 9fd8a5708943..7167c0185d52 100644 --- a/sound/pci/ctxfi/ctatc.h +++ b/sound/pci/ctxfi/ctatc.h | |||
@@ -148,7 +148,7 @@ struct ct_atc { | |||
148 | 148 | ||
149 | int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci, | 149 | int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci, |
150 | unsigned int rsr, unsigned int msr, int chip_type, | 150 | unsigned int rsr, unsigned int msr, int chip_type, |
151 | struct ct_atc **ratc); | 151 | unsigned int subsysid, struct ct_atc **ratc); |
152 | int __devinit ct_atc_create_alsa_devs(struct ct_atc *atc); | 152 | int __devinit ct_atc_create_alsa_devs(struct ct_atc *atc); |
153 | 153 | ||
154 | #endif /* CTATC_H */ | 154 | #endif /* CTATC_H */ |
diff --git a/sound/pci/ctxfi/xfi.c b/sound/pci/ctxfi/xfi.c index 76541748e7bc..ed44ed788b60 100644 --- a/sound/pci/ctxfi/xfi.c +++ b/sound/pci/ctxfi/xfi.c | |||
@@ -32,6 +32,7 @@ module_param(multiple, uint, S_IRUGO); | |||
32 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; | 32 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; |
33 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; | 33 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; |
34 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; | 34 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; |
35 | static unsigned int subsystem[SNDRV_CARDS]; | ||
35 | 36 | ||
36 | module_param_array(index, int, NULL, 0444); | 37 | module_param_array(index, int, NULL, 0444); |
37 | MODULE_PARM_DESC(index, "Index value for Creative X-Fi driver"); | 38 | MODULE_PARM_DESC(index, "Index value for Creative X-Fi driver"); |
@@ -39,6 +40,8 @@ module_param_array(id, charp, NULL, 0444); | |||
39 | MODULE_PARM_DESC(id, "ID string for Creative X-Fi driver"); | 40 | MODULE_PARM_DESC(id, "ID string for Creative X-Fi driver"); |
40 | module_param_array(enable, bool, NULL, 0444); | 41 | module_param_array(enable, bool, NULL, 0444); |
41 | MODULE_PARM_DESC(enable, "Enable Creative X-Fi driver"); | 42 | MODULE_PARM_DESC(enable, "Enable Creative X-Fi driver"); |
43 | module_param_array(subsystem, int, NULL, 0444); | ||
44 | MODULE_PARM_DESC(subsystem, "Override subsystem ID for Creative X-Fi driver"); | ||
42 | 45 | ||
43 | static struct pci_device_id ct_pci_dev_ids[] = { | 46 | static struct pci_device_id ct_pci_dev_ids[] = { |
44 | /* only X-Fi is supported, so... */ | 47 | /* only X-Fi is supported, so... */ |
@@ -85,7 +88,7 @@ ct_card_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | |||
85 | multiple = 2; | 88 | multiple = 2; |
86 | } | 89 | } |
87 | err = ct_atc_create(card, pci, reference_rate, multiple, | 90 | err = ct_atc_create(card, pci, reference_rate, multiple, |
88 | pci_id->driver_data, &atc); | 91 | pci_id->driver_data, subsystem[dev], &atc); |
89 | if (err < 0) | 92 | if (err < 0) |
90 | goto error; | 93 | goto error; |
91 | 94 | ||