All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@zonque.org>
To: alsa-devel@alsa-project.org, tiwai@suse.de
Cc: norman.nolte@gmx.net, T.Gresens@intershop.de, clemens@ladisch.de,
	Daniel Mack <daniel@zonque.org>
Subject: [PATCH 3/3] ALSA: usb: fine-tune Tenor error compensation value
Date: Mon, 22 Aug 2016 08:53:38 +0200	[thread overview]
Message-ID: <1471848818-11860-3-git-send-email-daniel@zonque.org> (raw)
In-Reply-To: <1471848818-11860-1-git-send-email-daniel@zonque.org>

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>
---
 sound/usb/endpoint.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index c317a8d..c470251 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -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
-- 
2.5.5

  parent reply	other threads:[~2016-08-22  6:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-22  6:53 [PATCH 1/3] ALSA: usb: move udh01_fb_quirk setting to quirks.c Daniel Mack
2016-08-22  6:53 ` [PATCH 2/3] ALSA: usb: use TEAC UD-H01 quirk for more devices Daniel Mack
2016-08-22  6:53 ` Daniel Mack [this message]
2016-08-22  9:40 ` [PATCH 1/3] ALSA: usb: move udh01_fb_quirk setting to quirks.c Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471848818-11860-3-git-send-email-daniel@zonque.org \
    --to=daniel@zonque.org \
    --cc=T.Gresens@intershop.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=norman.nolte@gmx.net \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.