]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: usb: fine-tune Tenor error compensation value
authorDaniel Mack <daniel@zonque.org>
Mon, 22 Aug 2016 06:53:38 +0000 (08:53 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 22 Aug 2016 09:40:04 +0000 (11:40 +0200)
Users of devices affected by the Tenor feedback data error report
buffer underruns, even with the +/- 0x1.0000 quirk applied.
Compensating the error with 0xf000 instead seems to reliably fix
that issue.

See

  https://sourceforge.net/p/alsa/mailman/message/35230259/

Reported-and-tested-by: Norman Nolte <norman.nolte@gmx.net>
Reported-and-tested-by: Thomas Gresens <T.Gresens@intershop.de>
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/endpoint.c

index c317a8d530cc765371afa4bede91bdf3a6b8f254..c470251cea4b251269bcd3822f27d0e09e3cd1b2 100644 (file)
@@ -1174,9 +1174,9 @@ void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
                 * by +/- 0x1.0000.
                 */
                if (f < ep->freqn - 0x8000)
-                       f += 0x10000;
+                       f += 0xf000;
                else if (f > ep->freqn + 0x8000)
-                       f -= 0x10000;
+                       f -= 0xf000;
        } else if (unlikely(ep->freqshift == INT_MIN)) {
                /*
                 * The first time we see a feedback value, determine its format