diff options
author | Erik Andr?n <erik.andren@gmail.com> | 2009-01-20 04:13:34 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 18:20:35 -0300 |
commit | f676bb3971b3a77c1936a8507db485af2a3f2d2a (patch) | |
tree | 3cb786397e3dccd203860f172160c0ea9bb28eae /drivers/media/video/gspca/m5602/m5602_mt9m111.c | |
parent | e7ae60f73eebd16cc13e616b096e8b1488915d96 (diff) |
V4L/DVB (11543): gspca - m5602-mt9m111: Setup VGA resolution
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_mt9m111.c')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_mt9m111.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.c b/drivers/media/video/gspca/m5602/m5602_mt9m111.c index 7986ef074c5..e7399f3d10a 100644 --- a/drivers/media/video/gspca/m5602/m5602_mt9m111.c +++ b/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; |