From 441736d981aa3b16014f554896f5d2fdb1b35e2c Mon Sep 17 00:00:00 2001 From: ddl Date: Tue, 2 Aug 2011 15:21:46 +0800 Subject: [PATCH] camera: fix ov5640 capture error after 720p preview --- drivers/media/video/ov5640.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/media/video/ov5640.c b/drivers/media/video/ov5640.c index 50d140e529a0..21eb6889f50e 100755 --- a/drivers/media/video/ov5640.c +++ b/drivers/media/video/ov5640.c @@ -447,7 +447,7 @@ static struct reginfo sensor_720p[]= {0x3c07,0x07}, {0x3803,0xfa}, - {0x3806,0x06}, + {0x3806,0x06},//// {0x3807,0xa9}, {0x3808,0x05}, {0x3809,0x00}, @@ -460,18 +460,18 @@ static struct reginfo sensor_720p[]= {0x3813,0x04}, {0x3a02,0x02}, {0x3a03,0xe4}, - {0x3a08,0x01}, - {0x3a09,0xbc}, - {0x3a0a,0x01}, - {0x3a0b,0x72}, + {0x3a08,0x01},/// + {0x3a09,0xbc},//// + {0x3a0a,0x01},/// + {0x3a0b,0x72},//// {0x3a0e,0x01}, {0x3a0d,0x02}, {0x3a14,0x02}, {0x3a15,0xe4}, - {0x3002,0x00}, - {0x4713,0x02}, + {0x3002,0x00},/// + {0x4713,0x02},/// {0x4837,0x16}, - {0x3824,0x04}, + {0x3824,0x04},/// {0x5001,0x83}, {0x3035,0x21}, {0x3036,0x46}, @@ -706,6 +706,7 @@ static struct reginfo sensor_svga[] = {0x3814, 0x31}, {0x3815, 0x31}, {0x3803, 0x04}, + {0x3806, 0x07},/// {0x3807, 0x9b}, {0x3808, 0x03}, {0x3809, 0x20}, @@ -722,14 +723,21 @@ static struct reginfo sensor_svga[] = {0x370c, 0x03}, {0x3a02, 0x03}, {0x3a03, 0xd8}, + {0x3a08 ,0x01},/// + {0x3a09, 0x27},/// + {0x3a0a, 0x00},/// + {0x3a0b, 0xf6},/// {0x3a0e, 0x03}, {0x3a0d, 0x04}, {0x3a14, 0x03}, {0x3a15, 0xd8}, {0x4004, 0x02}, + {0x3002, 0x1c},//// + {0x4713, 0x03},//// {0x3035, 0x21}, {0x3036, 0x46}, {0x4837, 0x22}, + {0x3824, 0x02},//// {0x5001, 0xa3}, {SEQUENCE_END, 0x00} }; @@ -2626,7 +2634,16 @@ static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f) qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_DO_WHITE_BALANCE); sensor_set_whiteBalance(icd, qctrl,sensor->info_priv.whiteBalance); } - msleep(600); + #if CONFIG_SENSOR_Focus + if (sensor->info_priv.auto_focus == SENSOR_AF_MODE_AUTO) { + sensor_af_idlechk(client); + msleep(200); + } else { + msleep(500); + } + #else + msleep(500); + #endif sensor->info_priv.video2preview = false; sensor->info_priv.snap2preview = false; } -- 2.34.1