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

    ALSA: usb-audio: Fix bogus error messages for delay accounting

to the 3.5-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-bogus-error-messages-for-delay-accounting.patch
and it can be found in the queue-3.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 1213a205f9ed27d97de3d5bed28fb085ef4853e2 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
Date: Thu, 6 Sep 2012 14:58:00 +0200
Subject: ALSA: usb-audio: Fix bogus error messages for delay accounting

From: Takashi Iwai <[email protected]>

commit 1213a205f9ed27d97de3d5bed28fb085ef4853e2 upstream.

The recent fix for the missing fine delayed time adjustment gives
strange error messages at each start of the playback stream, such as
  delay: estimated 0, actual 352
  delay: estimated 353, actual 705

These come from the sanity check in retire_playback_urb().  Before the
stream is activated via start_endpoints(), a few silent packets have
been already sent.  And at this point the delay account is still in
the state as if the new packets are just queued, so the driver gets
confused and spews the bogus error messages.

For fixing the issue, we just need to check whether the received
packet is valid, whether it's zero sized or not.

Reported-by: Markus Trippelsdorf <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 sound/usb/pcm.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -1140,6 +1140,12 @@ static void retire_playback_urb(struct s
        int processed = urb->transfer_buffer_length / stride;
        int est_delay;
 
+       /* ignore the delay accounting when procssed=0 is given, i.e.
+        * silent payloads are procssed before handling the actual data
+        */
+       if (!processed)
+               return;
+
        spin_lock_irqsave(&subs->lock, flags);
        est_delay = snd_usb_pcm_delay(subs, runtime->rate);
        /* update delay with exact number of samples played */


Patches currently in stable-queue which might be from [email protected] are

queue-3.5/alsa-hda-fix-missing-master-volume-for-stac9200-925x.patch
queue-3.5/alsa-hda-fix-oops-at-codec-reset-reconfig.patch
queue-3.5/alsa-ice1724-use-linear-scale-for-ak4396-volume-control.patch
queue-3.5/alsa-hda-workaround-for-silent-output-on-vaio-z-with-alc889.patch
queue-3.5/alsa-usb-audio-fix-bogus-error-messages-for-delay-accounting.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to