Hi Brian,

On Monday 10 December 2007, Brian Pin wrote:
> Hi, I am sorry if this is stupid..but I want to ask:
>
> 1. why are we set UVC_MAX_ISO_PACKETS to 40?
> 2. why UVC_URBS set to 5

This is very far from stupid. Those constants are arbitrary. 
UVC_MAX_ISO_PACKETS and UVC_URBS need to be big enough so that host-side 
latencies will not result in buffer overruns in the camera, while being small 
enough not to use too much of the host memory.

UVC_MAX_ISO_PACKETS comes from another driver (although I don't remember which 
one). UVC_URBS was just a guess, and I found the value to be an acceptable 
tradeoff on regular desktops.

For embedded platforms, you might want to decrease those values if memory is 
an issue. Interrupt latency will then need to be low enough or parts of the 
video frames will be missing.

For desktops with plenty of memory but with high interrupt latencies, the 
values could even be raised. Raising UVC_MAX_ISO_PACKETS will introduce a 
bigger latency in the video stream but might put less pressure on the USB 
controller than raising UVC_URBS (I'm not 100% sure about this).

Best regards,

Laurent Pinchart
_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to