Commit 92777460 authored by Erik Andr?n's avatar Erik Andr?n Committed by Mauro Carvalho Chehab

V4L/DVB (11538): gscpa - m5602-ov9650: Add defines for some magic constants

Replaces some magic constants with the defines. Remove a couple of bits that should be set later in the process depending on the v4l2 ctrl.
Signed-off-by: default avatarErik Andr?n <erik.andren@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 894e4087
...@@ -120,6 +120,10 @@ ...@@ -120,6 +120,10 @@
#define OV9650_SOFT_SLEEP (1 << 4) #define OV9650_SOFT_SLEEP (1 << 4)
#define OV9650_OUTPUT_DRIVE_2X (1 << 0) #define OV9650_OUTPUT_DRIVE_2X (1 << 0)
#define OV9650_DENOISE_ENABLE (1 << 5)
#define OV9650_WHITE_PIXEL_ENABLE (1 << 1)
#define OV9650_WHITE_PIXEL_OPTION (1 << 0)
#define OV9650_LEFT_OFFSET 0x62 #define OV9650_LEFT_OFFSET 0x62
#define GAIN_DEFAULT 0x14 #define GAIN_DEFAULT 0x14
...@@ -198,7 +202,7 @@ static const unsigned char init_ov9650[][3] = ...@@ -198,7 +202,7 @@ static const unsigned char init_ov9650[][3] =
/* Reset chip */ /* Reset chip */
{SENSOR, OV9650_COM7, OV9650_REGISTER_RESET}, {SENSOR, OV9650_COM7, OV9650_REGISTER_RESET},
/* One extra reset is needed in order to make the sensor behave /* One extra reset is needed in order to make the sensor behave
properly when resuming from ram */ properly when resuming from ram, could be a timing issue */
{SENSOR, OV9650_COM7, OV9650_REGISTER_RESET}, {SENSOR, OV9650_COM7, OV9650_REGISTER_RESET},
/* Enable double clock */ /* Enable double clock */
...@@ -208,8 +212,7 @@ static const unsigned char init_ov9650[][3] = ...@@ -208,8 +212,7 @@ static const unsigned char init_ov9650[][3] =
/* Set fast AGC/AEC algorithm with unlimited step size */ /* Set fast AGC/AEC algorithm with unlimited step size */
{SENSOR, OV9650_COM8, OV9650_FAST_AGC_AEC | {SENSOR, OV9650_COM8, OV9650_FAST_AGC_AEC |
OV9650_AEC_UNLIM_STEP_SIZE | OV9650_AEC_UNLIM_STEP_SIZE},
OV9650_AWB_EN | OV9650_AGC_EN},
{SENSOR, OV9650_CHLF, 0x10}, {SENSOR, OV9650_CHLF, 0x10},
{SENSOR, OV9650_ARBLM, 0xbf}, {SENSOR, OV9650_ARBLM, 0xbf},
...@@ -280,8 +283,11 @@ static const unsigned char init_ov9650[][3] = ...@@ -280,8 +283,11 @@ static const unsigned char init_ov9650[][3] =
{SENSOR, OV9650_VREF, 0x10}, {SENSOR, OV9650_VREF, 0x10},
{SENSOR, OV9650_ADC, 0x04}, {SENSOR, OV9650_ADC, 0x04},
{SENSOR, OV9650_HV, 0x40}, {SENSOR, OV9650_HV, 0x40},
/* Enable denoise, and white-pixel erase */ /* Enable denoise, and white-pixel erase */
{SENSOR, OV9650_COM22, 0x23}, {SENSOR, OV9650_COM22, OV9650_DENOISE_ENABLE |
OV9650_WHITE_PIXEL_ENABLE |
OV9650_WHITE_PIXEL_OPTION},
/* Enable VARIOPIXEL */ /* Enable VARIOPIXEL */
{SENSOR, OV9650_COM3, OV9650_VARIOPIXEL}, {SENSOR, OV9650_COM3, OV9650_VARIOPIXEL},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment