diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-04-08 21:39:22 +0200 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-04-08 21:39:22 +0200 |
commit | 7c91d302ffe2ffac813c47d6ba2e7489a2ccb35f (patch) | |
tree | 78a2cf601e986694765b28079bf749a8eaa6a2b9 /sound/usb/card.c | |
parent | 0b824f8dad9fdfc7c1bf9c1d3ac744075eb73ec6 (diff) | |
parent | 918d7f6f68620e0721bb31402ebf87e15f826831 (diff) | |
download | kernel_replicant_linux-7c91d302ffe2ffac813c47d6ba2e7489a2ccb35f.tar.gz kernel_replicant_linux-7c91d302ffe2ffac813c47d6ba2e7489a2ccb35f.tar.bz2 kernel_replicant_linux-7c91d302ffe2ffac813c47d6ba2e7489a2ccb35f.zip |
Merge remote-tracking branch 'clk/clk-for-3.10' into sunxi/core-for-3.10
Diffstat (limited to 'sound/usb/card.c')
-rw-r--r-- | sound/usb/card.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index 803953a9bff3..2da8ad75fd96 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; } |