aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sonixj.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-09-03 15:48:01 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-03 17:36:49 -0400
commitd55b83d3c4558d0d118bf20ef3f1fa65b1c75c3d (patch)
tree2f8a2d0d37710538f1b932aa9c8091c3c50e7dd6 /drivers/media/video/gspca/sonixj.c
parent05b809c702bf297690c63ea78ee117c4dc909028 (diff)
V4L/DVB (8710): gspca: Bad color control in sonixj.
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, 7 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c
index b17aaa45270f..c34e02dccd5c 100644
--- a/drivers/media/video/gspca/sonixj.c
+++ b/drivers/media/video/gspca/sonixj.c
@@ -794,7 +794,7 @@ static int configure_gpio(struct gspca_dev *gspca_dev,
794 794
795 switch (sd->sensor) { 795 switch (sd->sensor) {
796 case SENSOR_OM6802: 796 case SENSOR_OM6802:
797 reg_w1(gspca_dev, 0x02, 0x71); 797 reg_w1(gspca_dev, 0x02, 0x73); /* was 71 */
798 reg_w1(gspca_dev, 0x01, 0x42); 798 reg_w1(gspca_dev, 0x01, 0x42);
799 reg_w1(gspca_dev, 0x17, 0x64); 799 reg_w1(gspca_dev, 0x17, 0x64);
800 reg_w1(gspca_dev, 0x01, 0x42); 800 reg_w1(gspca_dev, 0x01, 0x42);
@@ -1056,7 +1056,7 @@ static unsigned int setexposure(struct gspca_dev *gspca_dev,
1056 expo = 0x0001; 1056 expo = 0x0001;
1057 gainOm[3] = expo >> 2; 1057 gainOm[3] = expo >> 2;
1058 i2c_w8(gspca_dev, gainOm); 1058 i2c_w8(gspca_dev, gainOm);
1059 reg_w1(gspca_dev, 0x96, expo >> 5); 1059 reg_w1(gspca_dev, 0x96, (expo >> 5) & 0x1f);
1060 PDEBUG(D_CONF, "set exposure %d", gainOm[3]); 1060 PDEBUG(D_CONF, "set exposure %d", gainOm[3]);
1061 break; 1061 break;
1062 } 1062 }
@@ -1138,11 +1138,13 @@ static void setcolors(struct gspca_dev *gspca_dev)
1138 int colour; 1138 int colour;
1139 1139
1140 colour = sd->colors - 128; 1140 colour = sd->colors - 128;
1141 if (colour > 0) 1141 if (colour > 0) {
1142 data = (colour + 32) & 0x7f; /* blue */ 1142 data = (colour + 32) & 0x7f; /* blue */
1143 else 1143 reg_w1(gspca_dev, 0x06, data);
1144 } else {
1144 data = (-colour + 32) & 0x7f; /* red */ 1145 data = (-colour + 32) & 0x7f; /* red */
1145 reg_w1(gspca_dev, 0x05, data); 1146 reg_w1(gspca_dev, 0x05, data);
1147 }
1146} 1148}
1147 1149
1148static void setautogain(struct gspca_dev *gspca_dev) 1150static void setautogain(struct gspca_dev *gspca_dev)