Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'sound-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Here are a collection of small fixes for:

- A race with ASoC HD-audio registration

- LINE6 usb-audio memory overwrite by malformed descriptor

- FireWire MIDI handling

- Missing cast for bit shifts in a few USB-audio quirks

- The wrong function calls in minor OSS sequencer code paths

- A couple of HD-audio quirks"

* tag 'sound-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: line6: Fix write on zero-sized buffer
ALSA: hda: Fix widget_mutex incomplete protection
ALSA: firewire-lib/fireworks: fix miss detection of received MIDI messages
ALSA: seq: fix incorrect order of dest_client/dest_ports arguments
ALSA: hda/realtek - Change front mic location for Lenovo M710q
ALSA: usb-audio: fix sign unintended sign extension on left shifts
ALSA: hda/realtek: Add quirks for several Clevo notebook barebones

+27 -14
+1 -1
sound/core/seq/oss/seq_oss_ioctl.c
··· 49 49 if (copy_from_user(ev, arg, 8)) 50 50 return -EFAULT; 51 51 memset(&tmpev, 0, sizeof(tmpev)); 52 - snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client); 52 + snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.client, dp->addr.port); 53 53 tmpev.time.tick = 0; 54 54 if (! snd_seq_oss_process_event(dp, (union evrec *)ev, &tmpev)) { 55 55 snd_seq_oss_dispatch(dp, &tmpev, 0, 0);
+1 -1
sound/core/seq/oss/seq_oss_rw.c
··· 161 161 memset(&event, 0, sizeof(event)); 162 162 /* set dummy -- to be sure */ 163 163 event.type = SNDRV_SEQ_EVENT_NOTEOFF; 164 - snd_seq_oss_fill_addr(dp, &event, dp->addr.port, dp->addr.client); 164 + snd_seq_oss_fill_addr(dp, &event, dp->addr.client, dp->addr.port); 165 165 166 166 if (snd_seq_oss_process_event(dp, rec, &event)) 167 167 return 0; /* invalid event - no need to insert queue */
+1 -1
sound/firewire/amdtp-am824.c
··· 320 320 u8 *b; 321 321 322 322 for (f = 0; f < frames; f++) { 323 - port = (s->data_block_counter + f) % 8; 323 + port = (8 - s->tx_first_dbc + s->data_block_counter + f) % 8; 324 324 b = (u8 *)&buffer[p->midi_position]; 325 325 326 326 len = b[0] - 0x80;
+12 -6
sound/hda/hdac_device.c
··· 400 400 int snd_hdac_refresh_widgets(struct hdac_device *codec, bool sysfs) 401 401 { 402 402 hda_nid_t start_nid; 403 - int nums, err; 403 + int nums, err = 0; 404 404 405 + /* 406 + * Serialize against multiple threads trying to update the sysfs 407 + * widgets array. 408 + */ 409 + mutex_lock(&codec->widget_lock); 405 410 nums = snd_hdac_get_sub_nodes(codec, codec->afg, &start_nid); 406 411 if (!start_nid || nums <= 0 || nums >= 0xff) { 407 412 dev_err(&codec->dev, "cannot read sub nodes for FG 0x%02x\n", 408 413 codec->afg); 409 - return -EINVAL; 414 + err = -EINVAL; 415 + goto unlock; 410 416 } 411 417 412 418 if (sysfs) { 413 - mutex_lock(&codec->widget_lock); 414 419 err = hda_widget_sysfs_reinit(codec, start_nid, nums); 415 - mutex_unlock(&codec->widget_lock); 416 420 if (err < 0) 417 - return err; 421 + goto unlock; 418 422 } 419 423 420 424 codec->num_nodes = nums; 421 425 codec->start_nid = start_nid; 422 426 codec->end_nid = start_nid + nums; 423 - return 0; 427 + unlock: 428 + mutex_unlock(&codec->widget_lock); 429 + return err; 424 430 } 425 431 EXPORT_SYMBOL_GPL(snd_hdac_refresh_widgets); 426 432
+5 -3
sound/pci/hda/patch_realtek.c
··· 2448 2448 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950), 2449 2449 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950), 2450 2450 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950), 2451 - SND_PCI_QUIRK(0x1558, 0x96e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2452 - SND_PCI_QUIRK(0x1558, 0x97e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2453 - SND_PCI_QUIRK(0x1558, 0x65d1, "Tuxedo Book XC1509", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2451 + SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950), 2452 + SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950), 2453 + SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2454 + SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2454 2455 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), 2455 2456 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), 2456 2457 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530), ··· 7075 7074 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 7076 7075 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 7077 7076 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 7077 + SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 7078 7078 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 7079 7079 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 7080 7080 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
+5
sound/usb/line6/pcm.c
··· 556 556 line6pcm->max_packet_size_out = 557 557 usb_maxpacket(line6->usbdev, 558 558 usb_sndisocpipe(line6->usbdev, ep_write), 1); 559 + if (!line6pcm->max_packet_size_in || !line6pcm->max_packet_size_out) { 560 + dev_err(line6pcm->line6->ifcdev, 561 + "cannot get proper max packet size\n"); 562 + return -EINVAL; 563 + } 559 564 560 565 spin_lock_init(&line6pcm->out.lock); 561 566 spin_lock_init(&line6pcm->in.lock);
+2 -2
sound/usb/mixer_quirks.c
··· 741 741 return err; 742 742 } 743 743 744 - kctl->private_value |= (value << 24); 744 + kctl->private_value |= ((unsigned int)value << 24); 745 745 return 0; 746 746 } 747 747 ··· 902 902 if (err < 0) 903 903 return err; 904 904 905 - kctl->private_value |= value[0] << 24; 905 + kctl->private_value |= (unsigned int)value[0] << 24; 906 906 return 0; 907 907 } 908 908