summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/sonixj.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-02-01 18:48:55 +0100
committerJean-Francois Moine <moinejf@free.fr>2009-02-01 18:48:55 +0100
commit8e4ca258fea621ae40f8e7b33299147fda22c2c9 (patch)
treecc2650b9b52cca9bad32370dab60165ca10cc7aa /linux/drivers/media/video/gspca/sonixj.c
parente659d45f04c7de45057e9c86a93c7ca906027026 (diff)
downloadmediapointer-dvb-s2-8e4ca258fea621ae40f8e7b33299147fda22c2c9.tar.gz
mediapointer-dvb-s2-8e4ca258fea621ae40f8e7b33299147fda22c2c9.tar.bz2
gspca - sonixj: Adjust some exchanges with the sensor mt9v111.
From: Jean-Francois Moine <moinejf@free.fr> This patch also enables the autogain for the mt9v111. Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca/sonixj.c')
-rw-r--r--linux/drivers/media/video/gspca/sonixj.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/linux/drivers/media/video/gspca/sonixj.c b/linux/drivers/media/video/gspca/sonixj.c
index 1d33e80a1..0aa4649bd 100644
--- a/linux/drivers/media/video/gspca/sonixj.c
+++ b/linux/drivers/media/video/gspca/sonixj.c
@@ -234,7 +234,11 @@ static __u32 ctrl_dis[] = {
/* SENSOR_MI0360 1 */
(1 << INFRARED_IDX) | (1 << VFLIP_IDX),
/* SENSOR_MO4000 2 */
+#if 1
+ 0,
+#else
(1 << AUTOGAIN_IDX),
+#endif
/* SENSOR_MT9V111 3 */
(1 << INFRARED_IDX) | (1 << VFLIP_IDX),
/* SENSOR_OM6802 4 */
@@ -517,8 +521,18 @@ static const u8 mt9v111_sensor_init[][8] = {
{0xb1, 0x5c, 0x01, 0x00, 0x01, 0x00, 0x00, 0x10}, /* IFP select */
{0xb1, 0x5c, 0x08, 0x04, 0x80, 0x00, 0x00, 0x10}, /* output fmt ctrl */
{0xb1, 0x5c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x10}, /* op mode ctrl */
+ {0xb1, 0x5c, 0x02, 0x00, 0x16, 0x00, 0x00, 0x10},
+ {0xb1, 0x5c, 0x03, 0x01, 0xe1, 0x00, 0x00, 0x10},
+ {0xb1, 0x5c, 0x04, 0x02, 0x81, 0x00, 0x00, 0x10},
+ {0xb1, 0x5c, 0x05, 0x00, 0x04, 0x00, 0x00, 0x10},
{0xb1, 0x5c, 0x01, 0x00, 0x04, 0x00, 0x00, 0x10}, /* sensor select */
+ {0xb1, 0x5c, 0x02, 0x00, 0x16, 0x00, 0x00, 0x10},
+ {0xb1, 0x5c, 0x03, 0x01, 0xe6, 0x00, 0x00, 0x10},
+ {0xb1, 0x5c, 0x04, 0x02, 0x86, 0x00, 0x00, 0x10},
+ {0xb1, 0x5c, 0x05, 0x00, 0x04, 0x00, 0x00, 0x10},
+ {0xb1, 0x5c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x10},
{0xb1, 0x5c, 0x08, 0x00, 0x08, 0x00, 0x00, 0x10}, /* row start */
+ {0xb1, 0x5c, 0x0e, 0x00, 0x08, 0x00, 0x00, 0x10},
{0xb1, 0x5c, 0x02, 0x00, 0x16, 0x00, 0x00, 0x10}, /* col start */
{0xb1, 0x5c, 0x03, 0x01, 0xe7, 0x00, 0x00, 0x10}, /* window height */
{0xb1, 0x5c, 0x04, 0x02, 0x87, 0x00, 0x00, 0x10}, /* window width */
@@ -532,7 +546,11 @@ static const u8 mt9v111_sensor_init[][8] = {
/*******/
{0xb1, 0x5c, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10},
{0xb1, 0x5c, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10},
+#if 1
+ {0xb1, 0x5c, 0x09, 0x01, 0x2c, 0x00, 0x00, 0x10},
+#else
{0xb1, 0x5c, 0x09, 0x00, 0x64, 0x00, 0x00, 0x10}, /* shutter width */
+#endif
{0xd1, 0x5c, 0x2b, 0x00, 0x33, 0x00, 0xa0, 0x10}, /* green1 gain */
{0xd1, 0x5c, 0x2d, 0x00, 0xa0, 0x00, 0x33, 0x10}, /* red gain */
/*******/
@@ -1714,7 +1732,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
reg1 = 0x04; /* 320 clk 48Mhz */
} else {
/* reg1 = 0x06; * 640 clk 24Mz (done) */
- reg17 = 0xe2;
+ reg17 = 0xc2;
}
break;
case SENSOR_OM6802: