Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b724a22 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: Fix yet another race in disconnection
  ALSA: asihpi - Update verbose debug print macros
  ALSA: asihpi - Improve non-busmaster adapter operation
  ALSA: asihpi - Support single-rate no-SRC cards
  ALSA: HDA: New AD1984A model for Dell Precision R5500
  ALSA: vmalloc buffers should use normal mmap
  ALSA: hda - Fix SPDIF out regression on ALC889
  ALSA: usb-audio - Support for Boss JS-8 Jam Station
  ALSA: usb-audio: add Cakewalk UM-1G support
  sound/oss/opl3: validate voice and channel indexes
  sound/oss: remove offset from load_patch callbacks
parents 551b0bda a45e3d6b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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 NULL

static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
{
+4 −0
Original line number Diff line number Diff line
@@ -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;
+0 −9
Original line number Diff line number Diff line
@@ -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
 */
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ struct synth_operations
	void (*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);
+13 −17
Original line number Diff line number Diff line
@@ -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,31 +491,27 @@ 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;

Loading