aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/usb/quirks.c
diff options
context:
space:
mode:
authorAlexander Tsoy <alexander@tsoy.me>2020-02-29 18:18:15 +0300
committerTakashi Iwai <tiwai@suse.de>2020-03-06 09:03:17 +0100
commit2edb84e3047b93da2f2b234219cdc304df042d9e (patch)
tree26855fa73e05965f2397f83c7e8022d3d36e2ded /sound/usb/quirks.c
parentALSA: korg1212: fix if-statement empty body warnings (diff)
downloadwireguard-linux-2edb84e3047b93da2f2b234219cdc304df042d9e.tar.xz
wireguard-linux-2edb84e3047b93da2f2b234219cdc304df042d9e.zip
ALSA: usb-audio: Add support for MOTU MicroBook IIc
MicroBook IIc operates in UAC2 mode by default. This patch addresses several issues with it: - MicroBook II and IIc shares the same USB ID. We can distinguish them by interface class. - MaxPacketsOnly attribute is erroneously set in endpoint descriptors. As a result this card produces noise with all sample rates other than 96 KHz. This also causes issues like IOMMU page faults and other problems with host controller. - Sample rate changes takes more than 2 seconds for this device. Clock validity request returns false during that period, so the clock validity quirk is required. Signed-off-by: Alexander Tsoy <alexander@tsoy.me> Link: https://lore.kernel.org/r/20200229151815.14199-1-alexander@tsoy.me Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/quirks.c')
-rw-r--r--sound/usb/quirks.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 915aea256f65..3cc745fe24d8 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1352,7 +1352,15 @@ int snd_usb_apply_boot_quirk(struct usb_device *dev,
case USB_ID(0x2466, 0x8010): /* Fractal Audio Axe-Fx 3 */
return snd_usb_axefx3_boot_quirk(dev);
case USB_ID(0x07fd, 0x0004): /* MOTU MicroBook II */
- return snd_usb_motu_microbookii_boot_quirk(dev);
+ /*
+ * For some reason interface 3 with vendor-spec class is
+ * detected on MicroBook IIc.
+ */
+ if (get_iface_desc(intf->altsetting)->bInterfaceClass ==
+ USB_CLASS_VENDOR_SPEC &&
+ get_iface_desc(intf->altsetting)->bInterfaceNumber < 3)
+ return snd_usb_motu_microbookii_boot_quirk(dev);
+ break;
}
return 0;
@@ -1790,5 +1798,13 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip,
else
fp->ep_attr |= USB_ENDPOINT_SYNC_SYNC;
break;
+ case USB_ID(0x07fd, 0x0004): /* MOTU MicroBook IIc */
+ /*
+ * MaxPacketsOnly attribute is erroneously set in endpoint
+ * descriptors. As a result this card produces noise with
+ * all sample rates other than 96 KHz.
+ */
+ fp->attributes &= ~UAC_EP_CS_ATTR_FILL_MAX;
+ break;
}
}