Changeset 426 for GPL/trunk/alsa-kernel/pci/emu10k1/emufx.c
- Timestamp:
- May 9, 2009, 11:45:26 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/alsa-kernel/pci/emu10k1/emufx.c
r399 r426 1520 1520 if (emu->card_capabilities->emu_model) { 1521 1521 /* 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"); 1523 1523 for (z = 0; z < 8; z++) { 1524 1524 if (emu->card_capabilities->ca0108_chip) { … … 1568 1568 if (emu->card_capabilities->emu_model) { 1569 1569 if (emu->card_capabilities->ca0108_chip) { 1570 snd_printk( "EMU2 inputs on\n");1570 snd_printk(KERN_INFO "EMU2 inputs on\n"); 1571 1571 for (z = 0; z < 0x10; z++) { 1572 1572 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, … … 1576 1576 } 1577 1577 } else { 1578 snd_printk( "EMU inputs on\n");1578 snd_printk(KERN_INFO "EMU inputs on\n"); 1579 1579 /* Capture 16 (originally 8) channels of S32_LE sound */ 1580 1580 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 */ 1582 1585 /* For the EMU1010: How to get 32bit values from the DSP. High 16bits into L, low 16bits into R. */ 1583 1586 /* A_P16VIN(0) is delayed by one sample, … … 2491 2494 if (!capable(CAP_SYS_ADMIN)) 2492 2495 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); 2500 2500 res = snd_emu10k1_icode_poke(emu, icode); 2501 2501 kfree(icode); 2502 2502 return res; 2503 2503 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); 2511 2507 res = snd_emu10k1_icode_peek(emu, icode); 2512 2508 if (res == 0 && copy_to_user(argp, icode, sizeof(*icode))) { … … 2517 2513 return res; 2518 2514 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); 2526 2518 res = snd_emu10k1_ipcm_poke(emu, ipcm); 2527 2519 kfree(ipcm); 2528 2520 return res; 2529 2521 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); 2537 2525 res = snd_emu10k1_ipcm_peek(emu, ipcm); 2538 2526 if (res == 0 && copy_to_user(argp, ipcm, sizeof(*ipcm))) {
Note:
See TracChangeset
for help on using the changeset viewer.