mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 16:44:27 +08:00
[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>
This commit is contained in:
parent
8d64d4f67e
commit
480992b357
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user