diff options
author | Amauri Magagna <amaurimagagna@gmail.com> | 2009-10-17 06:21:29 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:40:51 -0500 |
commit | 46b4f2ab5858de905a20389c32105fcee833e0d3 (patch) | |
tree | 273bb6285c9605d083934f95e708c7fe70da3f4e /drivers/media/video/gspca/sonixj.c | |
parent | fdd1dd1d246e14dacd8fb0bf842828b03bed2481 (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.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 33f4d0a1f6fd..82604f328dc4 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] = { | |||
346 | 346 | ||
347 | static const u8 sn_om6802[0x1c] = { | 347 | static const u8 sn_om6802[0x1c] = { |
348 | /* reg0 reg1 reg2 reg3 reg4 reg5 reg6 reg7 */ | 348 | /* reg0 reg1 reg2 reg3 reg4 reg5 reg6 reg7 */ |
349 | 0x00, 0x23, 0x72, 0x00, 0x1a, 0x34, 0x27, 0x20, | 349 | 0x00, 0x23, 0x72, 0x00, 0x1a, 0x20, 0x20, 0x19, |
350 | /* reg8 reg9 rega regb regc regd rege regf */ | 350 | /* reg8 reg9 rega regb regc regd rege regf */ |
351 | 0x80, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 351 | 0x80, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
352 | /* reg10 reg11 reg12 reg13 reg14 reg15 reg16 reg17 */ | 352 | /* reg10 reg11 reg12 reg13 reg14 reg15 reg16 reg17 */ |
@@ -1987,11 +1987,19 @@ static void do_autogain(struct gspca_dev *gspca_dev) | |||
1987 | sd->exposure = setexposure(gspca_dev, | 1987 | sd->exposure = setexposure(gspca_dev, |
1988 | (unsigned int) (expotimes << 8)); | 1988 | (unsigned int) (expotimes << 8)); |
1989 | break; | 1989 | break; |
1990 | case SENSOR_OM6802: | ||
1991 | expotimes = sd->exposure; | ||
1992 | expotimes += (luma_mean - delta) >> 2; | ||
1993 | if (expotimes < 0) | ||
1994 | expotimes = 0; | ||
1995 | sd->exposure = setexposure(gspca_dev, | ||
1996 | (unsigned int) expotimes); | ||
1997 | setredblue(gspca_dev); | ||
1998 | break; | ||
1990 | default: | 1999 | default: |
1991 | /* case SENSOR_MO4000: */ | 2000 | /* case SENSOR_MO4000: */ |
1992 | /* case SENSOR_MI0360: */ | 2001 | /* case SENSOR_MI0360: */ |
1993 | /* case SENSOR_MT9V111: */ | 2002 | /* case SENSOR_MT9V111: */ |
1994 | /* case SENSOR_OM6802: */ | ||
1995 | expotimes = sd->exposure; | 2003 | expotimes = sd->exposure; |
1996 | expotimes += (luma_mean - delta) >> 6; | 2004 | expotimes += (luma_mean - delta) >> 6; |
1997 | if (expotimes < 0) | 2005 | if (expotimes < 0) |