Implementation of V4L2_CID_FRAME_LENGTH

In regard to V4L2 Exposure/Framerate controls what does this value actually refer to?

Is it the length of time per frame? If so what units?

Is it the number of lines (rows) per frame?

Or is it something else entirely?

In my driver before starting the stream it sends 0xE297 followed by 0x077A to this value. It seems strange to me that it would set it twice, and with such a big difference between the two.

Below is from the document.
Yes, it’s length of per frame unit is number of line. The sensor datasheet should have detail explain.

Exposure/Framerate Controls
Sensor drivers controlling sensor exposure and frame rate must implement V4L2_CID_FRAME_LENGTH and V4L2_CID_COARSE_TIME controls. These controls are used to update sensor frame length and coarse integration time registers with the values calculated from user-mode camera stack.
If the sensor driver has special requirements or direct calculation of the exposure and frame rate is required, V4L2_CID_FRAME_RATE and V4L2_CID_EXPOSURE controls can be implemented instead. When these two controls are implemented, they receive unprocessed frame rate and exposure values in fixed point format. The driver must perform any necessary determination of final register settings.

Note:
The V4L2_CID_FRAME_LENGTH and V4L2_COARSE_TIME controls take 32-bit input parameters and V4L2_CID_FRAME_RATE and V4L2_EXPOSURE take 64-bit input parameters. Use either set of controls but do not mix or use both sets at once.

Great, thanks!

Second question how does the TX1 decide what coarse time to write to V4L2_CID_EXPOSURE. It always just writes the minimum for me. I’d expect it to adjust it for different lighting conditions.

@Atrer
It’s the frame length is relative to frame rate. You can try the argus_camera to change the frame rate by the UI to to know how it work.