Skip to content

lib/stream: also set the selected framerate on the uvc device

The uvc gadget driver needs to know the frameduration to calculate how many requests need to be allocated of each request being usually 125 us long.

In addition with the framesize the driver then can equally distribute one complete frame over all requests and therefor lower the memory pressure and properly use the selected usb bandwidth.

To achieve it, this patch is also setting the frame rate on the uvc gadget side. Since the S/G_PARM ioctls are not yet merged and will be missing in older kernels, bail out if the return of the callback was -ENOTTY. This way the code will function as before.

Signed-off-by: Michael Grzeschik m.grzeschik@pengutronix.de

Merge request reports