]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ALSA: usb-audio: add implicit fb quirk for Axe-Fx II
authorAlberto Aguirre <albaguirre@gmail.com>
Thu, 8 Dec 2016 06:36:48 +0000 (00:36 -0600)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 28 Apr 2020 18:03:25 +0000 (19:03 +0100)
commit 17f08b0d9aafccdb10038ab6dbd9ddb6433c13e2 upstream.

The Axe-Fx II implicit feedback end point and the data sync endpoint
are in different interface descriptors. Add quirk to ensure a sync
endpoint is properly configured.

Signed-off-by: Alberto Aguirre <albaguirre@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
sound/usb/pcm.c

index 63d5303cc86855f46225c0f6096053b612041fcc..ba920e85ccfd531bb28dfd4bc53017ad8de947a4 100644 (file)
@@ -346,6 +346,15 @@ static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs,
                ep = 0x81;
                iface = usb_ifnum_to_if(dev, 2);
 
+               if (!iface || iface->num_altsetting == 0)
+                       return -EINVAL;
+
+               alts = &iface->altsetting[1];
+               goto add_sync_ep;
+       case USB_ID(0x2466, 0x8003):
+               ep = 0x86;
+               iface = usb_ifnum_to_if(dev, 2);
+
                if (!iface || iface->num_altsetting == 0)
                        return -EINVAL;
 
@@ -360,6 +369,7 @@ static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs,
 
                alts = &iface->altsetting[1];
                goto add_sync_ep;
+
        }
        if (attr == USB_ENDPOINT_SYNC_ASYNC &&
            altsd->bInterfaceClass == USB_CLASS_VENDOR_SPEC &&