summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sonixj.c
diff options
context:
space:
mode:
authorAmauri Magagna <amaurimagagna@gmail.com>2009-10-17 07:21:29 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 18:40:51 -0200
commit46b4f2ab5858de905a20389c32105fcee833e0d3 (patch)
tree273bb6285c9605d083934f95e708c7fe70da3f4e /drivers/media/video/gspca/sonixj.c
parentfdd1dd1d246e14dacd8fb0bf842828b03bed2481 (diff)
V4L/DVB (13197): gspca - sonixj: Adjust colors and autogain for sensor om6802.
- set correct colors at startup time - autogain was too slow (4-5 mn - now 15-30 s)) Signed-off-by: Amauri Magagna <amaurimagagna@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/sonixj.c')
-rw-r--r--drivers/media/video/gspca/sonixj.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c
index 33f4d0a1f6f..82604f328dc 100644
--- a/drivers/media/video/gspca/sonixj.c
+++ b/drivers/media/video/gspca/sonixj.c
@@ -346,7 +346,7 @@ static const u8 sn_mt9v111[0x1c] = {
static const u8 sn_om6802[0x1c] = {
/* reg0 reg1 reg2 reg3 reg4 reg5 reg6 reg7 */
- 0x00, 0x23, 0x72, 0x00, 0x1a, 0x34, 0x27, 0x20,
+ 0x00, 0x23, 0x72, 0x00, 0x1a, 0x20, 0x20, 0x19,
/* reg8 reg9 rega regb regc regd rege regf */
0x80, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* reg10 reg11 reg12 reg13 reg14 reg15 reg16 reg17 */
@@ -1987,11 +1987,19 @@ static void do_autogain(struct gspca_dev *gspca_dev)
sd->exposure = setexposure(gspca_dev,
(unsigned int) (expotimes << 8));
break;
+ case SENSOR_OM6802:
+ expotimes = sd->exposure;
+ expotimes += (luma_mean - delta) >> 2;
+ if (expotimes < 0)
+ expotimes = 0;
+ sd->exposure = setexposure(gspca_dev,
+ (unsigned int) expotimes);
+ setredblue(gspca_dev);
+ break;
default:
/* case SENSOR_MO4000: */
/* case SENSOR_MI0360: */
/* case SENSOR_MT9V111: */
-/* case SENSOR_OM6802: */
expotimes = sd->exposure;
expotimes += (luma_mean - delta) >> 6;
if (expotimes < 0)