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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull sound fixes from Takashi Iwai:
"A few small last-minute fixes for USB-audio and HD-audio as well as
for PCM core:

- A race fix for PCM core between stopping and closing a stream

- USB-audio regressions in the recent descriptor validation code and
relevant changes

- A read of uninitialized value in USB-audio spotted by fuzzer

- A fix for USB-audio race at stopping a stream

- Intel HD-audio platform fixes"

* tag 'sound-5.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: usb-audio: Fix incorrect size check for processing/extension units
ALSA: usb-audio: Fix incorrect NULL check in create_yamaha_midi_quirk()
ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()
ALSA: usb-audio: not submit urb for stopped endpoint
ALSA: hda: hdmi - fix pin setup on Tigerlake
ALSA: hda: Add Cometlake-S PCI ID
ALSA: usb-audio: Fix missing error check at mixer resolution test

+23 -9
+6 -2
sound/core/pcm_lib.c
··· 1782 1782 struct snd_pcm_runtime *runtime; 1783 1783 unsigned long flags; 1784 1784 1785 - if (PCM_RUNTIME_CHECK(substream)) 1785 + if (snd_BUG_ON(!substream)) 1786 1786 return; 1787 - runtime = substream->runtime; 1788 1787 1789 1788 snd_pcm_stream_lock_irqsave(substream, flags); 1789 + if (PCM_RUNTIME_CHECK(substream)) 1790 + goto _unlock; 1791 + runtime = substream->runtime; 1792 + 1790 1793 if (!snd_pcm_running(substream) || 1791 1794 snd_pcm_update_hw_ptr0(substream, 1) < 0) 1792 1795 goto _end; ··· 1800 1797 #endif 1801 1798 _end: 1802 1799 kill_fasync(&runtime->fasync, SIGIO, POLL_IN); 1800 + _unlock: 1803 1801 snd_pcm_stream_unlock_irqrestore(substream, flags); 1804 1802 } 1805 1803 EXPORT_SYMBOL(snd_pcm_period_elapsed);
+3
sound/pci/hda/hda_intel.c
··· 2396 2396 /* CometLake-H */ 2397 2397 { PCI_DEVICE(0x8086, 0x06C8), 2398 2398 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2399 + /* CometLake-S */ 2400 + { PCI_DEVICE(0x8086, 0xa3f0), 2401 + .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2399 2402 /* Icelake */ 2400 2403 { PCI_DEVICE(0x8086, 0x34c8), 2401 2404 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
+3 -1
sound/pci/hda/patch_hdmi.c
··· 46 46 ((codec)->core.vendor_id == 0x80862800)) 47 47 #define is_cannonlake(codec) ((codec)->core.vendor_id == 0x8086280c) 48 48 #define is_icelake(codec) ((codec)->core.vendor_id == 0x8086280f) 49 + #define is_tigerlake(codec) ((codec)->core.vendor_id == 0x80862812) 49 50 #define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec) \ 50 51 || is_skylake(codec) || is_broxton(codec) \ 51 52 || is_kabylake(codec) || is_geminilake(codec) \ 52 - || is_cannonlake(codec) || is_icelake(codec)) 53 + || is_cannonlake(codec) || is_icelake(codec) \ 54 + || is_tigerlake(codec)) 53 55 #define is_valleyview(codec) ((codec)->core.vendor_id == 0x80862882) 54 56 #define is_cherryview(codec) ((codec)->core.vendor_id == 0x80862883) 55 57 #define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec))
+3
sound/usb/endpoint.c
··· 388 388 } 389 389 390 390 prepare_outbound_urb(ep, ctx); 391 + /* can be stopped during prepare callback */ 392 + if (unlikely(!test_bit(EP_FLAG_RUNNING, &ep->flags))) 393 + goto exit_clear; 391 394 } else { 392 395 retire_inbound_urb(ep, ctx); 393 396 /* can be stopped during retire callback */
+3 -1
sound/usb/mixer.c
··· 1229 1229 if (cval->min + cval->res < cval->max) { 1230 1230 int last_valid_res = cval->res; 1231 1231 int saved, test, check; 1232 - get_cur_mix_raw(cval, minchn, &saved); 1232 + if (get_cur_mix_raw(cval, minchn, &saved) < 0) 1233 + goto no_res_check; 1233 1234 for (;;) { 1234 1235 test = saved; 1235 1236 if (test < cval->max) ··· 1250 1249 snd_usb_set_cur_mix_value(cval, minchn, 0, saved); 1251 1250 } 1252 1251 1252 + no_res_check: 1253 1253 cval->initialized = 1; 1254 1254 } 1255 1255
+2 -2
sound/usb/quirks.c
··· 248 248 NULL, USB_MS_MIDI_OUT_JACK); 249 249 if (!injd && !outjd) 250 250 return -ENODEV; 251 - if (!(injd && snd_usb_validate_midi_desc(injd)) || 252 - !(outjd && snd_usb_validate_midi_desc(outjd))) 251 + if ((injd && !snd_usb_validate_midi_desc(injd)) || 252 + (outjd && !snd_usb_validate_midi_desc(outjd))) 253 253 return -ENODEV; 254 254 if (injd && (injd->bLength < 5 || 255 255 (injd->bJackType != USB_MS_EMBEDDED &&
+3 -3
sound/usb/validate.c
··· 81 81 switch (v->protocol) { 82 82 case UAC_VERSION_1: 83 83 default: 84 - /* bNrChannels, wChannelConfig, iChannelNames, bControlSize */ 85 - len += 1 + 2 + 1 + 1; 86 - if (d->bLength < len) /* bControlSize */ 84 + /* bNrChannels, wChannelConfig, iChannelNames */ 85 + len += 1 + 2 + 1; 86 + if (d->bLength < len + 1) /* bControlSize */ 87 87 return false; 88 88 m = hdr[len]; 89 89 len += 1 + m + 1; /* bControlSize, bmControls, iProcessing */