Set gain to range 32-255 -> 100.000-796.875
This commit is contained in:
parent
6d982b1ebe
commit
71bc9b31dd
|
@ -93,18 +93,18 @@ i2c8 = "/i2c@31e0000";
|
||||||
csi_pixel_bit_depth = "12";
|
csi_pixel_bit_depth = "12";
|
||||||
mode_type = "bayer";
|
mode_type = "bayer";
|
||||||
pixel_phase = "rggb";
|
pixel_phase = "rggb";
|
||||||
readout_orientation = "0";
|
readout_orientation = "0";
|
||||||
line_length = "1650";
|
line_length = "1650";
|
||||||
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";
|
||||||
|
|
||||||
|
@ -132,18 +132,18 @@ i2c8 = "/i2c@31e0000";
|
||||||
csi_pixel_bit_depth = "12";
|
csi_pixel_bit_depth = "12";
|
||||||
mode_type = "bayer";
|
mode_type = "bayer";
|
||||||
pixel_phase = "rggb";
|
pixel_phase = "rggb";
|
||||||
readout_orientation = "0";
|
readout_orientation = "0";
|
||||||
line_length = "1650";
|
line_length = "1650";
|
||||||
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";
|
||||||
|
|
||||||
|
@ -220,18 +220,18 @@ i2c8 = "/i2c@31e0000";
|
||||||
csi_pixel_bit_depth = "12";
|
csi_pixel_bit_depth = "12";
|
||||||
mode_type = "bayer";
|
mode_type = "bayer";
|
||||||
pixel_phase = "rggb";
|
pixel_phase = "rggb";
|
||||||
readout_orientation = "0";
|
readout_orientation = "0";
|
||||||
line_length = "1650";
|
line_length = "1650";
|
||||||
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";
|
||||||
|
|
||||||
|
@ -259,18 +259,18 @@ i2c8 = "/i2c@31e0000";
|
||||||
csi_pixel_bit_depth = "12";
|
csi_pixel_bit_depth = "12";
|
||||||
mode_type = "bayer";
|
mode_type = "bayer";
|
||||||
pixel_phase = "rggb";
|
pixel_phase = "rggb";
|
||||||
readout_orientation = "0";
|
readout_orientation = "0";
|
||||||
line_length = "1650";
|
line_length = "1650";
|
||||||
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