Set gain to range 32-255 -> 100.000-796.875
This commit is contained in:
parent
6d982b1ebe
commit
71bc9b31dd
|
@ -98,13 +98,13 @@ i2c8 = "/i2c@31e0000";
|
||||||
inherent_gain = "1";
|
inherent_gain = "1";
|
||||||
pix_clk_hz = "74250000";
|
pix_clk_hz = "74250000";
|
||||||
|
|
||||||
gain_factor = "3";
|
gain_factor = "3125";
|
||||||
framerate_factor = "1000000";
|
framerate_factor = "1000000";
|
||||||
exposure_factor = "1000000";
|
exposure_factor = "1000000";
|
||||||
min_gain_val = "96"; /* 1x */
|
min_gain_val = "100000"; /* 1x */
|
||||||
max_gain_val = "765"; /* 7.97x */
|
max_gain_val = "796875"; /* 7.97x */
|
||||||
step_gain_val = "1";
|
step_gain_val = "1";
|
||||||
default_gain = "96"; /* 1x */
|
default_gain = "100000"; /* 1x */
|
||||||
min_hdr_ratio = "1";
|
min_hdr_ratio = "1";
|
||||||
max_hdr_ratio = "1";
|
max_hdr_ratio = "1";
|
||||||
|
|
||||||
|
@ -137,13 +137,13 @@ i2c8 = "/i2c@31e0000";
|
||||||
inherent_gain = "1";
|
inherent_gain = "1";
|
||||||
pix_clk_hz = "74250000";
|
pix_clk_hz = "74250000";
|
||||||
|
|
||||||
gain_factor = "3";
|
gain_factor = "3125";
|
||||||
framerate_factor = "1000000";
|
framerate_factor = "1000000";
|
||||||
exposure_factor = "1000000";
|
exposure_factor = "1000000";
|
||||||
min_gain_val = "96"; /* 1x */
|
min_gain_val = "100000"; /* 1x */
|
||||||
max_gain_val = "765"; /* 7.97x */
|
max_gain_val = "796875"; /* 7.97x */
|
||||||
step_gain_val = "1";
|
step_gain_val = "1";
|
||||||
default_gain = "96"; /* 1x */
|
default_gain = "100000"; /* 1x */
|
||||||
min_hdr_ratio = "1";
|
min_hdr_ratio = "1";
|
||||||
max_hdr_ratio = "1";
|
max_hdr_ratio = "1";
|
||||||
|
|
||||||
|
@ -225,13 +225,13 @@ i2c8 = "/i2c@31e0000";
|
||||||
inherent_gain = "1";
|
inherent_gain = "1";
|
||||||
pix_clk_hz = "74250000";
|
pix_clk_hz = "74250000";
|
||||||
|
|
||||||
gain_factor = "3";
|
gain_factor = "3125";
|
||||||
framerate_factor = "1000000";
|
framerate_factor = "1000000";
|
||||||
exposure_factor = "1000000";
|
exposure_factor = "1000000";
|
||||||
min_gain_val = "96"; /* 1x */
|
min_gain_val = "100000"; /* 1x */
|
||||||
max_gain_val = "765"; /* 7.97x */
|
max_gain_val = "796875"; /* 7.97x */
|
||||||
step_gain_val = "1";
|
step_gain_val = "1";
|
||||||
default_gain = "96"; /* 1x */
|
default_gain = "100000"; /* 1x */
|
||||||
min_hdr_ratio = "1";
|
min_hdr_ratio = "1";
|
||||||
max_hdr_ratio = "1";
|
max_hdr_ratio = "1";
|
||||||
|
|
||||||
|
@ -264,13 +264,13 @@ i2c8 = "/i2c@31e0000";
|
||||||
inherent_gain = "1";
|
inherent_gain = "1";
|
||||||
pix_clk_hz = "74250000";
|
pix_clk_hz = "74250000";
|
||||||
|
|
||||||
gain_factor = "3";
|
gain_factor = "3125";
|
||||||
framerate_factor = "1000000";
|
framerate_factor = "1000000";
|
||||||
exposure_factor = "1000000";
|
exposure_factor = "1000000";
|
||||||
min_gain_val = "96"; /* 1x */
|
min_gain_val = "100000"; /* 1x */
|
||||||
max_gain_val = "765"; /* 7.97x */
|
max_gain_val = "796875"; /* 7.97x */
|
||||||
step_gain_val = "1";
|
step_gain_val = "1";
|
||||||
default_gain = "96"; /* 1x */
|
default_gain = "100000"; /* 1x */
|
||||||
min_hdr_ratio = "1";
|
min_hdr_ratio = "1";
|
||||||
max_hdr_ratio = "1";
|
max_hdr_ratio = "1";
|
||||||
|
|
||||||
|
|
|
@ -416,7 +416,7 @@ static int mt9m021_set_gain(struct tegracam_device *tc_dev, s64 val)
|
||||||
* gain_factor = 3
|
* gain_factor = 3
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
gain = val / 3;
|
gain = val / 3125;
|
||||||
|
|
||||||
/* Update global gain */
|
/* Update global gain */
|
||||||
err = mt9m021_write_reg16(s_data, MT9M021_GLOBAL_GAIN, gain);
|
err = mt9m021_write_reg16(s_data, MT9M021_GLOBAL_GAIN, gain);
|
||||||
|
|
Loading…
Reference in New Issue