aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/card.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2013-03-11 15:15:34 -0400
committerTakashi Iwai <tiwai@suse.de>2013-03-12 03:35:30 -0400
commit281a6ac0f54052c81bbee156914459ba5a08f924 (patch)
treef7ad83926271528979e781fc02c8480e455a7dae /sound/usb/card.c
parent2e9b9a3c243b1bc1fc9d1e84fcbc32568467bf8e (diff)
ALSA: usb-audio: add a workaround for the NuForce UDH-100
The NuForce UDH-100 numbers its interfaces incorrectly, which makes the interface associations come out wrong, which results in the driver erroring out with the message "Audio class v2 interfaces need an interface association". Work around this by searching for the interface association descriptor also in some other place where it might have ended up. Reported-and-tested-by: Dave Helstroom <helstroom@google.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.c')
-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 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)
244 usb_ifnum_to_if(dev, ctrlif)->intf_assoc; 244 usb_ifnum_to_if(dev, ctrlif)->intf_assoc;
245 245
246 if (!assoc) { 246 if (!assoc) {
247 /*
248 * Firmware writers cannot count to three. So to find
249 * the IAD on the NuForce UDH-100, also check the next
250 * interface.
251 */
252 struct usb_interface *iface =
253 usb_ifnum_to_if(dev, ctrlif + 1);
254 if (iface &&
255 iface->intf_assoc &&
256 iface->intf_assoc->bFunctionClass == USB_CLASS_AUDIO &&
257 iface->intf_assoc->bFunctionProtocol == UAC_VERSION_2)
258 assoc = iface->intf_assoc;
259 }
260
261 if (!assoc) {
247 snd_printk(KERN_ERR "Audio class v2 interfaces need an interface association\n"); 262 snd_printk(KERN_ERR "Audio class v2 interfaces need an interface association\n");
248 return -EINVAL; 263 return -EINVAL;
249 } 264 }