aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/quirks.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2011-09-26 15:15:27 -0400
committerTakashi Iwai <tiwai@suse.de>2011-09-27 03:21:48 -0400
commit17d900c4a1b50bc191b3ca58cbd78acc04a1c5b3 (patch)
tree7640521988e285f1afa0e3dd44aa73a5333ccb38 /sound/usb/quirks.c
parent6b69a0e520a0dc6579901098d0810bcd2e1ea60b (diff)
ALSA: usb-audio: increase control transfer timeout
There are certain devices that are reportedly so slow that they need more than 100 ms to handle control transfers. Therefore, increase the timeout in mixer(_quirks).c to 1000 ms. The timeout parameter of snd_usb_ctl_msg() is now constant, so we can drop it. Reported-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/quirks.c')
-rw-r--r--sound/usb/quirks.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 556edea28b90..2e5bc7344026 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -340,7 +340,7 @@ static int snd_usb_extigy_boot_quirk(struct usb_device *dev, struct usb_interfac
340 snd_printdd("sending Extigy boot sequence...\n"); 340 snd_printdd("sending Extigy boot sequence...\n");
341 /* Send message to force it to reconnect with full interface. */ 341 /* Send message to force it to reconnect with full interface. */
342 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev,0), 342 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev,0),
343 0x10, 0x43, 0x0001, 0x000a, NULL, 0, 1000); 343 0x10, 0x43, 0x0001, 0x000a, NULL, 0);
344 if (err < 0) snd_printdd("error sending boot message: %d\n", err); 344 if (err < 0) snd_printdd("error sending boot message: %d\n", err);
345 err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, 345 err = usb_get_descriptor(dev, USB_DT_DEVICE, 0,
346 &dev->descriptor, sizeof(dev->descriptor)); 346 &dev->descriptor, sizeof(dev->descriptor));
@@ -361,11 +361,11 @@ static int snd_usb_audigy2nx_boot_quirk(struct usb_device *dev)
361 361
362 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), 0x2a, 362 snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), 0x2a,
363 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_OTHER, 363 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_OTHER,
364 0, 0, &buf, 1, 1000); 364 0, 0, &buf, 1);
365 if (buf == 0) { 365 if (buf == 0) {
366 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0x29, 366 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0x29,
367 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, 367 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
368 1, 2000, NULL, 0, 1000); 368 1, 2000, NULL, 0);
369 return -ENODEV; 369 return -ENODEV;
370 } 370 }
371 return 0; 371 return 0;
@@ -408,7 +408,7 @@ static int snd_usb_cm106_write_int_reg(struct usb_device *dev, int reg, u16 valu
408 buf[3] = reg; 408 buf[3] = reg;
409 return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_SET_CONFIGURATION, 409 return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_SET_CONFIGURATION,
410 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_ENDPOINT, 410 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_ENDPOINT,
411 0, 0, &buf, 4, 1000); 411 0, 0, &buf, 4);
412} 412}
413 413
414static int snd_usb_cm106_boot_quirk(struct usb_device *dev) 414static int snd_usb_cm106_boot_quirk(struct usb_device *dev)