Ignore:
Timestamp:
May 9, 2009, 11:45:26 AM (16 years ago)
Author:
Paul Smedley
Message:

Update alsa-kernel to ALSA 1.0.20 level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/alsa-kernel/pci/emu10k1/emufx.c

    r399 r426  
    15201520        if (emu->card_capabilities->emu_model) {
    15211521                /* EMU1010 Outputs from PCM Front, Rear, Center, LFE, Side */
    1522                 snd_printk("EMU outputs on\n");
     1522                snd_printk(KERN_INFO "EMU outputs on\n");
    15231523                for (z = 0; z < 8; z++) {
    15241524                        if (emu->card_capabilities->ca0108_chip) {
     
    15681568        if (emu->card_capabilities->emu_model) {
    15691569                if (emu->card_capabilities->ca0108_chip) {
    1570                         snd_printk("EMU2 inputs on\n");
     1570                        snd_printk(KERN_INFO "EMU2 inputs on\n");
    15711571                        for (z = 0; z < 0x10; z++) {
    15721572                                snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp,
     
    15761576                        }
    15771577                } else {
    1578                         snd_printk("EMU inputs on\n");
     1578                        snd_printk(KERN_INFO "EMU inputs on\n");
    15791579                        /* Capture 16 (originally 8) channels of S32_LE sound */
    15801580
    1581                         /* printk("emufx.c: gpr=0x%x, tmp=0x%x\n",gpr, tmp); */
     1581                        /*
     1582                        printk(KERN_DEBUG "emufx.c: gpr=0x%x, tmp=0x%x\n",
     1583                               gpr, tmp);
     1584                        */
    15821585                        /* For the EMU1010: How to get 32bit values from the DSP. High 16bits into L, low 16bits into R. */
    15831586                        /* A_P16VIN(0) is delayed by one sample,
     
    24912494                if (!capable(CAP_SYS_ADMIN))
    24922495                        return -EPERM;
    2493                 icode = kmalloc(sizeof(*icode), GFP_KERNEL);
    2494                 if (icode == NULL)
    2495                         return -ENOMEM;
    2496                 if (copy_from_user(icode, argp, sizeof(*icode))) {
    2497                         kfree(icode);
    2498                         return -EFAULT;
    2499                 }
     2496
     2497                icode = memdup_user(argp, sizeof(*icode));
     2498                if (IS_ERR(icode))
     2499                        return PTR_ERR(icode);
    25002500                res = snd_emu10k1_icode_poke(emu, icode);
    25012501                kfree(icode);
    25022502                return res;
    25032503        case SNDRV_EMU10K1_IOCTL_CODE_PEEK:
    2504                 icode = kmalloc(sizeof(*icode), GFP_KERNEL);
    2505                 if (icode == NULL)
    2506                         return -ENOMEM;
    2507                 if (copy_from_user(icode, argp, sizeof(*icode))) {
    2508                         kfree(icode);
    2509                         return -EFAULT;
    2510                 }
     2504                icode = memdup_user(argp, sizeof(*icode));
     2505                if (IS_ERR(icode))
     2506                        return PTR_ERR(icode);
    25112507                res = snd_emu10k1_icode_peek(emu, icode);
    25122508                if (res == 0 && copy_to_user(argp, icode, sizeof(*icode))) {
     
    25172513                return res;
    25182514        case SNDRV_EMU10K1_IOCTL_PCM_POKE:
    2519                 ipcm = kmalloc(sizeof(*ipcm), GFP_KERNEL);
    2520                 if (ipcm == NULL)
    2521                         return -ENOMEM;
    2522                 if (copy_from_user(ipcm, argp, sizeof(*ipcm))) {
    2523                         kfree(ipcm);
    2524                         return -EFAULT;
    2525                 }
     2515                ipcm = memdup_user(argp, sizeof(*ipcm));
     2516                if (IS_ERR(ipcm))
     2517                        return PTR_ERR(ipcm);
    25262518                res = snd_emu10k1_ipcm_poke(emu, ipcm);
    25272519                kfree(ipcm);
    25282520                return res;
    25292521        case SNDRV_EMU10K1_IOCTL_PCM_PEEK:
    2530                 ipcm = kzalloc(sizeof(*ipcm), GFP_KERNEL);
    2531                 if (ipcm == NULL)
    2532                         return -ENOMEM;
    2533                 if (copy_from_user(ipcm, argp, sizeof(*ipcm))) {
    2534                         kfree(ipcm);
    2535                         return -EFAULT;
    2536                 }
     2522                ipcm = memdup_user(argp, sizeof(*ipcm));
     2523                if (IS_ERR(ipcm))
     2524                        return PTR_ERR(ipcm);
    25372525                res = snd_emu10k1_ipcm_peek(emu, ipcm);
    25382526                if (res == 0 && copy_to_user(argp, ipcm, sizeof(*ipcm))) {
Note: See TracChangeset for help on using the changeset viewer.