提交 480992b3 编写于 作者: J Jean-François Moine 提交者: Mauro Carvalho Chehab

[media] gspca - main: Fix the isochronous transfer interval

For USB speeds different of 'low', the bInterval value is logarithmic.
Signed-off-by: NJean-François Moine <moinejf@free.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 8d64d4f6
......@@ -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++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册