summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/sonixj.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-10-02 13:06:59 +0200
committerJean-Francois Moine <moinejf@free.fr>2008-10-02 13:06:59 +0200
commit00e62c6f5fc6e951578281935ddfdc51cfd5a317 (patch)
tree842e5aedfe537c667ea56f62358f2eddf36e21d3 /linux/drivers/media/video/gspca/sonixj.c
parentda3df4c5ba560664e1ca1ef8c66b55ba67bf4f0f (diff)
downloadmediapointer-dvb-s2-00e62c6f5fc6e951578281935ddfdc51cfd5a317.tar.gz
mediapointer-dvb-s2-00e62c6f5fc6e951578281935ddfdc51cfd5a317.tar.bz2
gspca: Bad init values for sonixj ov7660.
From: Jean-Francois Moine <moinejf@free.fr> Priority: high 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.c38
1 files changed, 8 insertions, 30 deletions
diff --git a/linux/drivers/media/video/gspca/sonixj.c b/linux/drivers/media/video/gspca/sonixj.c
index 4cad52769..f5b6ab9e5 100644
--- a/linux/drivers/media/video/gspca/sonixj.c
+++ b/linux/drivers/media/video/gspca/sonixj.c
@@ -241,17 +241,6 @@ static const __u8 sn_ov7648[] = {
};
static const __u8 sn_ov7660[] = {
-#if 0
-/*jfm: from win trace */
-/* reg0 reg1 reg2 reg3 reg4 reg5 reg6 reg7 */
- 0x00, 0x61, 0x40, 0x00, 0x1a, 0x00, 0x00, 0x00,
-/* reg8 reg9 rega regb regc regd rege regf */
- 0x81, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-/* reg10 reg11 reg12 reg13 reg14 reg15 reg16 reg17 */
- 0x03, 0x00, 0x01, 0x01, 0x14, 0x28, 0x1e, 0x00,
-/* reg18 reg19 reg1a reg1b reg1c reg1d reg1e reg1f */
- 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-#else
/* reg0 reg1 reg2 reg3 reg4 reg5 reg6 reg7 */
0x00, 0x61, 0x40, 0x00, 0x1a, 0x20, 0x20, 0x20,
/* reg8 reg9 rega regb regc regd rege regf */
@@ -260,7 +249,6 @@ static const __u8 sn_ov7660[] = {
0x03, 0x00, 0x01, 0x01, 0x08, 0x28, 0x1e, 0x20,
/* reg18 reg19 reg1a reg1b reg1c reg1d reg1e reg1f */
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-#endif
};
/* sequence specific to the sensors - !! index = SENSOR_xxx */
@@ -1023,13 +1011,13 @@ static int sd_init(struct gspca_dev *gspca_dev)
case BRIDGE_SN9C105:
if (regF1 != 0x11)
return -ENODEV;
- reg_w(gspca_dev, 0x02, regGpio, 2);
+ reg_w(gspca_dev, 0x01, regGpio, 2);
break;
case BRIDGE_SN9C120:
if (regF1 != 0x12)
return -ENODEV;
regGpio[1] = 0x70;
- reg_w(gspca_dev, 0x02, regGpio, 2);
+ reg_w(gspca_dev, 0x01, regGpio, 2);
break;
default:
/* case BRIDGE_SN9C110: */
@@ -1243,7 +1231,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
static const __u8 CA[] = { 0x28, 0xd8, 0x14, 0xec };
static const __u8 CE[] = { 0x32, 0xdd, 0x2d, 0xdd }; /* MI0360 */
static const __u8 CE_ov76xx[] =
- { 0x32, 0xdd, 0x32, 0xdd }; /* OV7630/48 */
+ { 0x32, 0xdd, 0x32, 0xdd };
sn9c1xx = sn_tb[(int) sd->sensor];
configure_gpio(gspca_dev, sn9c1xx);
@@ -1285,20 +1273,15 @@ static int sd_start(struct gspca_dev *gspca_dev)
reg_w(gspca_dev, 0x20, gamma_def, sizeof gamma_def);
for (i = 0; i < 8; i++)
reg_w(gspca_dev, 0x84, reg84, sizeof reg84);
-#if 0
- switch (sd->bridge) {
- case BRIDGE_SN9C325:
- reg_w1(gspca_dev, 0x9a, 0x0a);
- reg_w1(gspca_dev, 0x99, 0x60);
+ switch (sd->sensor) {
+ case SENSOR_OV7660:
+ reg_w1(gspca_dev, 0x9a, 0x05);
break;
default:
-#endif
reg_w1(gspca_dev, 0x9a, 0x08);
reg_w1(gspca_dev, 0x99, 0x59);
-#if 0
break;
}
-#endif
mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
if (mode)
@@ -1350,14 +1333,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
/* reg1 = 0x44; */
/* reg1 = 0x46; (done) */
} else {
-#if 0
-/*jfm: from win trace */
reg17 = 0xa2; /* 640 */
- reg1 = 0x40;
-#else
- reg17 = 0x22; /* 640 MCKSIZE */
- reg1 = 0x06;
-#endif
+ reg1 = 0x44;
}
break;
}
@@ -1366,6 +1343,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
switch (sd->sensor) {
case SENSOR_OV7630:
case SENSOR_OV7648:
+ case SENSOR_OV7660:
reg_w(gspca_dev, 0xce, CE_ov76xx, 4);
break;
default: