Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 480992b3 authored by Jean-François Moine's avatar Jean-François Moine Committed by Mauro Carvalho Chehab
Browse files

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



For USB speeds different of 'low', the bInterval value is logarithmic.

Signed-off-by: default avatarJean-François Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8d64d4f6
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -754,7 +754,10 @@ static int create_urbs(struct gspca_dev *gspca_dev,
						    ep->desc.bEndpointAddress);
						    ep->desc.bEndpointAddress);
			urb->transfer_flags = URB_ISO_ASAP
			urb->transfer_flags = URB_ISO_ASAP
					| URB_NO_TRANSFER_DMA_MAP;
					| URB_NO_TRANSFER_DMA_MAP;
			if (gspca_dev->dev->speed == USB_SPEED_LOW)
				urb->interval = ep->desc.bInterval;
				urb->interval = ep->desc.bInterval;
			else
				urb->interval = 1 << (ep->desc.bInterval - 1);
			urb->complete = isoc_irq;
			urb->complete = isoc_irq;
			urb->number_of_packets = npkt;
			urb->number_of_packets = npkt;
			for (i = 0; i < npkt; i++) {
			for (i = 0; i < npkt; i++) {