summaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-03-18 11:04:42 +0100
committerTakashi Iwai <tiwai@suse.de>2013-03-18 11:04:42 +0100
commitcf30f46acde1f84fbf603bba6540cbb40cc6c954 (patch)
tree2652b3fd1fbc4c379ee5325579fe60eae75421f1 /sound/usb
parent0959f22ee66734c212fc733f7616ba321ef7f47f (diff)
parenta86b1a2cd2f81f74e815e07f756edd7bc5b6f034 (diff)
Merge branch 'for-linus' into for-next
Back-merged for refactoring beep stuff.
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/card.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 803953a9bff..2da8ad75fd9 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -244,6 +244,21 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)
usb_ifnum_to_if(dev, ctrlif)->intf_assoc;
if (!assoc) {
+ /*
+ * Firmware writers cannot count to three. So to find
+ * the IAD on the NuForce UDH-100, also check the next
+ * interface.
+ */
+ struct usb_interface *iface =
+ usb_ifnum_to_if(dev, ctrlif + 1);
+ if (iface &&
+ iface->intf_assoc &&
+ iface->intf_assoc->bFunctionClass == USB_CLASS_AUDIO &&
+ iface->intf_assoc->bFunctionProtocol == UAC_VERSION_2)
+ assoc = iface->intf_assoc;
+ }
+
+ if (!assoc) {
snd_printk(KERN_ERR "Audio class v2 interfaces need an interface association\n");
return -EINVAL;
}