diff options
author | Erik Andr?n <erik.andren@gmail.com> | 2009-01-16 07:48:15 +0100 |
---|---|---|
committer | Erik Andr?n <erik.andren@gmail.com> | 2009-01-16 07:48:15 +0100 |
commit | c4d8c702fced188accdc9581c1eb3f1d11e384be (patch) | |
tree | d03f855bd9e550962d34dcd15cf8dad26df6e879 /linux/drivers/media/video | |
parent | 34b6351b97b8c11c0b43a0e24bf4f547b95eae50 (diff) | |
download | mediapointer-dvb-s2-c4d8c702fced188accdc9581c1eb3f1d11e384be.tar.gz mediapointer-dvb-s2-c4d8c702fced188accdc9581c1eb3f1d11e384be.tar.bz2 |
gspca - m5602-po1030: Impove the bridge vsync/hsync configuration
From: Erik Andr?n <erik.andren@gmail.com>
Priority: normal
Signed-off-by: Erik Andr?n <erik.andren@gmail.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/gspca/m5602/m5602_po1030.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_po1030.c b/linux/drivers/media/video/gspca/m5602/m5602_po1030.c index 9e9eed89e..5b9113325 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_po1030.c +++ b/linux/drivers/media/video/gspca/m5602/m5602_po1030.c @@ -367,11 +367,6 @@ int po1030_start(struct sd *sd) break; case 640: - data = 0; - err = m5602_write_sensor(sd, PO1030_CONTROL3, &data, 1); - if (err < 0) - return err; - data = ((width + 7) >> 8) & 0xff; err = m5602_write_sensor(sd, PO1030_WINDOWWIDTH_H, &data, 1); if (err < 0) @@ -394,6 +389,9 @@ int po1030_start(struct sd *sd) width -= 2; break; } + err = m5602_write_bridge(sd, M5602_XB_SENSOR_TYPE, 0x0c); + if (err < 0) + return err; err = m5602_write_bridge(sd, M5602_XB_LINE_OF_FRAME_H, 0x81); if (err < 0) @@ -403,6 +401,10 @@ int po1030_start(struct sd *sd) if (err < 0) return err; + err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0x01); + if (err < 0) + return err; + err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, ((ver_offs >> 8) & 0xff)); if (err < 0) @@ -412,7 +414,8 @@ int po1030_start(struct sd *sd) if (err < 0) return err; - err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0); + for (i = 0; i < 2 && !err; i++) + err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0); if (err < 0) return err; @@ -428,6 +431,9 @@ int po1030_start(struct sd *sd) err = m5602_write_bridge(sd, M5602_XB_VSYNC_PARA, 0); for (i = 0; i < 2 && !err; i++) + err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0); + + for (i = 0; i < 2 && !err; i++) err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, 0); if (err < 0) return err; @@ -437,6 +443,10 @@ int po1030_start(struct sd *sd) return err; err = m5602_write_bridge(sd, M5602_XB_HSYNC_PARA, (width & 0xff)); + if (err < 0) + return err; + + err = m5602_write_bridge(sd, M5602_XB_SIG_INI, 0); return err; } |