How to enable sensor gain with decimal for v4l2 driver v1.0?

We using v4l2 driver v1.0.

How to set device tree, to enable gain with decimal, such as gain=1.68?


Have a check the programing guide.

Hi, ShaneCCC:

  1. Does v4l2 driver v1.0 support gain with decimal? By my test, when setting gain with decimal(like 1.4), it always round to integer…

  2. I’m not sure about following words in programming guide:

Minimum gain limit for the mode. The value is rounded down to six decimal places. Usually set to 1.0, representing 1x gain.


May be the gain_factor incorrect.

Does driver v1.0 support gain_factor?
Is seems within “Property-Value Pairs (Version 2.0 Only)” parts.


Then why upgrade to new version.

It’s legacy source-code.

I want to make sure if driver 1.0 only support integer gain?


It’s floating point value it can be set as 1.3x

But the TEGRA_CAMERA_CID_GAIN use s64 as parameter…


Have a reference to imx185_v1.c for the detail.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.