Libargus with V4l2 ioctl?

We want add lens control in our camera driver.
V4l2 ioctl have some ID for lens ctrl.

Is there a way to call v4l2 ioctl in libargus application?

Thanks for your help!!

hello felixch,

please check camera software architecture, they’re using different blocks.
may I know what’s the actual use-case, are you going to move lens for different focus?

Our camera using 10X zoom lens, required zoom and focus setting.

you may refer to __u32 _v4l2_argus_ctrl_metadata::FocuserPosition to set focuser position.

Seem the v4l2_argus_ctrl_metadata is parameter for V4L2_CID_ARGUS_METADATA ioctl. Now we have same question:How to call ioctl in argus app?

hello felixch,

it’s not call IOCTL to set directly.
Argus disable auto focus algorithm, so we don’t have focuser kernel driver support.

we can support manual focus, you should sent focus position based-on the analysis done by your side, which could be Argus provided sharpness map.
it’s Argus API to set manual focus position, and you still need to implement the kernel driver.

Of course we need implement driver to control lens.
Just want to confirm the driver is apart of v4l2 or Not.


you may uses Argus API to set manual focus position, and it’s focuser driver (VCM) to move the steps. please use standard v4l2 interface to control the focuser.

you should also register your focuser to the same modules as your camera sensor in device tree settings.
for example,
it’s module0{} to assign camera sensor, drivernode0 as imx390@30-001b, and it’s using focuser, drivernode1 with lc898212@2-0072.

       tegra-camera-platform {
                compatible = "nvidia, tegra-camera-platform";
                modules {
                        module0 {
                                drivernode0 {
                                        pcl_id = "v4l2_sensor";
                                        devname = "imx390 30-001b";
                                        proc-device-tree = "/proc/device-tree/i2c@3180000/tca9546@70/i2c@0/imx390_a@1b";

                                drivernode1 {
                                        pcl_id = "v4l2_focuser";
                                        proc-device-tree = "/proc/device-tree/i2c@3180000/lc898212@72";
                                        devname = "lc898212 2-0072";