Tell me, can anyone come across such a strange situation? I can not set the parameter V4L2_CID_BRIGHTNESS - ioctl(fd, VIDIOC_S_CTRL, &control) comes out with errno == EIO .
At the same time, ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl) and ioctl(fd, VIDIOC_G_CTRL, &control) work without errors. The flag in queryctrl is zero - that is, there is a parameter and it is not disabled (not DISABLED), the description and default value are correct.
Minimum example:
int fd=open("/dev/video0", O_RDWR | O_NONBLOCK, 0); v4l2_queryctrl queryctrl; queryctrl.id = V4L2_CID_BRIGHTNESS; ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl); //ok v4l2_control control = { V4L2_CID_BRIGHTNESS, 0}; ioctl(fd, VIDIOC_G_CTRL, &control); //ok control.value = 50; if (-1 == ioctl(fd, VIDIOC_S_CTRL, &control)) { perror(" ");//errno == EIO } Similarly with v4l2-ctl
$ v4l2-ctl -d /dev/video0 -C brightness brightness: 50 $ v4l2-ctl -d /dev/video0 -c brightness=51 VIDIOC_S_CTRL: failed: Input/output error brightness: Input/output error It is possible that the problem is in the driver. In this case, I will clarify: I use Ubuntu 16 on VirtualBox.
dmesg? - Fat-Zer