summaryrefslogtreecommitdiff
path: root/drivers/media/video/gspca/m5602/m5602_ov9650.c
diff options
context:
space:
mode:
authorErik Andrén <erik.andren@gmail.com>2008-12-22 22:06:29 +0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 14:40:02 +0300
commit3b2f3327ff5af235837bc83c6b788bc560ba23a6 (patch)
tree0427347816392829b994edd3f6c4490027f55343 /drivers/media/video/gspca/m5602/m5602_ov9650.c
parent082aa8937c79a02397981b7543ccc65d2bdeaf97 (diff)
downloadlinux-3b2f3327ff5af235837bc83c6b788bc560ba23a6.tar.xz
V4L/DVB (10037): m5602: add QVGA mode for the ov9650 sensor
Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/m5602/m5602_ov9650.c')
-rw-r--r--drivers/media/video/gspca/m5602/m5602_ov9650.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.c b/drivers/media/video/gspca/m5602/m5602_ov9650.c
index fcca3adefc5b..98c979dbbe3d 100644
--- a/drivers/media/video/gspca/m5602/m5602_ov9650.c
+++ b/drivers/media/video/gspca/m5602/m5602_ov9650.c
@@ -150,7 +150,6 @@ int ov9650_start(struct sd *sd)
switch (cam->cam_mode[sd->gspca_dev.curr_mode].width)
{
- default:
case 640:
PDEBUG(D_V4L2, "Configuring camera for VGA mode");
@@ -163,6 +162,19 @@ int ov9650_start(struct sd *sd)
err = m5602_write_bridge(sd, VGA_ov9650[i][1], data);
}
break;
+
+ case 320:
+ PDEBUG(D_V4L2, "Configuring camera for QVGA mode");
+
+ for (i = 0; i < ARRAY_SIZE(QVGA_ov9650) && !err; i++) {
+ u8 data = QVGA_ov9650[i][2];
+ if (QVGA_ov9650[i][0] == SENSOR)
+ err = m5602_write_sensor(sd,
+ QVGA_ov9650[i][1], &data, 1);
+ else
+ err = m5602_write_bridge(sd, QVGA_ov9650[i][1], data);
+ }
+ break;
}
return err;
}