Using ioctl to control the property of imx477

Hi forum,

(1)I tried to use ioctl to control exposure or gain of imx477 in nano. And I also saw there are TEGRA_CAMERA_CID_EXPOSURE in the driver code, but I can not control it by passing it to ioctl.

But using v4l2-ctrl --set-ctrls can change the exposure of sensor. Why would this happen?

(2)And I also took this post as ref Skeleton driver for MIPI camera . Is the only way to control the exposure or gain of sensor is to add CID to channel.c ?

I am using jetson nano and jetpack 4.5 to develop.

Thanks in advance

  1. Have reference to the v4l2-ctl to set the VIDIOC_S_CTRL for CID.
  2. You can create specific IOCTL but can’t set by v4l2 API.

Hi ShaneCCC,

thanks for the fast reply,

I solved this by looking into another post V4L2 Camera Driver Development Custom Controls - #7 by busch.johannes

Thanks