diff options
author | Erik Andr?n <erik.andren@gmail.com> | 2009-01-13 14:24:19 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:32 -0400 |
commit | 71c6e59d474ed8608b4e5aa998bec47b46c44a93 (patch) | |
tree | cab4182e26ab8c6b0ee9d62fe5ad0e1dff55d465 /drivers/media/video/gspca | |
parent | a68985d46962305f537380a572903fb78dbe207c (diff) |
V4L/DVB (11528): gspca - m5602-s5k4aa: Consolidate the gain settings, adjust row start
Signed-off-by: Erik Andr?n <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k4aa.c | 2 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k4aa.h | 14 |
2 files changed, 5 insertions, 11 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index 317bc32e758d..3a3df102637f 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c | |||
@@ -111,7 +111,7 @@ const static struct ctrl s5k4aa_ctrls[] = { | |||
111 | .minimum = 0, | 111 | .minimum = 0, |
112 | .maximum = 127, | 112 | .maximum = 127, |
113 | .step = 1, | 113 | .step = 1, |
114 | .default_value = 0xa0, | 114 | .default_value = DEFAULT_GAIN_2, |
115 | .flags = V4L2_CTRL_FLAG_SLIDER | 115 | .flags = V4L2_CTRL_FLAG_SLIDER |
116 | }, | 116 | }, |
117 | .set = s5k4aa_set_gain, | 117 | .set = s5k4aa_set_gain, |
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h b/drivers/media/video/gspca/m5602/m5602_s5k4aa.h index 7a8da1dc443d..fbcb9c1e8c9d 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.h | |||
@@ -57,6 +57,8 @@ | |||
57 | #define S5K4AA_RM_H_FLIP 0x40 | 57 | #define S5K4AA_RM_H_FLIP 0x40 |
58 | #define S5K4AA_RM_V_FLIP 0x80 | 58 | #define S5K4AA_RM_V_FLIP 0x80 |
59 | 59 | ||
60 | #define DEFAULT_GAIN_2 0x5f | ||
61 | |||
60 | /*****************************************************************************/ | 62 | /*****************************************************************************/ |
61 | 63 | ||
62 | /* Kernel module parameters */ | 64 | /* Kernel module parameters */ |
@@ -171,9 +173,6 @@ static const unsigned char init_s5k4aa[][4] = | |||
171 | {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, | 173 | {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, |
172 | {SENSOR, 0x0c, 0x05, 0x00}, | 174 | {SENSOR, 0x0c, 0x05, 0x00}, |
173 | {SENSOR, 0x02, 0x0e, 0x00}, | 175 | {SENSOR, 0x02, 0x0e, 0x00}, |
174 | {SENSOR, S5K4AA_GAIN_1, 0x0f, 0x00}, | ||
175 | {SENSOR, S5K4AA_GAIN_2, 0x00, 0x00}, | ||
176 | {SENSOR, S5K4AA_GLOBAL_GAIN__, 0x01, 0x00}, | ||
177 | {SENSOR, 0x11, 0x00, 0x00}, | 176 | {SENSOR, 0x11, 0x00, 0x00}, |
178 | {SENSOR, 0x12, 0x00, 0x00}, | 177 | {SENSOR, 0x12, 0x00, 0x00}, |
179 | {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, | 178 | {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, |
@@ -247,9 +246,6 @@ static const unsigned char init_s5k4aa[][4] = | |||
247 | {SENSOR, 0x12, 0xc3, 0x00}, | 246 | {SENSOR, 0x12, 0xc3, 0x00}, |
248 | {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, | 247 | {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, |
249 | {SENSOR, 0x02, 0x0e, 0x00}, | 248 | {SENSOR, 0x02, 0x0e, 0x00}, |
250 | {SENSOR_LONG, S5K4AA_GLOBAL_GAIN__, 0x0f, 0x00}, | ||
251 | {SENSOR, S5K4AA_GAIN_1, 0x0b, 0x00}, | ||
252 | {SENSOR, S5K4AA_GAIN_2, 0xa0, 0x00} | ||
253 | }; | 249 | }; |
254 | 250 | ||
255 | static const unsigned char VGA_s5k4aa[][4] = | 251 | static const unsigned char VGA_s5k4aa[][4] = |
@@ -289,7 +285,7 @@ static const unsigned char VGA_s5k4aa[][4] = | |||
289 | {SENSOR, 0x37, 0x01, 0x00}, | 285 | {SENSOR, 0x37, 0x01, 0x00}, |
290 | /* ROWSTART_HI, ROWSTART_LO : 10 + (1024-960)/2 = 42 = 0x002a */ | 286 | /* ROWSTART_HI, ROWSTART_LO : 10 + (1024-960)/2 = 42 = 0x002a */ |
291 | {SENSOR, S5K4AA_ROWSTART_HI, 0x00, 0x00}, | 287 | {SENSOR, S5K4AA_ROWSTART_HI, 0x00, 0x00}, |
292 | {SENSOR, S5K4AA_ROWSTART_LO, 0x2a, 0x00}, | 288 | {SENSOR, S5K4AA_ROWSTART_LO, 0x29, 0x00}, |
293 | {SENSOR, S5K4AA_COLSTART_HI, 0x00, 0x00}, | 289 | {SENSOR, S5K4AA_COLSTART_HI, 0x00, 0x00}, |
294 | {SENSOR, S5K4AA_COLSTART_LO, 0x0c, 0x00}, | 290 | {SENSOR, S5K4AA_COLSTART_LO, 0x0c, 0x00}, |
295 | /* window_height_hi, window_height_lo : 960 = 0x03c0 */ | 291 | /* window_height_hi, window_height_lo : 960 = 0x03c0 */ |
@@ -306,9 +302,7 @@ static const unsigned char VGA_s5k4aa[][4] = | |||
306 | {SENSOR, 0x12, 0xc3, 0x00}, | 302 | {SENSOR, 0x12, 0xc3, 0x00}, |
307 | {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, | 303 | {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, |
308 | {SENSOR, 0x02, 0x0e, 0x00}, | 304 | {SENSOR, 0x02, 0x0e, 0x00}, |
309 | {SENSOR_LONG, S5K4AA_GLOBAL_GAIN__, 0x0f, 0x00}, | 305 | {SENSOR, S5K4AA_GAIN_1, 0x10, 0x00}, |
310 | {SENSOR, S5K4AA_GAIN_1, 0x0b, 0x00}, | ||
311 | {SENSOR, S5K4AA_GAIN_2, 0xa0, 0x00} | ||
312 | }; | 306 | }; |
313 | 307 | ||
314 | #endif | 308 | #endif |