V4L2 IOCTL calls take around 10ms

Hello,
I am setting exposure and gain values on my sensor and those ioctl calls from userspace block for 10ms. Is this normal behavior or is something wrong here?

This is example code in userspace for my ioctl call:

void v4l2_producer::set_exposure(unsigned int exposure) {
{
struct v4l2_ext_controls ctrls;
struct v4l2_ext_control ctrl;
CLEAR(ctrl);
CLEAR(ctrls);
ctrls.controls = &ctrl;
ctrls.count = 1;
ctrls.which = V4L2_CTRL_WHICH_CUR_VAL;

    ctrl.id = TEGRA_CAMERA_CID_EXPOSURE;

    ctrl.value = exposure;
    if (xioctl(fd, VIDIOC_S_EXT_CTRLS, &ctrls) == -1) {
        fprintf(stderr, "Error VIDIOC_S_EXT_CTRLS %s\n",
                strerror(errno));
    }


}

}

Best regards,
Johannes

Could you check with v4l2-ctl is the same issue to clarify the problem.

Thanks

Using v4l2-ctl from the command line takes much more time than 10ms, but I guess this is because it needs to be initialized and stuff.

Suppose it could be the v4l2 framework instead of platform driver problem.
Maybe need to trace the v4l2 framework to figure out the problem.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.