diff options
author | Hans de Goede <hdegoede@redhat.com> | 2009-06-14 05:26:49 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-23 02:12:08 -0400 |
commit | 80142efa715581c06d01b37f299a240309699ff4 (patch) | |
tree | 31ccf889d5f2e45cbb1b7c54ba7488e66f35eee7 /drivers/media/video/gspca/ov519.c | |
parent | 9e4d82588174e68abe8e3568202f0b530415661f (diff) |
V4L/DVB (12077): gspca_ov519: Fix 320x240 with ov7660 sensor
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.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/ov519.c')
-rw-r--r-- | drivers/media/video/gspca/ov519.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index c2c087222f17..c7e88cb0095a 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -1977,7 +1977,11 @@ static int ov519_mode_init_regs(struct sd *sd) | |||
1977 | 1977 | ||
1978 | reg_w(sd, OV519_R10_H_SIZE, sd->gspca_dev.width >> 4); | 1978 | reg_w(sd, OV519_R10_H_SIZE, sd->gspca_dev.width >> 4); |
1979 | reg_w(sd, OV519_R11_V_SIZE, sd->gspca_dev.height >> 3); | 1979 | reg_w(sd, OV519_R11_V_SIZE, sd->gspca_dev.height >> 3); |
1980 | reg_w(sd, OV519_R12_X_OFFSETL, 0x00); | 1980 | if (sd->sensor == SEN_OV7670 && |
1981 | sd->gspca_dev.cam.cam_mode[sd->gspca_dev.curr_mode].priv) | ||
1982 | reg_w(sd, OV519_R12_X_OFFSETL, 0x04); | ||
1983 | else | ||
1984 | reg_w(sd, OV519_R12_X_OFFSETL, 0x00); | ||
1981 | reg_w(sd, OV519_R13_X_OFFSETH, 0x00); | 1985 | reg_w(sd, OV519_R13_X_OFFSETH, 0x00); |
1982 | reg_w(sd, OV519_R14_Y_OFFSETL, 0x00); | 1986 | reg_w(sd, OV519_R14_Y_OFFSETL, 0x00); |
1983 | reg_w(sd, OV519_R15_Y_OFFSETH, 0x00); | 1987 | reg_w(sd, OV519_R15_Y_OFFSETH, 0x00); |
@@ -2314,7 +2318,7 @@ static int set_ov_sensor_window(struct sd *sd) | |||
2314 | if (qvga) { /* QVGA from ov7670.c by | 2318 | if (qvga) { /* QVGA from ov7670.c by |
2315 | * Jonathan Corbet */ | 2319 | * Jonathan Corbet */ |
2316 | hstart = 164; | 2320 | hstart = 164; |
2317 | hstop = 20; | 2321 | hstop = 28; |
2318 | vstart = 14; | 2322 | vstart = 14; |
2319 | vstop = 494; | 2323 | vstop = 494; |
2320 | } else { /* VGA */ | 2324 | } else { /* VGA */ |