ALSA: usb: move udh01_fb_quirk setting to quirks.c
authorDaniel Mack <daniel@zonque.org>
Mon, 22 Aug 2016 06:53:36 +0000 (08:53 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 22 Aug 2016 09:39:42 +0000 (11:39 +0200)
That's a quirk, after all, so move it where to all the other quirks
live.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/endpoint.c
sound/usb/quirks.c

index c07a7eda42a28eee533752e28f787ccfd2230ed2..4b4ffa0adb88f22e7adbb42fcdc7dd761e4073b0 100644 (file)
@@ -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);
index 6cf1f35974558053101e00351482574c2be6a988..299813f30630f9a18e14208a08917e31a3006633 100644 (file)
@@ -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)