Patch "ALSA: usb-audio: Fix packet size calculation regression" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: usb-audio: Fix packet size calculation regression

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-usb-audio-fix-packet-size-calculation-regression.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 23939115be181bc5dbc33aa8471adcdbffa28910 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@xxxxxxx>
Date: Fri, 1 Oct 2021 12:54:25 +0200
Subject: ALSA: usb-audio: Fix packet size calculation regression

From: Takashi Iwai <tiwai@xxxxxxx>

commit 23939115be181bc5dbc33aa8471adcdbffa28910 upstream.

The commit d215f63d49da ("ALSA: usb-audio: Check available frames for
the next packet size") introduced the available frame size check, but
the conversion forgot to initialize the temporary variable properly,
and it resulted in a bogus calculation.  This patch fixes it.

Fixes: d215f63d49da ("ALSA: usb-audio: Check available frames for the next packet size")
Reported-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20211001104417.14291-1-colin.king@xxxxxxxxxxxxx
Link: https://lore.kernel.org/r/20211001105425.16191-1-tiwai@xxxxxxx
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 sound/usb/endpoint.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -182,7 +182,7 @@ static int next_packet_size(struct snd_u
 	if (ep->fill_max)
 		return ep->maxframesize;
 
-	sample_accum += ep->sample_rem;
+	sample_accum = ep->sample_accum + ep->sample_rem;
 	if (sample_accum >= ep->pps) {
 		sample_accum -= ep->pps;
 		ret = ep->packsize[1];


Patches currently in stable-queue which might be from tiwai@xxxxxxx are

queue-5.15/alsa-usb-audio-rename-early_playback_start-flag-with-lowlatency_playback.patch
queue-5.15/alsa-usb-audio-disable-low-latency-playback-for-free-wheel-mode.patch
queue-5.15/alsa-usb-audio-avoid-killing-in-flight-urbs-during-draining.patch
queue-5.15/alsa-usb-audio-less-restriction-for-low-latency-playback-mode.patch
queue-5.15/alsa-usb-audio-improved-lowlatency-playback-support.patch
queue-5.15/alsa-usb-audio-check-available-frames-for-the-next-packet-size.patch
queue-5.15/alsa-usb-audio-switch-back-to-non-latency-mode-at-a-later-point.patch
queue-5.15/alsa-usb-audio-fix-packet-size-calculation-regression.patch
queue-5.15/alsa-usb-audio-don-t-start-stream-for-capture-at-prepare.patch
queue-5.15/alsa-usb-audio-disable-low-latency-mode-for-implicit-feedback-sync.patch
queue-5.15/alsa-usb-audio-add-spinlock-to-stop_urbs.patch
queue-5.15/alsa-usb-audio-restrict-rates-for-the-shared-clocks.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux