alsa-devel.alsa-project.org archive mirror
 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 1/3] ALSA: usb: move udh01_fb_quirk setting to quirks.c
Date: Mon, 22 Aug 2016 08:53:36 +0200	[thread overview]
Message-ID: <1471848818-11860-1-git-send-email-daniel@zonque.org> (raw)

That's a quirk, after all, so move it where to all the other quirks
live.

Signed-off-by: Daniel Mack <daniel@zonque.org>
---
 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)
-- 
2.5.5

             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 Daniel Mack [this message]
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 ` [PATCH 3/3] ALSA: usb: fine-tune Tenor error compensation value Daniel Mack
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-1-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).