AnsweredAssumed Answered

Autofocus on OV5640 and i.MX6 ULL

Question asked by glauco76 on Apr 11, 2018
Latest reply on Apr 18, 2018 by jimmychan

Hi All,

 

We are trying to implement Autofocus and exposure control  for an OV5640 module connected with an i.MX6 ULL EVK.

The AF implementation is derived from this one: OV5642 auto-focus on i.MX6 - Boundary Devices 

 

We have just the CSI interface (no MIPI) and no IPU.

The drivers being used are:

- mx6s_capture.ko (from /drivers/media/platform/mxc/subdev/mx6s_capture.c)

- ov5640_camera.ko (from /drivers/media/platform/mxc/subdev/ov5640.c)

 

The above drivers create a V4L2 device under /dev/video1, which points to the mx6s_capture, while ov5640_capture is a subdev of it.

 

So fare we have integrated the AF controls in the ov5640.c driver and the kernel builds just fine and we are able to get a regular video stream from gstreamer.

However, the added controls are not visible at all (actually NONE of the available controls are visible).

 

Tried with

v4l2-ctl -l -d /dev/video1

 

but nothing happens.

 

We have notices that in the ov5640.c driver in the "subdev" directory the handler function for get_controls and set_controls are entirely missing. At this point we can't exactly figure out which is the correct modifications to be done to 

1. have "v4l-ctl -l" show the actual ov5640 driver capabilities (available IOCTLs, should handle the VIDIOC_G_CTRL call), which is currently not showing at all (not even with the unmodified driver)

2. handle the requests for a new IOCTL in addition to those already implemented in the NXP driver

 

Do you have any advice for us?

Outcomes