we are in the process of bringing up a new camera sensor (OV2311) with the iMX8M Mini SoC using Yocto. We created a new driver for the sensor and are able to capture images and stream video using GStreamer.
However, the camera driver supports manual control of the sensor exposure time using standard V4L2 controls (V4L2_CID_EXPOSURE control) but this is not working, opening the camera device and trying to set the exposure time using ioctl call fails.
According to this forum post about the iMX6, the V4L2 implementation in NXP's yocto linux is incomplete, but even the "solution" mentioned in that post, namely controlling the sensor using ioctl, is not working for us on the iMX8M Mini.
Is there any other way of controlling the camera parameters like exposure time from Linux userspace?
The link you are referring is using gstreamer-imx-plugins for i.MX6 SoC. Unfortunately, gstreamer-imx-plugins are not supported for i.MX8. Please look at GitHub - Freescale/gstreamer-imx: GStreamer 1.0 plugins for i.MX platforms .
Not tried but just a suggestion, there can be two ways:
thank you very much for your suggestions!
Regarding the gstreamer plugins: the post I mentioned was just meant as an example of someone else also having similar problems setting the V4L2 controls, we found this problem independently of GStreamer. Basically, in our application, we `open()` the camera device ("/dev/video0") and try to set the exposure using an `ioctl()` which fails (error code 25, "Inappropriate ioctl for device").
Concerning your suggestions:
Again, thank you very much for your help, it is much appreciated!