Hi Laurent,
Can I say that one URB corresponds to one frame only?
Because I saw the driver send out multiple URB at a time,
for (i = 0; i < UVC_URBS; ++i) {
if ((ret = usb_submit_urb(video->urb[i], GFP_KERNEL)) < 0) {
:
and this goes to the following question that
what if a URB is not capable of containing one frame...
Thanks
On Dec 28, 2007 2:42 PM, Laurent Pinchart <[EMAIL PROTECTED]>
wrote:
> Hi Brian,
>
> On Saturday 22 December 2007, Brian Pin wrote:
> > In uvc_video.c:
> >
> > uvc_init_video_isoc(...) {
> >
> > npackets = (size + psize - 1) / psize;
> > if (npackets > UVC_MAX_ISO_PACKETS)
> > npackets = UVC_MAX_ISO_PACKETS;
> >
> > }
> > in mycase I originally have npackets = 199, and after the 3 lines there,
> it
> > becomes 40, which is UVC_MAX_ISO_PACKETS.
> > My question is if there is a frame that needs more than 40 packets to
> > transfer, how is the data going to be not lost?
> > Is it because we send multiple URBs (I set UVC_URBS to 1)?
>
> The driver resubmits URBs after they complete. Even with a small number of
> packets and a small number of URBs, if the device is able to buffer enough
> data and if the host is fast enough to resubmit, data won't be lost.
>
> In practice the number of packets and the number of URBs is a compromise
> between the memory footprint and the ability to handle delays in URB
> resubmission.
>
> Best regards,
>
> Laurent Pinchart
>
--
Best Regards
Brian
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel