Can't set values for ISP functions with v4l2-ctl

I can’t set ISP function, especially White balance parameter, isp_wb_r_gain

Here is ISP device node i checked like below.

root@hailo15:~# media-ctl -p
Media controller API version 5.15.32

skip

  • entity 36: hailo-isp (6 pads, 3 links)
    type Node subtype V4L flags 0
    device node name /dev/v4l-subdev4 <----- ISP device
    pad0: Sink
    ← “hailo15_rxwrapper.0”:2 [ENABLED]

Function list i checked

root@hailo15:~# v4l2-ctl -d /dev/v4l-subdev4 -L

User Controls

              isp_ae_enable 0x00982900 (bool)   : default=0 value=0 flags=volatile, execute-on-write
               isp_ae_reset 0x00982901 (bool)   : default=0 value=0 flags=volatile, execute-on-write


skip
isp_wb_r_gain 0x00984000 (int) : min=256 max=1023 step=1 default=256 value=256 flags=volatile, execute-on-write
isp_wb_gr_gain 0x00984001 (int) : min=256 max=1023 step=1 default=256 value=256 flags=volatile, execute-on-write

skip

Here is the error case i can’t set the value, isp_wb_r_gain.

root@hailo15:~# v4l2-ctl -d /dev/v4l-subdev4 --set-ctrl isp_wb_r_gain=800
root@hailo15:~# v4l2-ctl -d /dev/v4l-subdev4 --get-ctrl isp_wb_r_gain
isp_wb_r_gain: 256 <------- it was not set

Hi,

In order to get & set the v4l2 controls successfully, two conditions should be met -

  1. The sensor is actively streaming
  2. The changes we make aren’t forced\overridden by 3A

So in your case, the process of setting the white balance parameters manually should look something like this:

  • In your /usr/bin/3aconfig.json, change the “enable” field of the “Awbv2” class, from true to false
  • Run some stream. For example, refer to the provided ~/apps/detection/detection.sh
  • While stream is running, set the value of the desired control, in your case isp_wb_b_gain, and read it to verify effects took place:

v4l2-ctl -d /dev/video4 -c isp_wb_b_gain=800

v4l2-ctl -d /dev/video4 -C isp_wb_b_gain

Please note, that disabling the auto white balance will effectively set the value of all three of the following to zero:
isp_wb_r_gain
isp_wb_g_gain
isp_wb_b_gain

So you may want to set some values for the other channels as well, in order for the picture not to be entirely blue.