aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/gspca/sonixb.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c
index 7099c3770b3e..d34d582e5f59 100644
--- a/drivers/media/video/gspca/sonixb.c
+++ b/drivers/media/video/gspca/sonixb.c
@@ -238,8 +238,15 @@ static const __u8 ov6650_sensor_init[][8] =
238 {0xd0, 0x60, 0x26, 0x01, 0x14, 0xd8, 0xa4, 0x10}, /* format out? */ 238 {0xd0, 0x60, 0x26, 0x01, 0x14, 0xd8, 0xa4, 0x10}, /* format out? */
239 {0xd0, 0x60, 0x26, 0x01, 0x14, 0xd8, 0xa4, 0x10}, 239 {0xd0, 0x60, 0x26, 0x01, 0x14, 0xd8, 0xa4, 0x10},
240 {0xa0, 0x60, 0x30, 0x3d, 0x0A, 0xd8, 0xa4, 0x10}, 240 {0xa0, 0x60, 0x30, 0x3d, 0x0A, 0xd8, 0xa4, 0x10},
241 /* Disable autobright ? */ 241 /* Enable rgb brightness control */
242 {0xb0, 0x60, 0x60, 0x66, 0x68, 0xd8, 0xa4, 0x10}, 242 {0xa0, 0x60, 0x61, 0x08, 0x00, 0x00, 0x00, 0x10},
243 /* HDG: Note windows uses the line below, which sets both register 0x60
244 and 0x61 I believe these registers of the ov6650 are identical as
245 those of the ov7630, because if this is true the windows settings
246 add a bit additional red gain and a lot additional blue gain, which
247 matches my findings that the windows settings make blue much too
248 blue and red a little too red.
249 {0xb0, 0x60, 0x60, 0x66, 0x68, 0xd8, 0xa4, 0x10}, */
243 /* Some more unknown stuff */ 250 /* Some more unknown stuff */
244 {0xa0, 0x60, 0x68, 0x04, 0x68, 0xd8, 0xa4, 0x10}, 251 {0xa0, 0x60, 0x68, 0x04, 0x68, 0xd8, 0xa4, 0x10},
245 {0xd0, 0x60, 0x17, 0x24, 0xd6, 0x04, 0x94, 0x10}, /* Clipreg */ 252 {0xd0, 0x60, 0x17, 0x24, 0xd6, 0x04, 0x94, 0x10}, /* Clipreg */
@@ -655,7 +662,8 @@ static void setexposure(struct gspca_dev *gspca_dev)
655 tline * 4 * reg10, which explains why the reg10max we've 662 tline * 4 * reg10, which explains why the reg10max we've
656 found experimentally for the ov6650 is exactly half that of 663 found experimentally for the ov6650 is exactly half that of
657 the ov6645. The ov7630 datasheet says the max is 0x41. */ 664 the ov6645. The ov7630 datasheet says the max is 0x41. */
658 const int reg10_max = (sd->sensor == SENSOR_OV6650)? 0x4d:0x41; 665 const int reg10_max = (sd->sensor == SENSOR_OV6650)
666 ? 0x4d : 0x41;
659 667
660 reg11 = (60 * sd->exposure + 999) / 1000; 668 reg11 = (60 * sd->exposure + 999) / 1000;
661 if (reg11 < 1) 669 if (reg11 < 1)
@@ -715,7 +723,8 @@ static void setfreq(struct gspca_dev *gspca_dev)
715 i2c[3] = 0; 723 i2c[3] = 0;
716 break; 724 break;
717 case 1: /* 50 hz */ 725 case 1: /* 50 hz */
718 i2c[3] = (sd->sensor == SENSOR_OV6650)? 0x4f:0x8a; 726 i2c[3] = (sd->sensor == SENSOR_OV6650)
727 ? 0x4f : 0x8a;
719 break; 728 break;
720 } 729 }
721 i2c[1] = sd->sensor_addr; 730 i2c[1] = sd->sensor_addr;
@@ -787,7 +796,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
787 sd->sensor = SENSOR_OV6650; 796 sd->sensor = SENSOR_OV6650;
788 sd->sensor_has_gain = 1; 797 sd->sensor_has_gain = 1;
789 sd->sensor_addr = 0x60; 798 sd->sensor_addr = 0x60;
790 sd->sd_desc.nctrls = 4; 799 sd->sd_desc.nctrls = 5;
791 sd->sd_desc.dq_callback = do_autogain; 800 sd->sd_desc.dq_callback = do_autogain;
792 sif = 1; 801 sif = 1;
793 break; 802 break;