Hello Nvidia,
nvcamera-daemon seemed to have problems with my 'Gain" implementation. It issued this error message : “Gain Control class inconsistent”. I now have changed it to use TEGRA_CAMERA_CID_GAIN instead of V4L2_CID_GAIN, added use_decibel_gain = “true”; to my sensor DT, but now nvcamera-daemon sets a not default value for gain at startup, and never recover from that : images stay white.
I have seen in the docs to description of TEGRA_CAMERA_CID_GAIN :
use_decibel_gain
Use this option for sensors that use decibels to represent the analog gain.
When set to true, the analog gain value received by the driver is expressed
in decibels (dB), based on the following conversion in the user mode library:
dB = 20 * log(Analog Gain)
TEGRA_CAMERA_CID_GAIN
32 Bit (deprecated)
Specifies the gain values from the user mode library. It uses 24.8 format (24 Bit integer, 8 Bit fraction) as default.
To change this format, adjust the min/max gain range in the driver.
Use the minimum gain value to determine how many bits of a fraction to use.
64 Bit
Specifies the gain values from the user mode library.
It uses 42.22 format (42 Bit integer, 22 Bit fraction). *
See imx185_set_gain function in imx185.c file
My sensor uses tenth of dB as gain unit and offers gain from 0 x 0,1 dB to 480 x 0,1 dB.
Which values must I expect to receive for 0 dB and 48 dB ?