diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-07 22:51:47 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-07 22:51:47 -0500 |
commit | 6b995751c2e851d2bc9c277b5884d0adb519e31d (patch) | |
tree | 7a15b41b5d8ce612915584a0773c670d5c0ab5b8 /sound/pci/ice1712 | |
parent | 6c2f4267833f453156f8f439cc32eb4c92f357b4 (diff) | |
parent | d27ba47e7e8c466c18983a1779d611f82d6a354f (diff) |
Merge branch 'master'
Diffstat (limited to 'sound/pci/ice1712')
-rw-r--r-- | sound/pci/ice1712/aureon.c | 6 | ||||
-rw-r--r-- | sound/pci/ice1712/delta.c | 2 | ||||
-rw-r--r-- | sound/pci/ice1712/ews.c | 6 | ||||
-rw-r--r-- | sound/pci/ice1712/ice1712.c | 10 | ||||
-rw-r--r-- | sound/pci/ice1712/ice1724.c | 43 | ||||
-rw-r--r-- | sound/pci/ice1712/pontis.c | 3 | ||||
-rw-r--r-- | sound/pci/ice1712/revo.c | 13 | ||||
-rw-r--r-- | sound/pci/ice1712/vt1720_mobo.c | 20 |
8 files changed, 61 insertions, 42 deletions
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c index 2e0a31613ee6..db12b038286b 100644 --- a/sound/pci/ice1712/aureon.c +++ b/sound/pci/ice1712/aureon.c | |||
@@ -960,7 +960,7 @@ static int wm_adc_mux_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucont | |||
960 | if (change) | 960 | if (change) |
961 | wm_put(ice, WM_ADC_MUX, nval); | 961 | wm_put(ice, WM_ADC_MUX, nval); |
962 | snd_ice1712_restore_gpio_status(ice); | 962 | snd_ice1712_restore_gpio_status(ice); |
963 | return 0; | 963 | return change; |
964 | } | 964 | } |
965 | 965 | ||
966 | /* | 966 | /* |
@@ -1672,9 +1672,9 @@ static int __devinit aureon_add_controls(ice1712_t *ice) | |||
1672 | snd_ice1712_save_gpio_status(ice); | 1672 | snd_ice1712_save_gpio_status(ice); |
1673 | id = aureon_cs8415_get(ice, CS8415_ID); | 1673 | id = aureon_cs8415_get(ice, CS8415_ID); |
1674 | if (id != 0x41) | 1674 | if (id != 0x41) |
1675 | snd_printk("No CS8415 chip. Skipping CS8415 controls.\n"); | 1675 | snd_printk(KERN_INFO "No CS8415 chip. Skipping CS8415 controls.\n"); |
1676 | else if ((id & 0x0F) != 0x01) | 1676 | else if ((id & 0x0F) != 0x01) |
1677 | snd_printk("Detected unsupported CS8415 rev. (%c)\n", (char)((id & 0x0F) + 'A' - 1)); | 1677 | snd_printk(KERN_INFO "Detected unsupported CS8415 rev. (%c)\n", (char)((id & 0x0F) + 'A' - 1)); |
1678 | else { | 1678 | else { |
1679 | for (i = 0; i< ARRAY_SIZE(cs8415_controls); i++) { | 1679 | for (i = 0; i< ARRAY_SIZE(cs8415_controls); i++) { |
1680 | snd_kcontrol_t *kctl; | 1680 | snd_kcontrol_t *kctl; |
diff --git a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c index 39fbe662965d..576f69d482c9 100644 --- a/sound/pci/ice1712/delta.c +++ b/sound/pci/ice1712/delta.c | |||
@@ -546,7 +546,7 @@ static int __devinit snd_ice1712_delta_init(ice1712_t *ice) | |||
546 | case ICE1712_SUBDEVICE_DELTA1010LT: | 546 | case ICE1712_SUBDEVICE_DELTA1010LT: |
547 | case ICE1712_SUBDEVICE_VX442: | 547 | case ICE1712_SUBDEVICE_VX442: |
548 | if ((err = snd_i2c_bus_create(ice->card, "ICE1712 GPIO 1", NULL, &ice->i2c)) < 0) { | 548 | if ((err = snd_i2c_bus_create(ice->card, "ICE1712 GPIO 1", NULL, &ice->i2c)) < 0) { |
549 | snd_printk("unable to create I2C bus\n"); | 549 | snd_printk(KERN_ERR "unable to create I2C bus\n"); |
550 | return err; | 550 | return err; |
551 | } | 551 | } |
552 | ice->i2c->private_data = ice; | 552 | ice->i2c->private_data = ice; |
diff --git a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c index e36efa1bdac3..c8ec5cac3c17 100644 --- a/sound/pci/ice1712/ews.c +++ b/sound/pci/ice1712/ews.c | |||
@@ -438,7 +438,7 @@ static int __devinit snd_ice1712_ews_init(ice1712_t *ice) | |||
438 | 438 | ||
439 | /* create i2c */ | 439 | /* create i2c */ |
440 | if ((err = snd_i2c_bus_create(ice->card, "ICE1712 GPIO 1", NULL, &ice->i2c)) < 0) { | 440 | if ((err = snd_i2c_bus_create(ice->card, "ICE1712 GPIO 1", NULL, &ice->i2c)) < 0) { |
441 | snd_printk("unable to create I2C bus\n"); | 441 | snd_printk(KERN_ERR "unable to create I2C bus\n"); |
442 | return err; | 442 | return err; |
443 | } | 443 | } |
444 | ice->i2c->private_data = ice; | 444 | ice->i2c->private_data = ice; |
@@ -448,7 +448,7 @@ static int __devinit snd_ice1712_ews_init(ice1712_t *ice) | |||
448 | switch (ice->eeprom.subvendor) { | 448 | switch (ice->eeprom.subvendor) { |
449 | case ICE1712_SUBDEVICE_DMX6FIRE: | 449 | case ICE1712_SUBDEVICE_DMX6FIRE: |
450 | if ((err = snd_i2c_device_create(ice->i2c, "PCF9554", ICE1712_6FIRE_PCF9554_ADDR, &ice->spec.i2cdevs[EWS_I2C_6FIRE])) < 0) { | 450 | if ((err = snd_i2c_device_create(ice->i2c, "PCF9554", ICE1712_6FIRE_PCF9554_ADDR, &ice->spec.i2cdevs[EWS_I2C_6FIRE])) < 0) { |
451 | snd_printk("PCF9554 initialization failed\n"); | 451 | snd_printk(KERN_ERR "PCF9554 initialization failed\n"); |
452 | return err; | 452 | return err; |
453 | } | 453 | } |
454 | snd_ice1712_6fire_write_pca(ice, PCF9554_REG_CONFIG, 0x80); | 454 | snd_ice1712_6fire_write_pca(ice, PCF9554_REG_CONFIG, 0x80); |
@@ -791,7 +791,7 @@ static int snd_ice1712_6fire_read_pca(ice1712_t *ice, unsigned char reg) | |||
791 | byte = 0; | 791 | byte = 0; |
792 | if (snd_i2c_readbytes(ice->spec.i2cdevs[EWS_I2C_6FIRE], &byte, 1) != 1) { | 792 | if (snd_i2c_readbytes(ice->spec.i2cdevs[EWS_I2C_6FIRE], &byte, 1) != 1) { |
793 | snd_i2c_unlock(ice->i2c); | 793 | snd_i2c_unlock(ice->i2c); |
794 | printk("cannot read pca\n"); | 794 | printk(KERN_ERR "cannot read pca\n"); |
795 | return -EIO; | 795 | return -EIO; |
796 | } | 796 | } |
797 | snd_i2c_unlock(ice->i2c); | 797 | snd_i2c_unlock(ice->i2c); |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index a6d98013c331..5aca37798c32 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -387,7 +387,7 @@ int __devinit snd_ice1712_init_cs8427(ice1712_t *ice, int addr) | |||
387 | if ((err = snd_cs8427_create(ice->i2c, addr, | 387 | if ((err = snd_cs8427_create(ice->i2c, addr, |
388 | (ice->cs8427_timeout * HZ) / 1000, | 388 | (ice->cs8427_timeout * HZ) / 1000, |
389 | &ice->cs8427)) < 0) { | 389 | &ice->cs8427)) < 0) { |
390 | snd_printk("CS8427 initialization failed\n"); | 390 | snd_printk(KERN_ERR "CS8427 initialization failed\n"); |
391 | return err; | 391 | return err; |
392 | } | 392 | } |
393 | ice->spdif.ops.open = open_cs8427; | 393 | ice->spdif.ops.open = open_cs8427; |
@@ -2348,12 +2348,12 @@ static int __devinit snd_ice1712_read_eeprom(ice1712_t *ice, const char *modelna | |||
2348 | if (ice->eeprom.size < 6) | 2348 | if (ice->eeprom.size < 6) |
2349 | ice->eeprom.size = 32; /* FIXME: any cards without the correct size? */ | 2349 | ice->eeprom.size = 32; /* FIXME: any cards without the correct size? */ |
2350 | else if (ice->eeprom.size > 32) { | 2350 | else if (ice->eeprom.size > 32) { |
2351 | snd_printk("invalid EEPROM (size = %i)\n", ice->eeprom.size); | 2351 | snd_printk(KERN_ERR "invalid EEPROM (size = %i)\n", ice->eeprom.size); |
2352 | return -EIO; | 2352 | return -EIO; |
2353 | } | 2353 | } |
2354 | ice->eeprom.version = snd_ice1712_read_i2c(ice, dev, 0x05); | 2354 | ice->eeprom.version = snd_ice1712_read_i2c(ice, dev, 0x05); |
2355 | if (ice->eeprom.version != 1) { | 2355 | if (ice->eeprom.version != 1) { |
2356 | snd_printk("invalid EEPROM version %i\n", ice->eeprom.version); | 2356 | snd_printk(KERN_ERR "invalid EEPROM version %i\n", ice->eeprom.version); |
2357 | /* return -EIO; */ | 2357 | /* return -EIO; */ |
2358 | } | 2358 | } |
2359 | size = ice->eeprom.size - 6; | 2359 | size = ice->eeprom.size - 6; |
@@ -2524,7 +2524,7 @@ static int __devinit snd_ice1712_create(snd_card_t * card, | |||
2524 | /* check, if we can restrict PCI DMA transfers to 28 bits */ | 2524 | /* check, if we can restrict PCI DMA transfers to 28 bits */ |
2525 | if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || | 2525 | if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || |
2526 | pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { | 2526 | pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { |
2527 | snd_printk("architecture does not support 28bit PCI busmaster DMA\n"); | 2527 | snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n"); |
2528 | pci_disable_device(pci); | 2528 | pci_disable_device(pci); |
2529 | return -ENXIO; | 2529 | return -ENXIO; |
2530 | } | 2530 | } |
@@ -2573,7 +2573,7 @@ static int __devinit snd_ice1712_create(snd_card_t * card, | |||
2573 | ice->profi_port = pci_resource_start(pci, 3); | 2573 | ice->profi_port = pci_resource_start(pci, 3); |
2574 | 2574 | ||
2575 | if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1712", (void *) ice)) { | 2575 | if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1712", (void *) ice)) { |
2576 | snd_printk("unable to grab IRQ %d\n", pci->irq); | 2576 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
2577 | snd_ice1712_free(ice); | 2577 | snd_ice1712_free(ice); |
2578 | return -EIO; | 2578 | return -EIO; |
2579 | } | 2579 | } |
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index c3ce8f93740b..5b4293f5a652 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -675,9 +675,12 @@ static snd_pcm_hardware_t snd_vt1724_spdif = | |||
675 | SNDRV_PCM_INFO_MMAP_VALID | | 675 | SNDRV_PCM_INFO_MMAP_VALID | |
676 | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_SYNC_START), | 676 | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_SYNC_START), |
677 | .formats = SNDRV_PCM_FMTBIT_S32_LE, | 677 | .formats = SNDRV_PCM_FMTBIT_S32_LE, |
678 | .rates = SNDRV_PCM_RATE_32000|SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000, | 678 | .rates = (SNDRV_PCM_RATE_32000|SNDRV_PCM_RATE_44100| |
679 | SNDRV_PCM_RATE_48000|SNDRV_PCM_RATE_88200| | ||
680 | SNDRV_PCM_RATE_96000|SNDRV_PCM_RATE_176400| | ||
681 | SNDRV_PCM_RATE_192000), | ||
679 | .rate_min = 32000, | 682 | .rate_min = 32000, |
680 | .rate_max = 48000, | 683 | .rate_max = 192000, |
681 | .channels_min = 2, | 684 | .channels_min = 2, |
682 | .channels_max = 2, | 685 | .channels_max = 2, |
683 | .buffer_bytes_max = (1UL << 18), /* 16bits dword */ | 686 | .buffer_bytes_max = (1UL << 18), /* 16bits dword */ |
@@ -905,6 +908,10 @@ static void update_spdif_rate(ice1712_t *ice, unsigned int rate) | |||
905 | case 44100: break; | 908 | case 44100: break; |
906 | case 48000: nval |= 2 << 12; break; | 909 | case 48000: nval |= 2 << 12; break; |
907 | case 32000: nval |= 3 << 12; break; | 910 | case 32000: nval |= 3 << 12; break; |
911 | case 88200: nval |= 4 << 12; break; | ||
912 | case 96000: nval |= 5 << 12; break; | ||
913 | case 192000: nval |= 6 << 12; break; | ||
914 | case 176400: nval |= 7 << 12; break; | ||
908 | } | 915 | } |
909 | if (val != nval) | 916 | if (val != nval) |
910 | update_spdif_bits(ice, nval); | 917 | update_spdif_bits(ice, nval); |
@@ -1292,22 +1299,32 @@ static int snd_vt1724_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * | |||
1292 | 1299 | ||
1293 | static unsigned int encode_spdif_bits(snd_aes_iec958_t *diga) | 1300 | static unsigned int encode_spdif_bits(snd_aes_iec958_t *diga) |
1294 | { | 1301 | { |
1295 | unsigned int val; | 1302 | unsigned int val, rbits; |
1296 | 1303 | ||
1297 | val = diga->status[0] & 0x03; /* professional, non-audio */ | 1304 | val = diga->status[0] & 0x03; /* professional, non-audio */ |
1298 | if (val & 0x01) { | 1305 | if (val & 0x01) { |
1299 | /* professional */ | 1306 | /* professional */ |
1300 | if ((diga->status[0] & IEC958_AES0_PRO_EMPHASIS) == IEC958_AES0_PRO_EMPHASIS_5015) | 1307 | if ((diga->status[0] & IEC958_AES0_PRO_EMPHASIS) == IEC958_AES0_PRO_EMPHASIS_5015) |
1301 | val |= 1U << 3; | 1308 | val |= 1U << 3; |
1302 | switch (diga->status[0] & IEC958_AES0_PRO_FS) { | 1309 | rbits = (diga->status[4] >> 3) & 0x0f; |
1303 | case IEC958_AES0_PRO_FS_44100: | 1310 | if (rbits) { |
1304 | break; | 1311 | switch (rbits) { |
1305 | case IEC958_AES0_PRO_FS_32000: | 1312 | case 2: val |= 5 << 12; break; /* 96k */ |
1306 | val |= 3U << 12; | 1313 | case 3: val |= 6 << 12; break; /* 192k */ |
1307 | break; | 1314 | case 10: val |= 4 << 12; break; /* 88.2k */ |
1308 | default: | 1315 | case 11: val |= 7 << 12; break; /* 176.4k */ |
1309 | val |= 2U << 12; | 1316 | } |
1310 | break; | 1317 | } else { |
1318 | switch (diga->status[0] & IEC958_AES0_PRO_FS) { | ||
1319 | case IEC958_AES0_PRO_FS_44100: | ||
1320 | break; | ||
1321 | case IEC958_AES0_PRO_FS_32000: | ||
1322 | val |= 3U << 12; | ||
1323 | break; | ||
1324 | default: | ||
1325 | val |= 2U << 12; | ||
1326 | break; | ||
1327 | } | ||
1311 | } | 1328 | } |
1312 | } else { | 1329 | } else { |
1313 | /* consumer */ | 1330 | /* consumer */ |
@@ -2154,7 +2171,7 @@ static int __devinit snd_vt1724_create(snd_card_t * card, | |||
2154 | ice->profi_port = pci_resource_start(pci, 1); | 2171 | ice->profi_port = pci_resource_start(pci, 1); |
2155 | 2172 | ||
2156 | if (request_irq(pci->irq, snd_vt1724_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1724", (void *) ice)) { | 2173 | if (request_irq(pci->irq, snd_vt1724_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1724", (void *) ice)) { |
2157 | snd_printk("unable to grab IRQ %d\n", pci->irq); | 2174 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
2158 | snd_vt1724_free(ice); | 2175 | snd_vt1724_free(ice); |
2159 | return -EIO; | 2176 | return -EIO; |
2160 | } | 2177 | } |
diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c index a5f852b1f575..773a1ecb75ce 100644 --- a/sound/pci/ice1712/pontis.c +++ b/sound/pci/ice1712/pontis.c | |||
@@ -794,8 +794,7 @@ static int __devinit pontis_init(ice1712_t *ice) | |||
794 | /* initialize WM8776 codec */ | 794 | /* initialize WM8776 codec */ |
795 | for (i = 0; i < ARRAY_SIZE(wm_inits); i += 2) | 795 | for (i = 0; i < ARRAY_SIZE(wm_inits); i += 2) |
796 | wm_put(ice, wm_inits[i], wm_inits[i+1]); | 796 | wm_put(ice, wm_inits[i], wm_inits[i+1]); |
797 | set_current_state(TASK_UNINTERRUPTIBLE); | 797 | schedule_timeout_uninterruptible(1); |
798 | schedule_timeout(1); | ||
799 | for (i = 0; i < ARRAY_SIZE(wm_inits2); i += 2) | 798 | for (i = 0; i < ARRAY_SIZE(wm_inits2); i += 2) |
800 | wm_put(ice, wm_inits2[i], wm_inits2[i+1]); | 799 | wm_put(ice, wm_inits2[i], wm_inits2[i+1]); |
801 | 800 | ||
diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c index d48d42524ac5..1fe21009ca84 100644 --- a/sound/pci/ice1712/revo.c +++ b/sound/pci/ice1712/revo.c | |||
@@ -128,17 +128,6 @@ static struct snd_ak4xxx_private akm_revo_surround_priv __devinitdata = { | |||
128 | .mask_flags = 0, | 128 | .mask_flags = 0, |
129 | }; | 129 | }; |
130 | 130 | ||
131 | static unsigned int rates[] = { | ||
132 | 32000, 44100, 48000, 64000, 88200, 96000, | ||
133 | 176400, 192000, | ||
134 | }; | ||
135 | |||
136 | static snd_pcm_hw_constraint_list_t revo_rates = { | ||
137 | .count = ARRAY_SIZE(rates), | ||
138 | .list = rates, | ||
139 | .mask = 0, | ||
140 | }; | ||
141 | |||
142 | static int __devinit revo_init(ice1712_t *ice) | 131 | static int __devinit revo_init(ice1712_t *ice) |
143 | { | 132 | { |
144 | akm4xxx_t *ak; | 133 | akm4xxx_t *ak; |
@@ -173,8 +162,6 @@ static int __devinit revo_init(ice1712_t *ice) | |||
173 | break; | 162 | break; |
174 | } | 163 | } |
175 | 164 | ||
176 | ice->hw_rates = &revo_rates; /* AK codecs don't support lower than 32k */ | ||
177 | |||
178 | return 0; | 165 | return 0; |
179 | } | 166 | } |
180 | 167 | ||
diff --git a/sound/pci/ice1712/vt1720_mobo.c b/sound/pci/ice1712/vt1720_mobo.c index ab61e383024f..90c85cd95479 100644 --- a/sound/pci/ice1712/vt1720_mobo.c +++ b/sound/pci/ice1712/vt1720_mobo.c | |||
@@ -71,6 +71,22 @@ static unsigned char k8x800_eeprom[] __devinitdata = { | |||
71 | 0x00, /* - */ | 71 | 0x00, /* - */ |
72 | }; | 72 | }; |
73 | 73 | ||
74 | static unsigned char sn25p_eeprom[] __devinitdata = { | ||
75 | 0x01, /* SYSCONF: clock 256, 1ADC, 2DACs */ | ||
76 | 0x02, /* ACLINK: ACLINK, packed */ | ||
77 | 0x00, /* I2S: - */ | ||
78 | 0x41, /* SPDIF: - */ | ||
79 | 0xff, /* GPIO_DIR */ | ||
80 | 0xff, /* GPIO_DIR1 */ | ||
81 | 0x00, /* - */ | ||
82 | 0xff, /* GPIO_MASK */ | ||
83 | 0xff, /* GPIO_MASK1 */ | ||
84 | 0x00, /* - */ | ||
85 | 0x00, /* GPIO_STATE */ | ||
86 | 0x00, /* GPIO_STATE1 */ | ||
87 | 0x00, /* - */ | ||
88 | }; | ||
89 | |||
74 | 90 | ||
75 | /* entry point */ | 91 | /* entry point */ |
76 | struct snd_ice1712_card_info snd_vt1720_mobo_cards[] __devinitdata = { | 92 | struct snd_ice1712_card_info snd_vt1720_mobo_cards[] __devinitdata = { |
@@ -113,11 +129,11 @@ struct snd_ice1712_card_info snd_vt1720_mobo_cards[] __devinitdata = { | |||
113 | { | 129 | { |
114 | .subvendor = VT1720_SUBDEVICE_SN25P, | 130 | .subvendor = VT1720_SUBDEVICE_SN25P, |
115 | .name = "Shuttle SN25P", | 131 | .name = "Shuttle SN25P", |
116 | /* identical with k8x800 */ | 132 | .model = "sn25p", |
117 | .chip_init = k8x800_init, | 133 | .chip_init = k8x800_init, |
118 | .build_controls = k8x800_add_controls, | 134 | .build_controls = k8x800_add_controls, |
119 | .eeprom_size = sizeof(k8x800_eeprom), | 135 | .eeprom_size = sizeof(k8x800_eeprom), |
120 | .eeprom_data = k8x800_eeprom, | 136 | .eeprom_data = sn25p_eeprom, |
121 | }, | 137 | }, |
122 | { } /* terminator */ | 138 | { } /* terminator */ |
123 | }; | 139 | }; |