From patchwork Mon Aug 22 06:53:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 9293063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 88937607F0 for ; Mon, 22 Aug 2016 06:55:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7809D28807 for ; Mon, 22 Aug 2016 06:55:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C2CF2881D; Mon, 22 Aug 2016 06:55:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CEE228807 for ; Mon, 22 Aug 2016 06:55:02 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1C9FA2668AE; Mon, 22 Aug 2016 08:55:01 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4F8332667C9; Mon, 22 Aug 2016 08:54:01 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6CBE12667CC; Mon, 22 Aug 2016 08:53:59 +0200 (CEST) Received: from mail.zonque.de (svenfoo.org [82.94.215.22]) by alsa0.perex.cz (Postfix) with ESMTP id 1277D2666D6 for ; Mon, 22 Aug 2016 08:53:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.zonque.de (Postfix) with ESMTP id 81C43C0119; Mon, 22 Aug 2016 08:53:49 +0200 (CEST) Received: from mail.zonque.de ([127.0.0.1]) by localhost (rambrand.bugwerft.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7PPE9FC2vPHI; Mon, 22 Aug 2016 08:53:49 +0200 (CEST) Received: from rabotti.localdomain (p5DDC77DA.dip0.t-ipconnect.de [93.220.119.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.zonque.de (Postfix) with ESMTPSA id EBC63C002E; Mon, 22 Aug 2016 08:53:48 +0200 (CEST) From: Daniel Mack To: alsa-devel@alsa-project.org, tiwai@suse.de Date: Mon, 22 Aug 2016 08:53:38 +0200 Message-Id: <1471848818-11860-3-git-send-email-daniel@zonque.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1471848818-11860-1-git-send-email-daniel@zonque.org> References: <1471848818-11860-1-git-send-email-daniel@zonque.org> Cc: norman.nolte@gmx.net, T.Gresens@intershop.de, clemens@ladisch.de, Daniel Mack Subject: [alsa-devel] [PATCH 3/3] ALSA: usb: fine-tune Tenor error compensation value X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reported-and-tested-by: Thomas Gresens Signed-off-by: Daniel Mack --- 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