Ignore:
Timestamp:
May 16, 2020, 10:05:07 AM (5 years ago)
Author:
Paul Smedley
Message:

Commit 3..102 changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-linux-3.2.102/alsa-kernel/pci/cmipci.c

    r598 r612  
    1717 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    1818 */
    19 
     19 
    2020/* Does not work. Warning may block system in capture mode */
    2121/* #define USE_VAR48KRATE */
     22
     23#ifdef TARGET_OS2
     24#define KBUILD_MODNAME "cmipci"
     25#endif
    2226
    2327#include <asm/io.h>
     
    2832#include <linux/slab.h>
    2933#include <linux/gameport.h>
    30 #include <linux/moduleparam.h>
     34#include <linux/module.h>
    3135#include <linux/mutex.h>
    3236#include <sound/core.h>
     
    7983MODULE_PARM_DESC(fm_port, "FM port.");
    8084module_param_array(soft_ac3, bool, NULL, 0444);
    81 MODULE_PARM_DESC(soft_ac3, "Sofware-conversion of raw SPDIF packets (model 033 only).");
     85MODULE_PARM_DESC(soft_ac3, "Software-conversion of raw SPDIF packets (model 033 only).");
    8286#ifdef SUPPORT_JOYSTICK
    8387module_param_array(joystick_port, int, NULL, 0444);
     
    662666
    663667/*
    664  * Program pll register bits, I assume that the 8 registers 0xf8 upto 0xff
    665  * are mapped onto the 8 ADC/DAC sampling frequency which can be choosen
     668 * 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
    666670 * at the register CM_REG_FUNCTRL1 (0x04).
    667671 * Problem: other ways are also possible (any information about that?)
     
    672676        /*
    673677         * Guess that this programs at reg. 0x04 the pos 15:13/12:10
    674          * for DSFC/ASFC (000 upto 111).
     678         * for DSFC/ASFC (000 up to 111).
    675679         */
    676680
     
    957961                if (rem < rec->dma_size)
    958962                        goto ok;
    959         }
     963        } 
    960964        printk(KERN_ERR "cmipci: invalid PCM pointer: %#x\n", rem);
    961965        return SNDRV_PCM_POS_XRUN;
     
    13081312                    substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE &&
    13091313                    substream->runtime->channels == 2);
    1310         if (do_spdif && cm->can_ac3_hw)
     1314        if (do_spdif && cm->can_ac3_hw) 
    13111315                do_ac3 = cm->dig_pcm_status & IEC958_AES0_NONAUDIO;
    13121316        if ((err = setup_spdif_playback(cm, substream, do_spdif, do_ac3)) < 0)
     
    13211325        int err, do_ac3;
    13221326
    1323         if (cm->can_ac3_hw)
     1327        if (cm->can_ac3_hw) 
    13241328                do_ac3 = cm->dig_pcm_status & IEC958_AES0_NONAUDIO;
    13251329        else
     
    20442048        return 0;
    20452049}
    2046 
     2050 
    20472051static int snd_cmipci_get_volume(struct snd_kcontrol *kcontrol,
    20482052                                 struct snd_ctl_elem_value *ucontrol)
     
    21262130        return 0;
    21272131}
    2128 
     2132 
    21292133static int snd_cmipci_get_input_sw(struct snd_kcontrol *kcontrol,
    21302134                                   struct snd_ctl_elem_value *ucontrol)
     
    23942398        else
    23952399                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] ? 
    23972401                        args->mask_on : (args->mask & ~args->mask_on));
    23982402        if (change) {
     
    25902594        /* same bit as spdi_phase */
    25912595        spin_lock_irq(&cm->reg_lock);
    2592         ucontrol->value.enumerated.item[0] =
     2596        ucontrol->value.enumerated.item[0] = 
    25932597                (snd_cmipci_read_b(cm, CM_REG_MISC) & CM_SPDIF_INVERSE) ? 1 : 0;
    25942598        spin_unlock_irq(&cm->reg_lock);
     
    27842788
    27852789#ifdef CONFIG_PROC_FS
    2786 static void snd_cmipci_proc_read(struct snd_info_entry *entry,
     2790static void snd_cmipci_proc_read(struct snd_info_entry *entry, 
    27872791                                 struct snd_info_buffer *buffer)
    27882792{
     
    30703074
    30713075        if (request_irq(pci->irq, snd_cmipci_interrupt,
    3072                         IRQF_SHARED, card->driver, cm)) {
     3076                        IRQF_SHARED, KBUILD_MODNAME, cm)) {
    30733077                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
    30743078                snd_cmipci_free(cm);
     
    31333137        case PCI_DEVICE_ID_CMEDIA_CM8738:
    31343138        case PCI_DEVICE_ID_CMEDIA_CM8738B:
    3135                 if (!pci_dev_present(intel_82437vx))
     3139                if (!pci_dev_present(intel_82437vx)) 
    31363140                        snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_TXVX);
    31373141                break;
     
    32453249                                               iomidi,
    32463250                                               (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) {
    32493254                        printk(KERN_ERR "cmipci: no UART401 device at 0x%lx\n", iomidi);
    32503255                }
     
    34153420
    34163421static struct pci_driver driver = {
    3417         .name = "C-Media PCI",
     3422        .name = KBUILD_MODNAME,
    34183423        .id_table = snd_cmipci_ids,
    34193424        .probe = snd_cmipci_probe,
Note: See TracChangeset for help on using the changeset viewer.