aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-09-03 16:12:18 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-03 17:37:41 -0400
commit91de65ac00f976c972940bedd9dbfe38bb8bfec3 (patch)
tree7cc368536cbe96eacf29d57fad274b7f8db13a96 /drivers/media/video
parent038ec7c772cb093411b163c22f389787722cfd8e (diff)
V4L/DVB (8828): gspca: Set the clock at the end of initialization 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')
-rw-r--r--drivers/media/video/gspca/sonixj.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c
index 5380b4323a70..feb17dbdd7b3 100644
--- a/drivers/media/video/gspca/sonixj.c
+++ b/drivers/media/video/gspca/sonixj.c
@@ -444,7 +444,7 @@ static const __u8 ov7630_sensor_init[][8] = {
444 {0xa1, 0x21, 0x2b, 0x34, 0x00, 0x00, 0x00, 0x10}, 444 {0xa1, 0x21, 0x2b, 0x34, 0x00, 0x00, 0x00, 0x10},
445/* */ 445/* */
446 {0xa1, 0x21, 0x10, 0x83, 0x00, 0x00, 0x00, 0x10}, 446 {0xa1, 0x21, 0x10, 0x83, 0x00, 0x00, 0x00, 0x10},
447 {0xb1, 0x21, 0x01, 0x88, 0x70, 0x00, 0x00, 0x10}, 447/* {0xb1, 0x21, 0x01, 0x88, 0x70, 0x00, 0x00, 0x10}, */
448 {} 448 {}
449}; 449};
450static const __u8 ov7660_sensor_init[][8] = { 450static const __u8 ov7660_sensor_init[][8] = {
@@ -811,6 +811,13 @@ static int configure_gpio(struct gspca_dev *gspca_dev,
811 reg_w1(gspca_dev, 0x17, 0xae); 811 reg_w1(gspca_dev, 0x17, 0xae);
812 reg_w1(gspca_dev, 0x01, 0x42); 812 reg_w1(gspca_dev, 0x01, 0x42);
813 break; 813 break;
814/*jfm: from win trace */
815 case SENSOR_OV7660:
816 reg_w1(gspca_dev, 0x01, 0x61);
817 reg_w1(gspca_dev, 0x17, 0x20);
818 reg_w1(gspca_dev, 0x01, 0x60);
819 reg_w1(gspca_dev, 0x01, 0x40);
820 break;
814 default: 821 default:
815 reg_w1(gspca_dev, 0x01, 0x43); 822 reg_w1(gspca_dev, 0x01, 0x43);
816 reg_w1(gspca_dev, 0x17, 0x61); 823 reg_w1(gspca_dev, 0x17, 0x61);
@@ -1076,7 +1083,7 @@ static void setbrightcont(struct gspca_dev *gspca_dev)
1076{ 1083{
1077 struct sd *sd = (struct sd *) gspca_dev; 1084 struct sd *sd = (struct sd *) gspca_dev;
1078 unsigned val; 1085 unsigned val;
1079 __u8 reg84_full[13]; 1086 __u8 reg84_full[0x15];
1080 1087
1081 memset(reg84_full, 0, sizeof reg84_full); 1088 memset(reg84_full, 0, sizeof reg84_full);
1082 val = sd->contrast * 0x20 / CONTRAST_MAX + 0x10; /* 10..30 */ 1089 val = sd->contrast * 0x20 / CONTRAST_MAX + 0x10; /* 10..30 */
@@ -1088,7 +1095,7 @@ static void setbrightcont(struct gspca_dev *gspca_dev)
1088 / BRIGHTNESS_MAX; 1095 / BRIGHTNESS_MAX;
1089 else 1096 else
1090 val = 0; 1097 val = 0;
1091 reg84_full[10] = val; /* 00..1f */ 1098 reg84_full[0x12] = val; /* 00..1f */
1092 reg_w(gspca_dev, 0x84, reg84_full, sizeof reg84_full); 1099 reg_w(gspca_dev, 0x84, reg84_full, sizeof reg84_full);
1093} 1100}
1094 1101
@@ -1184,7 +1191,6 @@ static void sd_start(struct gspca_dev *gspca_dev)
1184 sn9c1xx = sn_tb[(int) sd->sensor]; 1191 sn9c1xx = sn_tb[(int) sd->sensor];
1185 configure_gpio(gspca_dev, sn9c1xx); 1192 configure_gpio(gspca_dev, sn9c1xx);
1186 1193
1187/* reg_w1(gspca_dev, 0x01, 0x44); jfm from win trace*/
1188 reg_w1(gspca_dev, 0x15, sn9c1xx[0x15]); 1194 reg_w1(gspca_dev, 0x15, sn9c1xx[0x15]);
1189 reg_w1(gspca_dev, 0x16, sn9c1xx[0x16]); 1195 reg_w1(gspca_dev, 0x16, sn9c1xx[0x16]);
1190 reg_w1(gspca_dev, 0x12, sn9c1xx[0x12]); 1196 reg_w1(gspca_dev, 0x12, sn9c1xx[0x12]);
@@ -1300,7 +1306,6 @@ static void sd_start(struct gspca_dev *gspca_dev)
1300 reg_w1(gspca_dev, 0x18, reg18); 1306 reg_w1(gspca_dev, 0x18, reg18);
1301 1307
1302 reg_w1(gspca_dev, 0x17, reg17); 1308 reg_w1(gspca_dev, 0x17, reg17);
1303 reg_w1(gspca_dev, 0x01, reg1);
1304 switch (sd->sensor) { 1309 switch (sd->sensor) {
1305 case SENSOR_HV7131R: 1310 case SENSOR_HV7131R:
1306 case SENSOR_MI0360: 1311 case SENSOR_MI0360:
@@ -1314,6 +1319,7 @@ static void sd_start(struct gspca_dev *gspca_dev)
1314 break; 1319 break;
1315 } 1320 }
1316 setautogain(gspca_dev); 1321 setautogain(gspca_dev);
1322 reg_w1(gspca_dev, 0x01, reg1);
1317} 1323}
1318 1324
1319static void sd_stopN(struct gspca_dev *gspca_dev) 1325static void sd_stopN(struct gspca_dev *gspca_dev)