diff options
author | Erik Andr?n <erik.andren@gmail.com> | 2009-01-18 13:21:07 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:34 -0400 |
commit | 927774605ab4771c67763a7b133e8d84b524489d (patch) | |
tree | 691abcefac0617298cbdb33df05146be3f934018 /drivers | |
parent | 894e4087f015cef13a4ac52ea465ecd941118bad (diff) |
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: Erik Andr?n <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov9650.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.h b/drivers/media/video/gspca/m5602/m5602_ov9650.h index e0ba41870a4f..27fe54204c45 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov9650.h +++ b/drivers/media/video/gspca/m5602/m5602_ov9650.h | |||
@@ -120,6 +120,10 @@ | |||
120 | #define OV9650_SOFT_SLEEP (1 << 4) | 120 | #define OV9650_SOFT_SLEEP (1 << 4) |
121 | #define OV9650_OUTPUT_DRIVE_2X (1 << 0) | 121 | #define OV9650_OUTPUT_DRIVE_2X (1 << 0) |
122 | 122 | ||
123 | #define OV9650_DENOISE_ENABLE (1 << 5) | ||
124 | #define OV9650_WHITE_PIXEL_ENABLE (1 << 1) | ||
125 | #define OV9650_WHITE_PIXEL_OPTION (1 << 0) | ||
126 | |||
123 | #define OV9650_LEFT_OFFSET 0x62 | 127 | #define OV9650_LEFT_OFFSET 0x62 |
124 | 128 | ||
125 | #define GAIN_DEFAULT 0x14 | 129 | #define GAIN_DEFAULT 0x14 |
@@ -198,7 +202,7 @@ static const unsigned char init_ov9650[][3] = | |||
198 | /* Reset chip */ | 202 | /* Reset chip */ |
199 | {SENSOR, OV9650_COM7, OV9650_REGISTER_RESET}, | 203 | {SENSOR, OV9650_COM7, OV9650_REGISTER_RESET}, |
200 | /* One extra reset is needed in order to make the sensor behave | 204 | /* One extra reset is needed in order to make the sensor behave |
201 | properly when resuming from ram */ | 205 | properly when resuming from ram, could be a timing issue */ |
202 | {SENSOR, OV9650_COM7, OV9650_REGISTER_RESET}, | 206 | {SENSOR, OV9650_COM7, OV9650_REGISTER_RESET}, |
203 | 207 | ||
204 | /* Enable double clock */ | 208 | /* Enable double clock */ |
@@ -208,8 +212,7 @@ static const unsigned char init_ov9650[][3] = | |||
208 | 212 | ||
209 | /* Set fast AGC/AEC algorithm with unlimited step size */ | 213 | /* Set fast AGC/AEC algorithm with unlimited step size */ |
210 | {SENSOR, OV9650_COM8, OV9650_FAST_AGC_AEC | | 214 | {SENSOR, OV9650_COM8, OV9650_FAST_AGC_AEC | |
211 | OV9650_AEC_UNLIM_STEP_SIZE | | 215 | OV9650_AEC_UNLIM_STEP_SIZE}, |
212 | OV9650_AWB_EN | OV9650_AGC_EN}, | ||
213 | 216 | ||
214 | {SENSOR, OV9650_CHLF, 0x10}, | 217 | {SENSOR, OV9650_CHLF, 0x10}, |
215 | {SENSOR, OV9650_ARBLM, 0xbf}, | 218 | {SENSOR, OV9650_ARBLM, 0xbf}, |
@@ -280,8 +283,11 @@ static const unsigned char init_ov9650[][3] = | |||
280 | {SENSOR, OV9650_VREF, 0x10}, | 283 | {SENSOR, OV9650_VREF, 0x10}, |
281 | {SENSOR, OV9650_ADC, 0x04}, | 284 | {SENSOR, OV9650_ADC, 0x04}, |
282 | {SENSOR, OV9650_HV, 0x40}, | 285 | {SENSOR, OV9650_HV, 0x40}, |
286 | |||
283 | /* Enable denoise, and white-pixel erase */ | 287 | /* Enable denoise, and white-pixel erase */ |
284 | {SENSOR, OV9650_COM22, 0x23}, | 288 | {SENSOR, OV9650_COM22, OV9650_DENOISE_ENABLE | |
289 | OV9650_WHITE_PIXEL_ENABLE | | ||
290 | OV9650_WHITE_PIXEL_OPTION}, | ||
285 | 291 | ||
286 | /* Enable VARIOPIXEL */ | 292 | /* Enable VARIOPIXEL */ |
287 | {SENSOR, OV9650_COM3, OV9650_VARIOPIXEL}, | 293 | {SENSOR, OV9650_COM3, OV9650_VARIOPIXEL}, |