summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c
diff options
context:
space:
mode:
authorErik Andr?n <erik.andren@gmail.com>2009-01-20 08:13:34 +0100
committerErik Andr?n <erik.andren@gmail.com>2009-01-20 08:13:34 +0100
commit9ae69affd3d0f322a1aeb125b84858d358386160 (patch)
tree78cf3626e9f951ca359ef14acc5400783577b604 /linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c
parenteec79ab73da9af8887bf32700d43e196c74e2ddc (diff)
downloadmediapointer-dvb-s2-9ae69affd3d0f322a1aeb125b84858d358386160.tar.gz
mediapointer-dvb-s2-9ae69affd3d0f322a1aeb125b84858d358386160.tar.bz2
gspca - m5602-mt9m111: Setup VGA resolution
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/gspca/m5602/m5602_mt9m111.c')
-rw-r--r--linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c b/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c
index 7986ef074..e7399f3d1 100644
--- a/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c
+++ b/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c
@@ -270,8 +270,9 @@ int mt9m111_start(struct sd *sd)
int i, err = 0;
u8 data[2];
struct cam *cam = &sd->gspca_dev.cam;
+ s32 *sensor_settings = sd->sensor_priv;
- int width = cam->cam_mode[sd->gspca_dev.curr_mode].width;
+ int width = cam->cam_mode[sd->gspca_dev.curr_mode].width - 1;
int height = cam->cam_mode[sd->gspca_dev.curr_mode].height;
for (i = 0; i < ARRAY_SIZE(start_mt9m111) && !err; i++) {
@@ -331,6 +332,13 @@ int mt9m111_start(struct sd *sd)
switch (width) {
case 640:
PDEBUG(D_V4L2, "Configuring camera for VGA mode");
+ data[0] = MT9M111_RMB_OVER_SIZED;
+ data[1] = MT9M111_RMB_ROW_SKIP_2X |
+ MT9M111_RMB_COLUMN_SKIP_2X |
+ (sensor_settings[VFLIP_IDX] << 0) |
+ (sensor_settings[HFLIP_IDX] << 1);
+
+ err = m5602_write_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B, data, 2);
break;
}
return err;