- Timestamp:
- May 16, 2020, 10:05:07 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-linux-3.2.102/alsa-kernel/pci/cmipci.c
r598 r612 17 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 18 */ 19 19 20 20 /* Does not work. Warning may block system in capture mode */ 21 21 /* #define USE_VAR48KRATE */ 22 23 #ifdef TARGET_OS2 24 #define KBUILD_MODNAME "cmipci" 25 #endif 22 26 23 27 #include <asm/io.h> … … 28 32 #include <linux/slab.h> 29 33 #include <linux/gameport.h> 30 #include <linux/module param.h>34 #include <linux/module.h> 31 35 #include <linux/mutex.h> 32 36 #include <sound/core.h> … … 79 83 MODULE_PARM_DESC(fm_port, "FM port."); 80 84 module_param_array(soft_ac3, bool, NULL, 0444); 81 MODULE_PARM_DESC(soft_ac3, "Sof ware-conversion of raw SPDIF packets (model 033 only).");85 MODULE_PARM_DESC(soft_ac3, "Software-conversion of raw SPDIF packets (model 033 only)."); 82 86 #ifdef SUPPORT_JOYSTICK 83 87 module_param_array(joystick_port, int, NULL, 0444); … … 662 666 663 667 /* 664 * Program pll register bits, I assume that the 8 registers 0xf8 up to 0xff665 * are mapped onto the 8 ADC/DAC sampling frequency which can be cho osen668 * Program pll register bits, I assume that the 8 registers 0xf8 up to 0xff 669 * are mapped onto the 8 ADC/DAC sampling frequency which can be chosen 666 670 * at the register CM_REG_FUNCTRL1 (0x04). 667 671 * Problem: other ways are also possible (any information about that?) … … 672 676 /* 673 677 * Guess that this programs at reg. 0x04 the pos 15:13/12:10 674 * for DSFC/ASFC (000 up to 111).678 * for DSFC/ASFC (000 up to 111). 675 679 */ 676 680 … … 957 961 if (rem < rec->dma_size) 958 962 goto ok; 959 } 963 } 960 964 printk(KERN_ERR "cmipci: invalid PCM pointer: %#x\n", rem); 961 965 return SNDRV_PCM_POS_XRUN; … … 1308 1312 substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE && 1309 1313 substream->runtime->channels == 2); 1310 if (do_spdif && cm->can_ac3_hw) 1314 if (do_spdif && cm->can_ac3_hw) 1311 1315 do_ac3 = cm->dig_pcm_status & IEC958_AES0_NONAUDIO; 1312 1316 if ((err = setup_spdif_playback(cm, substream, do_spdif, do_ac3)) < 0) … … 1321 1325 int err, do_ac3; 1322 1326 1323 if (cm->can_ac3_hw) 1327 if (cm->can_ac3_hw) 1324 1328 do_ac3 = cm->dig_pcm_status & IEC958_AES0_NONAUDIO; 1325 1329 else … … 2044 2048 return 0; 2045 2049 } 2046 2050 2047 2051 static int snd_cmipci_get_volume(struct snd_kcontrol *kcontrol, 2048 2052 struct snd_ctl_elem_value *ucontrol) … … 2126 2130 return 0; 2127 2131 } 2128 2132 2129 2133 static int snd_cmipci_get_input_sw(struct snd_kcontrol *kcontrol, 2130 2134 struct snd_ctl_elem_value *ucontrol) … … 2394 2398 else 2395 2399 val = snd_cmipci_read(cm, args->reg); 2396 change = (val & args->mask) != (ucontrol->value.integer.value[0] ? 2400 change = (val & args->mask) != (ucontrol->value.integer.value[0] ? 2397 2401 args->mask_on : (args->mask & ~args->mask_on)); 2398 2402 if (change) { … … 2590 2594 /* same bit as spdi_phase */ 2591 2595 spin_lock_irq(&cm->reg_lock); 2592 ucontrol->value.enumerated.item[0] = 2596 ucontrol->value.enumerated.item[0] = 2593 2597 (snd_cmipci_read_b(cm, CM_REG_MISC) & CM_SPDIF_INVERSE) ? 1 : 0; 2594 2598 spin_unlock_irq(&cm->reg_lock); … … 2784 2788 2785 2789 #ifdef CONFIG_PROC_FS 2786 static void snd_cmipci_proc_read(struct snd_info_entry *entry, 2790 static void snd_cmipci_proc_read(struct snd_info_entry *entry, 2787 2791 struct snd_info_buffer *buffer) 2788 2792 { … … 3070 3074 3071 3075 if (request_irq(pci->irq, snd_cmipci_interrupt, 3072 IRQF_SHARED, card->driver, cm)) {3076 IRQF_SHARED, KBUILD_MODNAME, cm)) { 3073 3077 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 3074 3078 snd_cmipci_free(cm); … … 3133 3137 case PCI_DEVICE_ID_CMEDIA_CM8738: 3134 3138 case PCI_DEVICE_ID_CMEDIA_CM8738B: 3135 if (!pci_dev_present(intel_82437vx)) 3139 if (!pci_dev_present(intel_82437vx)) 3136 3140 snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_TXVX); 3137 3141 break; … … 3245 3249 iomidi, 3246 3250 (integrated_midi ? 3247 MPU401_INFO_INTEGRATED : 0), 3248 cm->irq, 0, &cm->rmidi)) < 0) { 3251 MPU401_INFO_INTEGRATED : 0) | 3252 MPU401_INFO_IRQ_HOOK, 3253 -1, &cm->rmidi)) < 0) { 3249 3254 printk(KERN_ERR "cmipci: no UART401 device at 0x%lx\n", iomidi); 3250 3255 } … … 3415 3420 3416 3421 static struct pci_driver driver = { 3417 .name = "C-Media PCI",3422 .name = KBUILD_MODNAME, 3418 3423 .id_table = snd_cmipci_ids, 3419 3424 .probe = snd_cmipci_probe,
Note:
See TracChangeset
for help on using the changeset viewer.