This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] gspca - sonixj: Adjust autogain for sensor mt9v111
Author:  Jean-François Moine <[email protected]>
Date:    Thu Feb 10 07:49:32 2011 -0300

The gain/expo adjustment was too long.

Signed-off-by: Jean-François Moine <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/video/gspca/sonixj.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=a78564ec9567ae1bcc540a018ee5d5ea54a35ae4

diff --git a/drivers/media/video/gspca/sonixj.c 
b/drivers/media/video/gspca/sonixj.c
index 01ee39b..b7a7e96 100644
--- a/drivers/media/video/gspca/sonixj.c
+++ b/drivers/media/video/gspca/sonixj.c
@@ -1939,10 +1939,10 @@ static u32 setexposure(struct gspca_dev *gspca_dev,
                u8 expo_c1[] =
                        { 0xb1, 0x5c, 0x09, 0x00, 0x00, 0x00, 0x00, 0x10 };
 
-               if (expo > 0x0280)
-                       expo = 0x0280;
-               else if (expo < 0x0040)
-                       expo = 0x0040;
+               if (expo > 0x0390)
+                       expo = 0x0390;
+               else if (expo < 0x0060)
+                       expo = 0x0060;
                expo_c1[3] = expo >> 8;
                expo_c1[4] = expo;
                i2c_w8(gspca_dev, expo_c1);
@@ -1999,10 +1999,13 @@ static void setbrightness(struct gspca_dev *gspca_dev)
                sd->exposure = setexposure(gspca_dev, expo);
                break;
        case SENSOR_GC0307:
-       case SENSOR_MT9V111:
                expo = brightness;
                sd->exposure = setexposure(gspca_dev, expo);
                return;                 /* don't set the Y offset */
+       case SENSOR_MT9V111:
+               expo = brightness << 2;
+               sd->exposure = setexposure(gspca_dev, expo);
+               return;                 /* don't set the Y offset */
        case SENSOR_OM6802:
                expo = brightness << 2;
                sd->exposure = setexposure(gspca_dev, expo);
@@ -2750,6 +2753,7 @@ static void do_autogain(struct gspca_dev *gspca_dev)
                                        (unsigned int) (expotimes << 8));
                        break;
                case SENSOR_OM6802:
+               case SENSOR_MT9V111:
                        expotimes = sd->exposure;
                        expotimes += (luma_mean - delta) >> 2;
                        if (expotimes < 0)
@@ -2762,7 +2766,6 @@ static void do_autogain(struct gspca_dev *gspca_dev)
 /*             case SENSOR_MO4000: */
 /*             case SENSOR_MI0360: */
 /*             case SENSOR_MI0360B: */
-/*             case SENSOR_MT9V111: */
                        expotimes = sd->exposure;
                        expotimes += (luma_mean - delta) >> 6;
                        if (expotimes < 0)

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to