From fb272e96236b10fdc12edeca07f08aca085cd28a Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 11 Mar 2013 20:15:34 +0100 Subject: [PATCH] --- yaml --- r: 361331 b: refs/heads/master c: 281a6ac0f54052c81bbee156914459ba5a08f924 h: refs/heads/master i: 361329: e09f859ff46796c93caaa0ec105091eb6b77c9ee 361327: f1675fb2b3bff17d62c81fd46dc32e7c91dee1d3 v: v3 --- [refs] | 2 +- trunk/sound/usb/card.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ef7823a59adf..0f35b4d2bb25 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2e9b9a3c243b1bc1fc9d1e84fcbc32568467bf8e +refs/heads/master: 281a6ac0f54052c81bbee156914459ba5a08f924 diff --git a/trunk/sound/usb/card.c b/trunk/sound/usb/card.c index 803953a9bff3..2da8ad75fd96 100644 --- a/trunk/sound/usb/card.c +++ b/trunk/sound/usb/card.c @@ -243,6 +243,21 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif) struct usb_interface_assoc_descriptor *assoc = 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;