Skip to content

Commit

Permalink
[media] gspca - main: Fix the isochronous transfer interval
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jean-François Moine authored and Mauro Carvalho Chehab committed Sep 11, 2011
1 parent 8d64d4f commit 480992b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 480992b

Please sign in to comment.