]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204
authorLassi Ylikojola <lassi.ylikojola@gmail.com>
Fri, 9 Feb 2018 14:51:36 +0000 (16:51 +0200)
committerSasha Levin <alexander.levin@microsoft.com>
Sun, 4 Mar 2018 15:28:23 +0000 (10:28 -0500)
[ Upstream commit 5e35dc0338d85ccebacf3f77eca1e5dea73155e8 ]

Add quirk to ensure a sync endpoint is properly configured.
This patch is a fix for same symptoms on Behringer UFX1204 as patch
from Albertto Aquirre on Dec 8 2016 for Axe-Fx II.

Signed-off-by: Lassi Ylikojola <lassi.ylikojola@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
sound/usb/pcm.c

index a511551972772a556c7765eb9d9050e95bf73cc3..3351e2f9656de147ad489294d549765f1c1cef11 100644 (file)
@@ -343,6 +343,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(0x1397, 0x0002):
+               ep = 0x81;
+               iface = usb_ifnum_to_if(dev, 1);
+
                if (!iface || iface->num_altsetting == 0)
                        return -EINVAL;