From patchwork Mon Aug 22 06:53:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 9293053 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 CEBE1607FF for ; Mon, 22 Aug 2016 06:54:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF02C287E1 for ; Mon, 22 Aug 2016 06:54:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B39E628932; Mon, 22 Aug 2016 06:54:08 +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 92895287E1 for ; Mon, 22 Aug 2016 06:54:07 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 620E5266021; Mon, 22 Aug 2016 08:54:05 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A2AFB266021; Mon, 22 Aug 2016 08:53:57 +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 36219266719; Mon, 22 Aug 2016 08:53:56 +0200 (CEST) Received: from mail.zonque.de (svenfoo.org [82.94.215.22]) by alsa0.perex.cz (Postfix) with ESMTP id 24917265FFA for ; Mon, 22 Aug 2016 08:53:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.zonque.de (Postfix) with ESMTP id 7D538C0102; Mon, 22 Aug 2016 08:53:48 +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 LBi_7EMv1a73; Mon, 22 Aug 2016 08:53:48 +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 BA8FAC002E; Mon, 22 Aug 2016 08:53:47 +0200 (CEST) From: Daniel Mack To: alsa-devel@alsa-project.org, tiwai@suse.de Date: Mon, 22 Aug 2016 08:53:36 +0200 Message-Id: <1471848818-11860-1-git-send-email-daniel@zonque.org> X-Mailer: git-send-email 2.5.5 Cc: norman.nolte@gmx.net, T.Gresens@intershop.de, clemens@ladisch.de, Daniel Mack Subject: [alsa-devel] [PATCH 1/3] ALSA: usb: move udh01_fb_quirk setting to quirks.c 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 That's a quirk, after all, so move it where to all the other quirks live. Signed-off-by: Daniel Mack --- sound/usb/endpoint.c | 4 ---- sound/usb/quirks.c | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index c07a7ed..4b4ffa0 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -502,10 +502,6 @@ struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip, ep->syncinterval = 3; ep->syncmaxsize = le16_to_cpu(get_endpoint(alts, 1)->wMaxPacketSize); - - if (chip->usb_id == USB_ID(0x0644, 0x8038) /* TEAC UD-H01 */ && - ep->syncmaxsize == 4) - ep->udh01_fb_quirk = 1; } list_add_tail(&ep->list, &chip->ep_list); diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 6cf1f35..299813f 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1216,6 +1216,11 @@ void snd_usb_endpoint_start_quirk(struct snd_usb_endpoint *ep) ep->chip->usb_id == USB_ID(0x0763, 0x2031)) && ep->type == SND_USB_ENDPOINT_TYPE_DATA) ep->skip_packets = 16; + + /* Work around devices that report unreasonable feedback data */ + if (ep->chip->usb_id == USB_ID(0x0644, 0x8038) /* TEAC UD-H01 */ && + ep->syncmaxsize == 4) + ep->udh01_fb_quirk = 1; } void snd_usb_set_interface_quirk(struct usb_device *dev)