diff options
author | James Courtier-Dutton <James@superbug.co.uk> | 2006-11-25 14:42:29 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@server.perex.cz> | 2006-12-20 02:56:08 -0500 |
commit | e4f55d8010eacb2669c2a68f195993e4563b94c8 (patch) | |
tree | 6ac91893faca838ecc6486a3650a0b29e3b953a3 /sound | |
parent | 4d361285925613516560f81f8c7fc96b89c8b1a8 (diff) |
[ALSA] snd-ca0106: Add new card variant.
Fixed ALSA bug#2326
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/ca0106/ca0106_main.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 35ac187cab66..881c4ca7b56d 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -154,6 +154,7 @@ MODULE_SUPPORTED_DEVICE("{{Creative,SB CA0106 chip}}"); | |||
154 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; | 154 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; |
155 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; | 155 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; |
156 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; | 156 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; |
157 | static uint subsystem[SNDRV_CARDS]; /* Force card subsystem model */ | ||
157 | 158 | ||
158 | module_param_array(index, int, NULL, 0444); | 159 | module_param_array(index, int, NULL, 0444); |
159 | MODULE_PARM_DESC(index, "Index value for the CA0106 soundcard."); | 160 | MODULE_PARM_DESC(index, "Index value for the CA0106 soundcard."); |
@@ -161,6 +162,8 @@ module_param_array(id, charp, NULL, 0444); | |||
161 | MODULE_PARM_DESC(id, "ID string for the CA0106 soundcard."); | 162 | MODULE_PARM_DESC(id, "ID string for the CA0106 soundcard."); |
162 | module_param_array(enable, bool, NULL, 0444); | 163 | module_param_array(enable, bool, NULL, 0444); |
163 | MODULE_PARM_DESC(enable, "Enable the CA0106 soundcard."); | 164 | MODULE_PARM_DESC(enable, "Enable the CA0106 soundcard."); |
165 | module_param_array(subsystem, uint, NULL, 0444); | ||
166 | MODULE_PARM_DESC(subsystem, "Force card subsystem model."); | ||
164 | 167 | ||
165 | #include "ca0106.h" | 168 | #include "ca0106.h" |
166 | 169 | ||
@@ -194,6 +197,17 @@ static struct snd_ca0106_details ca0106_chip_details[] = { | |||
194 | .gpio_type = 1, | 197 | .gpio_type = 1, |
195 | .i2c_adc = 1, | 198 | .i2c_adc = 1, |
196 | .spi_dac = 1 } , | 199 | .spi_dac = 1 } , |
200 | /* New Audigy LS. Has a different DAC. */ | ||
201 | /* SB0570: | ||
202 | * CTRL:CA0106-DAT | ||
203 | * ADC: WM8775EDS | ||
204 | * DAC: WM8768GEDS | ||
205 | */ | ||
206 | { .serial = 0x10111102, | ||
207 | .name = "Audigy LS [SB0570a]", | ||
208 | .gpio_type = 1, | ||
209 | .i2c_adc = 1, | ||
210 | .spi_dac = 1 } , | ||
197 | /* MSI K8N Diamond Motherboard with onboard SB Live 24bit without AC97 */ | 211 | /* MSI K8N Diamond Motherboard with onboard SB Live 24bit without AC97 */ |
198 | /* SB0438 | 212 | /* SB0438 |
199 | * CTRL:CA0106-DAT | 213 | * CTRL:CA0106-DAT |
@@ -1223,7 +1237,7 @@ static unsigned int i2c_adc_init[][2] = { | |||
1223 | { 0x15, ADC_MUX_LINEIN }, /* ADC Mixer control */ | 1237 | { 0x15, ADC_MUX_LINEIN }, /* ADC Mixer control */ |
1224 | }; | 1238 | }; |
1225 | 1239 | ||
1226 | static int __devinit snd_ca0106_create(struct snd_card *card, | 1240 | static int __devinit snd_ca0106_create(int dev, struct snd_card *card, |
1227 | struct pci_dev *pci, | 1241 | struct pci_dev *pci, |
1228 | struct snd_ca0106 **rchip) | 1242 | struct snd_ca0106 **rchip) |
1229 | { | 1243 | { |
@@ -1286,17 +1300,25 @@ static int __devinit snd_ca0106_create(struct snd_card *card, | |||
1286 | pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial); | 1300 | pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial); |
1287 | pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model); | 1301 | pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model); |
1288 | #if 1 | 1302 | #if 1 |
1289 | printk(KERN_INFO "Model %04x Rev %08x Serial %08x\n", chip->model, | 1303 | printk(KERN_INFO "snd-ca0106: Model %04x Rev %08x Serial %08x\n", chip->model, |
1290 | chip->revision, chip->serial); | 1304 | chip->revision, chip->serial); |
1291 | #endif | 1305 | #endif |
1292 | strcpy(card->driver, "CA0106"); | 1306 | strcpy(card->driver, "CA0106"); |
1293 | strcpy(card->shortname, "CA0106"); | 1307 | strcpy(card->shortname, "CA0106"); |
1294 | 1308 | ||
1295 | for (c = ca0106_chip_details; c->serial; c++) { | 1309 | for (c = ca0106_chip_details; c->serial; c++) { |
1296 | if (c->serial == chip->serial) | 1310 | if (subsystem[dev]) { |
1311 | if (c->serial == subsystem[dev]) | ||
1312 | break; | ||
1313 | } else if (c->serial == chip->serial) | ||
1297 | break; | 1314 | break; |
1298 | } | 1315 | } |
1299 | chip->details = c; | 1316 | chip->details = c; |
1317 | if (subsystem[dev]) { | ||
1318 | printk(KERN_INFO "snd-ca0106: Sound card name=%s, subsystem=0x%x. Forced to subsytem=0x%x\n", | ||
1319 | c->name, chip->serial, subsystem[dev]); | ||
1320 | } | ||
1321 | |||
1300 | sprintf(card->longname, "%s at 0x%lx irq %i", | 1322 | sprintf(card->longname, "%s at 0x%lx irq %i", |
1301 | c->name, chip->port, chip->irq); | 1323 | c->name, chip->port, chip->irq); |
1302 | 1324 | ||
@@ -1539,7 +1561,7 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci, | |||
1539 | if (card == NULL) | 1561 | if (card == NULL) |
1540 | return -ENOMEM; | 1562 | return -ENOMEM; |
1541 | 1563 | ||
1542 | if ((err = snd_ca0106_create(card, pci, &chip)) < 0) { | 1564 | if ((err = snd_ca0106_create(dev, card, pci, &chip)) < 0) { |
1543 | snd_card_free(card); | 1565 | snd_card_free(card); |
1544 | return err; | 1566 | return err; |
1545 | } | 1567 | } |