Commit 4f5d3da6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound fixes from Takashi Iwai:
 "The first new year pull request: no surprises, all small fixes,
  including:

   - Follow-up fixes for the new compress-offload API extension

   - A couple of fixes for MIDI 2.0 UMP handling

   - A trivial race fix for OSS sequencer emulation ioctls

   - USB-audio and HD-audio fixes / quirks"

* tag 'sound-6.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: seq: Check UMP support for midi_version change
  ALSA hda/realtek: Add quirk for Framework F111:000C
  Revert "ALSA: ump: Don't enumeration invalid groups for legacy rawmidi"
  ALSA: seq: oss: Fix races at processing SysEx messages
  ALSA: compress_offload: fix remaining descriptor races in sound/core/compress_offload.c
  ALSA: compress_offload: Drop unneeded no_free_ptr()
  ALSA: hda/tas2781: Ignore SUBSYS_ID not found for tas2563 projects
  ALSA: usb-audio: US16x08: Initialize array before use
parents 92c3bb3d 87654292
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1053,13 +1053,13 @@ static int snd_compr_task_new(struct snd_compr_stream *stream, struct snd_compr_
		put_unused_fd(fd_i);
		goto cleanup;
	}
	/* keep dmabuf reference until freed with task free ioctl */
	get_dma_buf(task->input);
	get_dma_buf(task->output);
	fd_install(fd_i, task->input->file);
	fd_install(fd_o, task->output->file);
	utask->input_fd = fd_i;
	utask->output_fd = fd_o;
	/* keep dmabuf reference until freed with task free ioctl */
	dma_buf_get(utask->input_fd);
	dma_buf_get(utask->output_fd);
	list_add_tail(&task->list, &stream->runtime->tasks);
	stream->runtime->total_tasks++;
	return 0;
@@ -1077,7 +1077,7 @@ static int snd_compr_task_create(struct snd_compr_stream *stream, unsigned long
		return -EPERM;
	task = memdup_user((void __user *)arg, sizeof(*task));
	if (IS_ERR(task))
		return PTR_ERR(no_free_ptr(task));
		return PTR_ERR(task);
	retval = snd_compr_task_new(stream, task);
	if (retval >= 0)
		if (copy_to_user((void __user *)arg, task, sizeof(*task)))
@@ -1138,7 +1138,7 @@ static int snd_compr_task_start_ioctl(struct snd_compr_stream *stream, unsigned
		return -EPERM;
	task = memdup_user((void __user *)arg, sizeof(*task));
	if (IS_ERR(task))
		return PTR_ERR(no_free_ptr(task));
		return PTR_ERR(task);
	retval = snd_compr_task_start(stream, task);
	if (retval >= 0)
		if (copy_to_user((void __user *)arg, task, sizeof(*task)))
@@ -1229,7 +1229,7 @@ static int snd_compr_task_status_ioctl(struct snd_compr_stream *stream, unsigned
		return -EPERM;
	status = memdup_user((void __user *)arg, sizeof(*status));
	if (IS_ERR(status))
		return PTR_ERR(no_free_ptr(status));
		return PTR_ERR(status);
	retval = snd_compr_task_status(stream, status);
	if (retval >= 0)
		if (copy_to_user((void __user *)arg, status, sizeof(*status)))
+2 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ static struct seq_oss_synth midi_synth_dev = {
};

static DEFINE_SPINLOCK(register_lock);
static DEFINE_MUTEX(sysex_mutex);

/*
 * prototypes
@@ -497,6 +498,7 @@ snd_seq_oss_synth_sysex(struct seq_oss_devinfo *dp, int dev, unsigned char *buf,
	if (!info)
		return -ENXIO;

	guard(mutex)(&sysex_mutex);
	sysex = info->sysex;
	if (sysex == NULL) {
		sysex = kzalloc(sizeof(*sysex), GFP_KERNEL);
+10 −4
Original line number Diff line number Diff line
@@ -1275,11 +1275,17 @@ static int snd_seq_ioctl_set_client_info(struct snd_seq_client *client,
	if (client->type != client_info->type)
		return -EINVAL;

	if (client->user_pversion >= SNDRV_PROTOCOL_VERSION(1, 0, 3)) {
		/* check validity of midi_version field */
	if (client->user_pversion >= SNDRV_PROTOCOL_VERSION(1, 0, 3) &&
	    client_info->midi_version > SNDRV_SEQ_CLIENT_UMP_MIDI_2_0)
		if (client_info->midi_version > SNDRV_SEQ_CLIENT_UMP_MIDI_2_0)
			return -EINVAL;

		/* check if UMP is supported in kernel */
		if (!IS_ENABLED(CONFIG_SND_SEQ_UMP) &&
		    client_info->midi_version > 0)
			return -EINVAL;
	}

	/* fill the info fields */
	if (client_info->name[0])
		strscpy(client->name, client_info->name, sizeof(client->name));
+1 −1
Original line number Diff line number Diff line
@@ -1244,7 +1244,7 @@ static int fill_legacy_mapping(struct snd_ump_endpoint *ump)

	num = 0;
	for (i = 0; i < SNDRV_UMP_MAX_GROUPS; i++)
		if ((group_maps & (1U << i)) && ump->groups[i].valid)
		if (group_maps & (1U << i))
			ump->legacy_mapping[num++] = i;

	return num;
+1 −0
Original line number Diff line number Diff line
@@ -11009,6 +11009,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
	SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
	SND_PCI_QUIRK(0xf111, 0x0006, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
	SND_PCI_QUIRK(0xf111, 0x0009, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
	SND_PCI_QUIRK(0xf111, 0x000c, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),

#if 0
	/* Below is a quirk table taken from the old code.
Loading