sound fixes for 5.4-rc8
Linus,
please pull sound fixes for v5.4-rc8 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-5.4-rc8
The topmost commit is 976a68f06b2ea49e2ab67a5f84919a8b105db8be
----------------------------------------------------------------
sound fixes for 5.4-rc8 or final
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
----------------------------------------------------------------
Chiou, Cooper (1):
ALSA: hda: Add Cometlake-S PCI ID
Henry Lin (1):
ALSA: usb-audio: not submit urb for stopped endpoint
Kai Vehmanen (1):
ALSA: hda: hdmi - fix pin setup on Tigerlake
Takashi Iwai (3):
ALSA: usb-audio: Fix missing error check at mixer resolution test
ALSA: usb-audio: Fix incorrect NULL check in create_yamaha_midi_quirk()
ALSA: usb-audio: Fix incorrect size check for processing/extension units
paulhsia (1):
ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()
--- sound/core/pcm_lib.c | 8 ++++++-- sound/pci/hda/hda_intel.c | 3 +++ sound/pci/hda/patch_hdmi.c | 4 +++- sound/usb/endpoint.c | 3 +++ sound/usb/mixer.c | 4 +++- sound/usb/quirks.c | 4 ++-- sound/usb/validate.c | 6 +++--- 7 files changed, 23 insertions(+), 9 deletions(-)
sound/core/pcm_lib.c +6 -2
@@ -1782,11 +1782,14 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)struct snd_pcm_runtime *runtime;unsigned long flags; -if (PCM_RUNTIME_CHECK (substream)) +if (snd_BUG_ON (!substream))return ; - runtime = substream->runtime;snd_pcm_stream_lock_irqsave (substream, flags); +if (PCM_RUNTIME_CHECK (substream)) + goto _unlock; + runtime = substream->runtime; +if (!snd_pcm_running (substream) ||snd_pcm_update_hw_ptr0 (substream,1 ) <0 ) goto _end;
@@ -1797,6 +1800,7 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)#endif _end:kill_fasync (&runtime->fasync,SIGIO ,POLL_IN ); + _unlock:snd_pcm_stream_unlock_irqrestore (substream, flags); }EXPORT_SYMBOL (snd_pcm_period_elapsed);
sound/pci/hda/hda_intel.c +3 -0
@@ -2396,6 +2396,9 @@ static const struct pci_device_id azx_ids[] = {/* CometLake-H */ { PCI_DEVICE(0x8086, 0x06C8), .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, + /* CometLake-S */ + { PCI_DEVICE(0x8086, 0xa3f0), + .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, /* Icelake */ { PCI_DEVICE(0x8086, 0x34c8), .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
sound/pci/hda/patch_hdmi.c +3 -1
@@ -46,10 +46,12 @@ MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info"); ((codec)->core.vendor_id == 0x80862800))#define is_cannonlake (codec) ((codec)->core.vendor_id == 0x8086280c)#define is_icelake (codec) ((codec)->core.vendor_id == 0x8086280f) +#define is_tigerlake (codec) ((codec)->core.vendor_id == 0x80862812)#define is_haswell_plus (codec) (is_haswell(codec) || is_broadwell(codec) \ || is_skylake(codec) || is_broxton(codec) \ || is_kabylake(codec) || is_geminilake(codec) \ - || is_cannonlake(codec) || is_icelake(codec)) + || is_cannonlake(codec) || is_icelake(codec) \ + || is_tigerlake(codec))#define is_valleyview (codec) ((codec)->core.vendor_id == 0x80862882)#define is_cherryview (codec) ((codec)->core.vendor_id == 0x80862883)#define is_valleyview_plus (codec) (is_valleyview(codec) || is_cherryview(codec))
sound/usb/endpoint.c +3 -0
@@ -388,6 +388,9 @@ static void snd_complete_urb(struct urb *urb) }prepare_outbound_urb (ep, ctx); +/* can be stopped during prepare callback */ +if (unlikely (!test_bit (EP_FLAG_RUNNING , &ep->flags))) + goto exit_clear; }else {retire_inbound_urb (ep, ctx);/* can be stopped during retire callback */
sound/usb/mixer.c +3 -1
@@ -1229,7 +1229,8 @@ static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,if (cval->min + cval->res < cval->max) {int last_valid_res = cval->res;int saved, test, check; -get_cur_mix_raw (cval, minchn, &saved); +if (get_cur_mix_raw (cval, minchn, &saved) <0 ) + goto no_res_check;for (;;) { test = saved;if (test < cval->max)
@@ -1249,6 +1250,7 @@ static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,snd_usb_set_cur_mix_value (cval, minchn,0 , saved); } +no_res_check: cval->initialized =1 ; }
sound/usb/quirks.c +2 -2
@@ -248,8 +248,8 @@ static int create_yamaha_midi_quirk(struct snd_usb_audio *chip, NULL, USB_MS_MIDI_OUT_JACK);if (!injd && !outjd)return -ENODEV ; -if (!(injd &&snd_usb_validate_midi_desc (injd)) || - !(outjd &&snd_usb_validate_midi_desc (outjd))) +if ((injd && !snd_usb_validate_midi_desc (injd)) || + (outjd && !snd_usb_validate_midi_desc (outjd)))return -ENODEV ; if (injd && (injd->bLength < 5 || (injd->bJackType != USB_MS_EMBEDDED &&
sound/usb/validate.c +3 -3
@@ -81,9 +81,9 @@ static bool validate_processing_unit(const void *p,switch (v->protocol) {case UAC_VERSION_1 :default : -/* bNrChannels, wChannelConfig, iChannelNames, bControlSize */ - len +=1 +2 +1 +1 ; -if (d->bLength < len)/* bControlSize */ +/* bNrChannels, wChannelConfig, iChannelNames */ + len +=1 +2 +1 ; +if (d->bLength < len +1 )/* bControlSize */ return false; m = hdr[len]; len +=1 + m +1 ;/* bControlSize, bmControls, iProcessing */
The pull request you sent on Fri, 15 Nov 2019 11:52:27 +0100:
The pull request you sent on Fri, 15 Nov 2019 11:52:27 +0100:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.gittags/sound-5.4-rc8
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/11ac7cc88b48130106c42c0dcaf8ba74fc9e7978
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker