aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2011-08-10 07:28:44 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-11 09:27:05 -0300
commit480992b357d153b8417ba242fc43e96d90cff94c (patch)
treef86ebe81d3eb4697d7e7831c9f73d8d38884b9fd /drivers
parent8d64d4f67eb051551c0702501c35e9cc27d8b75d (diff)
[media] gspca - main: Fix the isochronous transfer interval
For USB speeds different of 'low', the bInterval value is logarithmic. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/gspca/gspca.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index a3c2d36da0c..85d24696db2 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -754,7 +754,10 @@ static int create_urbs(struct gspca_dev *gspca_dev,
ep->desc.bEndpointAddress);
urb->transfer_flags = URB_ISO_ASAP
| URB_NO_TRANSFER_DMA_MAP;
- urb->interval = ep->desc.bInterval;
+ if (gspca_dev->dev->speed == USB_SPEED_LOW)
+ urb->interval = ep->desc.bInterval;
+ else
+ urb->interval = 1 << (ep->desc.bInterval - 1);
urb->complete = isoc_irq;
urb->number_of_packets = npkt;
for (i = 0; i < npkt; i++) {