mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 12:24:37 -04:00
Merge tag 'sound-6.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
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
This commit is contained in:
@@ -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)))
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1275,10 +1275,16 @@ static int snd_seq_ioctl_set_client_info(struct snd_seq_client *client,
|
||||
if (client->type != client_info->type)
|
||||
return -EINVAL;
|
||||
|
||||
/* 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)
|
||||
return -EINVAL;
|
||||
if (client->user_pversion >= SNDRV_PROTOCOL_VERSION(1, 0, 3)) {
|
||||
/* check validity of midi_version field */
|
||||
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])
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -142,6 +142,9 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
|
||||
}
|
||||
sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
|
||||
if (IS_ERR(sub)) {
|
||||
/* No subsys id in older tas2563 projects. */
|
||||
if (!strncmp(hid, "INT8866", sizeof("INT8866")))
|
||||
goto end_2563;
|
||||
dev_err(p->dev, "Failed to get SUBSYS ID.\n");
|
||||
ret = PTR_ERR(sub);
|
||||
goto err;
|
||||
@@ -164,6 +167,7 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
|
||||
p->speaker_id = NULL;
|
||||
}
|
||||
|
||||
end_2563:
|
||||
acpi_dev_free_resource_list(&resources);
|
||||
strscpy(p->dev_name, hid, sizeof(p->dev_name));
|
||||
put_device(physdev);
|
||||
|
||||
@@ -687,7 +687,7 @@ static int snd_us16x08_meter_get(struct snd_kcontrol *kcontrol,
|
||||
struct usb_mixer_elem_info *elem = kcontrol->private_data;
|
||||
struct snd_usb_audio *chip = elem->head.mixer->chip;
|
||||
struct snd_us16x08_meter_store *store = elem->private_data;
|
||||
u8 meter_urb[64];
|
||||
u8 meter_urb[64] = {0};
|
||||
|
||||
switch (kcontrol->private_value) {
|
||||
case 0: {
|
||||
|
||||
Reference in New Issue
Block a user