I am using LI-IMX185 on Jetson Xavier to build my own imaging pipeline from sensor output to RGB images. Due to specific technique requirements, I need the sensor output to have max analog gain and no digital gain.
Based on the IMX185 sensor documents from Sony, the gain setting of IMX185 has following meaning:
So theoretically, when I set the gain to be 24 dB (which should be 240 in V4L2 since the gain factor is 10), I should have normal sensor output (RAW image) with max analog gain and no digital gain (no data quantization in terms of histogram).
But when I finish the driver installation (from Leopard Imaging) and test the camera, it surprises me because when I set the gain to be 240 (24 dB) and the captured data seems are quantized with step size equals 9 or 10. For exmaple, the max pixel value in 12 bit mode is 4095, and the next biggest pixel value becomes 4085 instead of 4094, and so on.
To solve this issue, I checked the patch file (from Leopard Imaging) carefully and found this function:
Seems the analog gain is limited for some reason. The problem is even when I turn this function off, nothing changes. Looks like it is related to kernel/nvidia/drivers/media/i2c/imx185.c .
Can someone help me to remove this limit of analog gain so that the gain setting can work as it should ?
Quad_streaming_IMX185-MIPI_base32.1_Xavier_EVA_dts_20190617.patch (49.6 KB)
imx185.c (20.8 KB)