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.

  • A minimal reproducible example would greatly assist the subject. - Fat-Zer
  • It looks all right and UMVR ... I would dig in the direction of lack of support / error from a particular device / driver ... - Fat-Zer
  • Maybe the driver is true? I use Ubuntu 16 on a virtualka. In addition to this strangeness, the rest works and the frame comes. - mr NAE
  • By the way, nothing falls in dmesg ? - Fat-Zer
  • uvcvideo: Failed to query (SET_CUR) UVC control 2 on unit 2: -32 (exp. 2). - mr NAE

0