diff options
author | Erik Andrén <erik.andren@gmail.com> | 2008-12-21 22:07:59 +0100 |
---|---|---|
committer | Erik Andrén <erik.andren@gmail.com> | 2008-12-21 22:07:59 +0100 |
commit | 5ca26578c58186e1afc2948a9403220edf75fd9f (patch) | |
tree | 50497275af41a5a341b2bf22b9ed771ce19917e2 /linux/drivers/media/video/gspca/m5602/m5602_ov9650.c | |
parent | 8b7f844e3d8b6c9ef3b5159f3b23fc79466df0ed (diff) | |
download | mediapointer-dvb-s2-5ca26578c58186e1afc2948a9403220edf75fd9f.tar.gz mediapointer-dvb-s2-5ca26578c58186e1afc2948a9403220edf75fd9f.tar.bz2 |
ov9650: Prepare the sensor to set multiple resolutions.
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_ov9650.c')
-rw-r--r-- | linux/drivers/media/video/gspca/m5602/m5602_ov9650.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_ov9650.c b/linux/drivers/media/video/gspca/m5602/m5602_ov9650.c index 115529f41..7cf18e305 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_ov9650.c +++ b/linux/drivers/media/video/gspca/m5602/m5602_ov9650.c @@ -145,6 +145,30 @@ int ov9650_init(struct sd *sd) return err; } +int ov9650_start(struct sd *sd) +{ + int i, err = 0; + struct cam *cam = &sd->gspca_dev.cam; + + switch (cam->cam_mode[sd->gspca_dev.curr_mode].width) + { + default: + case 640: + PDEBUG(D_V4L2, "Configuring camera for VGA mode"); + + for (i = 0; i < ARRAY_SIZE(VGA_ov9650) && !err; i++) { + u8 data = VGA_ov9650[i][2]; + if (VGA_ov9650[i][0] == SENSOR) + err = m5602_write_sensor(sd, + VGA_ov9650[i][1], &data, 1); + else + err = m5602_write_bridge(sd, VGA_ov9650[i][1], data); + } + break; + } + return err; +} + int ov9650_power_down(struct sd *sd) { int i, err = 0; |