summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-06-14 11:26:49 +0200
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-06-14 11:26:49 +0200
commitb66ae47f478b899e8be15db137f7dae5353c385d (patch)
tree4fcfbc63e3786b0dcba72ad301512e11207beb77 /linux
parentd2ee988a008ff044479ec88fd1832190df4bb4e3 (diff)
downloadmediapointer-dvb-s2-b66ae47f478b899e8be15db137f7dae5353c385d.tar.gz
mediapointer-dvb-s2-b66ae47f478b899e8be15db137f7dae5353c385d.tar.bz2
gspca_ov519: Fix 320x240 with ov7660 sensor
From: Hans de Goede <hdegoede@redhat.com> As reported on the ov51x-jpeg list, and as I can confirm with my own cam the ov7670 in 320x240 has a number of broken columns of pixels at the left of the picture. This was not present in the old driver as it always used 640x480 and did software downscaling (took me a while to figure that one out). The fix adds a sensor specific if in so far sensor neutral code :( But this is the only way to fix this, this cannot be fixed by only changing sensor registers. Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/gspca/ov519.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/linux/drivers/media/video/gspca/ov519.c b/linux/drivers/media/video/gspca/ov519.c
index 6dfe562a2..129941693 100644
--- a/linux/drivers/media/video/gspca/ov519.c
+++ b/linux/drivers/media/video/gspca/ov519.c
@@ -1977,7 +1977,11 @@ static int ov519_mode_init_regs(struct sd *sd)
reg_w(sd, OV519_R10_H_SIZE, sd->gspca_dev.width >> 4);
reg_w(sd, OV519_R11_V_SIZE, sd->gspca_dev.height >> 3);
- reg_w(sd, OV519_R12_X_OFFSETL, 0x00);
+ if (sd->sensor == SEN_OV7670 &&
+ sd->gspca_dev.cam.cam_mode[sd->gspca_dev.curr_mode].priv)
+ reg_w(sd, OV519_R12_X_OFFSETL, 0x04);
+ else
+ reg_w(sd, OV519_R12_X_OFFSETL, 0x00);
reg_w(sd, OV519_R13_X_OFFSETH, 0x00);
reg_w(sd, OV519_R14_Y_OFFSETL, 0x00);
reg_w(sd, OV519_R15_Y_OFFSETH, 0x00);
@@ -2339,7 +2343,7 @@ static int set_ov_sensor_window(struct sd *sd)
if (qvga) { /* QVGA from ov7670.c by
* Jonathan Corbet */
hstart = 164;
- hstop = 20;
+ hstop = 28;
vstart = 14;
vstop = 494;
} else { /* VGA */