We are developing a new driver based on the imx219 driver, using the latest R36.4.2. We set the gain and exposure using the v4l2 command and found that we cannot call the ov3c_set_gain and ovx3c_set_exposure functions in the driver (because I added printk prints in these functions, but cannot find them in dmesg).
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG12 --set-ctrl exposure=22000,gain=248,bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test_1920x1080.raw
But using the v4l2-ctl -l command to check the gain and gain values has changed.
`root@ubuntu:# v4l2-ctl -l
Camera Controls
group_hold 0x009a2003 (bool) : default=0 value=0 flags=execute-on-write
sensor_mode 0x009a2008 (int64) : min=0 max=1 step=1 default=0 value=0 flags=slider
gain 0x009a2009 (int64) : min=16 max=249 step=1 default=16 value=248 flags=slider
exposure 0x009a200a (int64) : min=13 max=33001 step=1 default=11000 value=22000 flags=slider
frame_rate 0x009a200b (int64) : min=2000000 max=30000000 step=1 default=30000000 value=2000000 flags=slider
sensor_configuration 0x009a2032 (u32) : min=0 max=4294967295 step=1 default=0 dims=[22] flags=read-only, volatile, has-payload
sensor_mode_i2c_packet 0x009a2033 (u32) : min=0 max=4294967295 step=1 default=0 dims=[1026] flags=read-only, volatile, has-payload
sensor_control_i2c_packet 0x009a2034 (u32) : min=0 max=4294967295 step=1 default=0 dims=[1026] flags=read-only, volatile, has-payload
bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0 (0 0x0)
override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0 (0 0x0)
height_align 0x009a2066 (int) : min=1 max=16 step=1 default=1 value=1
size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0 (1 0x1)
write_isp_format 0x009a2068 (int) : min=1 max=1 step=1 default=1 value=1
sensor_signal_properties 0x009a2069 (u32) : min=0 max=4294967295 step=1 default=0 dims=[30][18] flags=read-only, has-payload
sensor_image_properties 0x009a206a (u32) : min=0 max=4294967295 step=1 default=0 dims=[30][16] flags=read-only, has-payload
sensor_control_properties 0x009a206b (u32) : min=0 max=4294967295 step=1 default=0 dims=[30][36] flags=read-only, has-payload
sensor_dv_timings 0x009a206c (u32) : min=0 max=4294967295 step=1 default=0 dims=[30][16] flags=read-only, has-payload
low_latency_mode 0x009a206d (bool) : default=0 value=0
preferred_stride 0x009a206e (int) : min=0 max=65535 step=1 default=0 value=0
override_capture_timeout_ms 0x009a206f (int) : min=-1 max=2147483647 step=1 default=2500 value=2500
sensor_modes 0x009a2082 (int) : min=0 max=30 step=1 default=30 value=1 flags=read-only`
The drive is also set up in the form of imx219.
`
static const u32 ctrl_cid_list = {
TEGRA_CAMERA_CID_GAIN,
TEGRA_CAMERA_CID_EXPOSURE,
TEGRA_CAMERA_CID_FRAME_RATE,
TEGRA_CAMERA_CID_SENSOR_MODE_ID,
};
static struct tegracam_ctrl_ops ovx3c_ctrl_ops = {
.numctrls = ARRAY_SIZE(ctrl_cid_list),
.ctrl_cid_list = ctrl_cid_list,
.set_gain = ovx3c_set_gain,
.set_exposure = ovx3c_set_exposure,
.set_frame_rate = ovx3c_set_frame_rate,
.set_group_hold = ovx3c_set_group_hold,
};
static int ovx3c_set_gain(struct tegracam_device *tc_dev, s64 val)
{
struct camera_common_data *s_data = tc_dev->s_data;
struct device *dev = s_data->dev;
dev_info(dev,"set gain %lld \n", val);
}
`
Can you help me see what the problem is? How should I investigate? Thank you.