sound fixes
Linus,
please pull sound fixes for v2.6.39-rc1 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git for-linus
This contains the last-minute fixes picked up recently, including two OSS security fixes, a couple of long-standing regression fixes, asihpi minor updates, and a few quirks for USB-audio and HD-audio.
Thanks!
Takashi
===
Benjamin Herrenschmidt (1):
ALSA: vmalloc buffers should use normal mmap
Clemens Ladisch (1):
ALSA: usb-audio: add Cakewalk UM-1G support
Dan Rosenberg (2):
sound/oss: remove offset from load_patch callbacks sound/oss/opl3: validate voice and channel indexes
David Henningsson (1):
ALSA: HDA: New AD1984A model for Dell Precision R5500
Eliot Blennerhassett (3):
ALSA: asihpi - Support single-rate no-SRC cards
ALSA: asihpi - Improve non-busmaster adapter operation
ALSA: asihpi - Update verbose debug print macros
Keith A. Milner (1):
ALSA: usb-audio - Support for Boss JS-8 Jam Station
Takashi Iwai (2):
ALSA: hda - Fix SPDIF out regression on ALC889
ALSA: Fix yet another race in disconnection
--- include/sound/pcm.h | 4 +- sound/core/init.c | 4 + sound/core/pcm_native.c | 9 --- sound/oss/dev_table.h | 2 +- sound/oss/midi_synth.c | 30 ++++----- sound/oss/midi_synth.h | 2 +- sound/oss/opl3.c | 23 +++++--- sound/oss/sequencer.c | 2 +- sound/pci/asihpi/asihpi.c | 137 +++++++++++++++++++---------------------- sound/pci/hda/patch_analog.c | 89 ++++++++++++++++++++++++++ sound/pci/hda/patch_realtek.c | 2 +- sound/usb/quirks-table.h | 40 ++++++++++++ 12 files changed, 230 insertions(+), 114 deletions(-)
include/sound/pcm.h +1 -3
@@ -1031,9 +1031,7 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s#define snd_pcm_lib_mmap_iomem NULL#endif -int snd_pcm_lib_mmap_noncached (struct snd_pcm_substream *substream, -struct vm_area_struct *area); -#define snd_pcm_lib_mmap_vmalloc snd_pcm_lib_mmap_noncached +#define snd_pcm_lib_mmap_vmalloc NULLstatic inline void snd_pcm_limit_isa_dma_size (int dma,size_t *max) {
sound/core/init.c +4 -0
@@ -848,6 +848,7 @@ int snd_card_file_add(struct snd_card *card, struct file *file)return -ENOMEM ; mfile->file = file; mfile->disconnected_f_op =NULL ; +INIT_LIST_HEAD (&mfile->shutdown_list);spin_lock (&card->files_lock);if (card->shutdown) {spin_unlock (&card->files_lock);
@@ -883,6 +884,9 @@ int snd_card_file_remove(struct snd_card *card, struct file *file)list_for_each_entry (mfile, &card->files_list, list) {if (mfile->file == file) {list_del (&mfile->list); +spin_lock (&shutdown_lock); +list_del (&mfile->shutdown_list); +spin_unlock (&shutdown_lock);if (mfile->disconnected_f_op)fops_put (mfile->disconnected_f_op); found = mfile;
sound/core/pcm_native.c +0 -9
@@ -3201,15 +3201,6 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream,EXPORT_SYMBOL (snd_pcm_lib_mmap_iomem);#endif /* SNDRV_PCM_INFO_MMAP */ -/* mmap callback with pgprot_noncached */ -int snd_pcm_lib_mmap_noncached (struct snd_pcm_substream *substream, -struct vm_area_struct *area) -{ - area->vm_page_prot =pgprot_noncached (area->vm_page_prot); -return snd_pcm_default_mmap (substream, area); -} -EXPORT_SYMBOL (snd_pcm_lib_mmap_noncached); -/* * mmap DMA buffer */
sound/oss/dev_table.h +1 -1
@@ -271,7 +271,7 @@ struct synth_operationsvoid (*reset) (int dev);void (*hw_control) (int dev,unsigned char *event);int (*load_patch) (int dev,int format,const char __user *addr, -int offs,int count,int pmgr_flag); +int count,int pmgr_flag);void (*aftertouch) (int dev,int voice,int pressure);void (*controller) (int dev,int voice,int ctrl_num,int value);void (*panning) (int dev,int voice,int value);
sound/oss/midi_synth.c +13 -17
@@ -476,7 +476,7 @@ EXPORT_SYMBOL(midi_synth_hw_control);int midi_synth_load_patch (int dev,int format,const char __user *addr, -int offs,int count,int pmgr_flag) +int count,int pmgr_flag) {int orig_dev = synth_devs[dev]->midi_dev;
@@ -491,33 +491,29 @@ midi_synth_load_patch(int dev, int format, const char __user *addr,if (!prefix_cmd (orig_dev,0xf0 ))return 0 ; +/* Invalid patch format */ if (format !=SYSEX_PATCH ) - { -/* printk("MIDI Error: Invalid patch format (key) 0x%x\n", format);*/ return -EINVAL ; - } + +/* Patch header too short */ if (count < hdr_size) - { -/* printk("MIDI Error: Patch header too short\n");*/ return -EINVAL ; - } + count -= hdr_size;/* -* Copy the header from user space but ignore the first bytes which have -* been transferred already. +* Copy the header from user space */ -if (copy_from_user (&((char *) &sysex)[offs], &(addr)[offs], hdr_size - offs)) +if (copy_from_user (&sysex, addr, hdr_size))return -EFAULT ; - -if (count < sysex.len) - { -/* printk(KERN_WARNING "MIDI Warning: Sysex record too short (%d<%d)\n", count, (int) sysex.len);*/ + +/* Sysex record too short */ +if ((unsigned )count < (unsigned )sysex.len) sysex.len = count; - } - left = sysex.len; - src_offs =0 ; + + left = sysex.len; + src_offs =0 ;for (i =0 ; i < left && !signal_pending (current); i++) {
sound/oss/midi_synth.h +1 -1
@@ -8,7 +8,7 @@ int midi_synth_open (int dev, int mode);void midi_synth_close (int dev);void midi_synth_hw_control (int dev,unsigned char *event);int midi_synth_load_patch (int dev,int format,const char __user * addr, -int offs,int count,int pmgr_flag); +int count,int pmgr_flag);void midi_synth_panning (int dev,int channel,int pressure);void midi_synth_aftertouch (int dev,int channel,int pressure);void midi_synth_controller (int dev,int channel,int ctrl_num,int value);
sound/oss/opl3.c +15 -8
@@ -820,7 +820,7 @@ static void opl3_hw_control(int dev, unsigned char *event) }static int opl3_load_patch (int dev,int format,const char __user *addr, -int offs,int count,int pmgr_flag) +int count,int pmgr_flag) {struct sbi_instrument ins;
@@ -830,11 +830,7 @@ static int opl3_load_patch(int dev, int format, const char __user *addr,return -EINVAL ; } -/* -* What the fuck is going on here? We leave junk in the beginning -* of ins and then check the field pretty close to that beginning? -*/ -if (copy_from_user (&((char *) &ins)[offs], addr + offs,sizeof (ins) - offs)) +if (copy_from_user (&ins, addr,sizeof (ins)))return -EFAULT ;if (ins.channel <0 || ins.channel >=SBFM_MAXINSTR )
@@ -849,6 +845,10 @@ static int opl3_load_patch(int dev, int format, const char __user *addr,static void opl3_panning (int dev,int voice,int value) { + +if (voice <0 || voice >= devc->nr_voice) +return ; + devc->voc[voice].panning = value; }
@@ -1066,8 +1066,15 @@ static int opl3_alloc_voice(int dev, int chn, int note, struct voice_alloc_infostatic void opl3_setup_voice (int dev,int voice,int chn) { -struct channel_info *info = - &synth_devs[dev]->chn_info[chn]; +struct channel_info *info; + +if (voice <0 || voice >= devc->nr_voice) +return ; + +if (chn <0 || chn >15 ) +return ; + + info = &synth_devs[dev]->chn_info[chn];opl3_set_instr (dev, voice, info->pgm_num);
sound/oss/sequencer.c +1 -1
@@ -241,7 +241,7 @@ int sequencer_write(int dev, struct file *file, const char __user *buf, int counreturn -ENXIO ; fmt = (*(short *) &event_rec[0 ]) &0xffff ; - err = synth_devs[dev]->load_patch (dev, fmt, buf, p +4 , c,0 ); + err = synth_devs[dev]->load_patch (dev, fmt, buf + p, c,0 );if (err <0 )return err;
sound/pci/asihpi/asihpi.c +64 -73
388 lines not on this page · raw message
sound/pci/hda/patch_analog.c +89 -0
116 lines not on this page · raw message
sound/pci/hda/patch_realtek.c +1 -1
@@ -1290,7 +1290,7 @@ static void alc_auto_init_amp(struct hda_codec *codec, int type)case 0x10ec0883 :case 0x10ec0885 :case 0x10ec0887 : -case 0x10ec0889 : +/*case 0x10ec0889:*/ /* this causes an SPDIF problem */ alc889_coef_init (codec);break ;case 0x10ec0888 :
sound/usb/quirks-table.h +40 -0
@@ -1568,6 +1568,46 @@ YAMAHA_DEVICE(0x7010, "UB99"), } }, { + USB_DEVICE_VENDOR_SPEC(0x0582, 0x0104), + .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) { +/* .vendor_name = "Roland", */ +/* .product_name = "UM-1G", */ + .ifnum =0 , + .type =QUIRK_MIDI_FIXED_ENDPOINT , + .data = & (const struct snd_usb_midi_endpoint_info ) { + .out_cables =0x0001 , + .in_cables =0x0001 + } + } +}, +{ + /* Boss JS-8 Jam Station */ + USB_DEVICE(0x0582, 0x0109), + .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) { +/* .vendor_name = "BOSS", */ +/* .product_name = "JS-8", */ + .ifnum =QUIRK_ANY_INTERFACE , + .type =QUIRK_COMPOSITE , + .data = (const struct snd_usb_audio_quirk []) { + { + .ifnum =0 , + .type =QUIRK_AUDIO_STANDARD_INTERFACE + }, + { + .ifnum =1 , + .type =QUIRK_AUDIO_STANDARD_INTERFACE + }, + { + .ifnum =2 , + .type =QUIRK_MIDI_STANDARD_INTERFACE + }, + { + .ifnum =-1 + } + } + } +}, +{ /* has ID 0x0110 when not in Advanced Driver mode */ USB_DEVICE_VENDOR_SPEC(0x0582, 0x010f), .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) {