ChangeSet 1.2181.25.51, 2005/03/24 11:59:21+01:00, [EMAIL PROTECTED]
[ALSA] usb - change timeout of USB control/bulk msg functions to msecs
USB generic driver
This changes the timeout in the remaining (indirect) calls to
usb_control/bulk_msg from jiffies to msecs.
Signed-off-by: Clemens Ladisch <[EMAIL PROTECTED]>
usbaudio.c | 8 ++++----
usbmidi.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
--- a/sound/usb/usbaudio.c 2005-03-30 16:21:10 -08:00
+++ b/sound/usb/usbaudio.c 2005-03-30 16:21:10 -08:00
@@ -1141,7 +1141,7 @@
data[0] = 1;
if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
SET_CUR,
USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT,
- PITCH_CONTROL << 8, ep, data, 1,
HZ)) < 0) {
+ PITCH_CONTROL << 8, ep, data, 1,
1000)) < 0) {
snd_printk(KERN_ERR "%d:%d:%d: cannot set enable
PITCH\n",
dev->devnum, iface, ep);
return err;
@@ -1167,14 +1167,14 @@
data[2] = rate >> 16;
if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0),
SET_CUR,
USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT,
- SAMPLING_FREQ_CONTROL << 8, ep,
data, 3, HZ)) < 0) {
+ SAMPLING_FREQ_CONTROL << 8, ep,
data, 3, 1000)) < 0) {
snd_printk(KERN_ERR "%d:%d:%d: cannot set freq %d to ep
0x%x\n",
dev->devnum, iface, fmt->altsetting, rate,
ep);
return err;
}
if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0),
GET_CUR,
USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_IN,
- SAMPLING_FREQ_CONTROL << 8, ep,
data, 3, HZ)) < 0) {
+ SAMPLING_FREQ_CONTROL << 8, ep,
data, 3, 1000)) < 0) {
snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq at
ep 0x%x\n",
dev->devnum, iface, fmt->altsetting, ep);
return 0; /* some devices don't support reading */
@@ -2944,7 +2944,7 @@
snd_printdd("sending Extigy boot sequence...\n");
/* Send message to force it to reconnect with full interface. */
err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev,0),
- 0x10, 0x43, 0x0001, 0x000a, NULL, 0, HZ);
+ 0x10, 0x43, 0x0001, 0x000a, NULL, 0,
1000);
if (err < 0) snd_printdd("error sending boot message: %d\n",
err);
err = usb_get_descriptor(dev, USB_DT_DEVICE, 0,
&dev->descriptor, sizeof(dev->descriptor));
diff -Nru a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
--- a/sound/usb/usbmidi.c 2005-03-30 16:21:10 -08:00
+++ b/sound/usb/usbmidi.c 2005-03-30 16:21:10 -08:00
@@ -287,7 +287,7 @@
memcpy(buf, data, len);
dump_urb("sending", buf, len);
err = usb_bulk_msg(ep->umidi->chip->dev, ep->urb->pipe, buf, len,
- NULL, HZ / 4);
+ NULL, 1000);
kfree(buf);
return err;
}
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html