Failed to set manual exposure and autofocus on ov5640

I managed to set up the pipeline (media-ctl) as per instructions on the github readme and successfully retrieved the image from the camera using the v4l2 library.

Problems start to occur when I want to change the control parameters on the camera. Manual exposure and autofocus to be specific. I am setting these parameters using ioctl(fd, VIDIOC_S_CTRL, &ctrl) call, where ctrl id for exposure is V4L2_CID_EXPOSURE_AUTO and ctrl val is V4L2_EXPOSURE_MANUAL , whereas for autofocus I use id V4L2_CID_FOCUS_AUTO and value 0 . Both request fail, receiving -1 from ioctl. I also tried to set these parameters with v4l2-ctl tool, but when running the command v4l2-ctl -d /dev/video0 -c exposure_auto=0 I received unknown control 'exposure_auto' . When listing the controls with v4l2-ctl -d /dev/video0 --list-ctrls I get an empty response even though the query itself is successful ( VIDIOC_QUERYCAP: ok ).

Linaro linux version is 4.14.53, v4l utils version is 1.16. I’m using this ov5640.

Any suggestions what can I do?

I assume this is for dragonboard-410c, /dev/video0 is for CSI output, you should probably send this command to the sensor subdevice (/dev/v4l/by-id/…).

I have snapdragon 820, but I think the problem is in the camera since image grabbing and resolution setting work. I don’t have /dev/v4l/by-id dir, only /dev/v4l-subdev-[0..10] and /dev/v4l/by-path/.

tree output:

linaro@OpenQ820:/dev$ tree v4l*
v4l
└── by-path
    ├── platform-a34000.camss-video-index0 -> ../../video0
    ├── platform-a34000.camss-video-index1 -> ../../video1
    ├── platform-a34000.camss-video-index2 -> ../../video2
    ├── platform-a34000.camss-video-index3 -> ../../video3
    ├── platform-a34000.camss-video-index4 -> ../../video4
    ├── platform-a34000.camss-video-index5 -> ../../video5
    ├── platform-a34000.camss-video-index6 -> ../../video6
    ├── platform-a34000.camss-video-index7 -> ../../video7
    ├── platform-c00000.video-codec-video-index0 -> ../../video8
    └── platform-c00000.video-codec-video-index1 -> ../../video9
v4l-subdev0 [error opening dir]
v4l-subdev1 [error opening dir]
v4l-subdev10 [error opening dir]
v4l-subdev11 [error opening dir]
v4l-subdev12 [error opening dir]
v4l-subdev13 [error opening dir]
v4l-subdev14 [error opening dir]
v4l-subdev15 [error opening dir]
v4l-subdev16 [error opening dir]
v4l-subdev17 [error opening dir]
v4l-subdev18 [error opening dir]
v4l-subdev19 [error opening dir]
v4l-subdev2 [error opening dir]
v4l-subdev20 [error opening dir]
v4l-subdev3 [error opening dir]
v4l-subdev4 [error opening dir]
v4l-subdev5 [error opening dir]
v4l-subdev6 [error opening dir]
v4l-subdev7 [error opening dir]
v4l-subdev8 [error opening dir]
v4l-subdev9 [error opening dir]