From: ddl Date: Wed, 4 May 2011 07:25:26 +0000 (+0800) Subject: camera: ov5642 capture focus is error in const focus X-Git-Tag: firefly_0821_release~10369 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=384189345ddd5dfc956c16fe7d0430ab61bdc105;p=firefly-linux-kernel-4.4.55.git camera: ov5642 capture focus is error in const focus --- diff --git a/drivers/media/video/ov5642.c b/drivers/media/video/ov5642.c index 7217f4c4c526..2691c3e6e5f6 100755 --- a/drivers/media/video/ov5642.c +++ b/drivers/media/video/ov5642.c @@ -4390,11 +4390,6 @@ static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f) { if (sensor_fmt_capturechk(sd,f) == true) { /* ddl@rock-chips.com : Capture */ sensor_parameter_record(client); - #if CONFIG_SENSOR_Focus - sensor_af_idlechk(client); - if (sensor->info_priv.auto_focus == SENSOR_AF_MODE_CONTINUOUS) - sensor_af_cmdset(client, PauseFocus_Cmd, NULL); - #endif #if CONFIG_SENSOR_Flash if ((sensor->info_priv.flash == 1) || (sensor->info_priv.flash == 2)) { sensor_ioctrl(icd, Sensor_Flash, Flash_On); @@ -4442,6 +4437,12 @@ 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); } + #if CONFIG_SENSOR_Focus + sensor_af_zoneupdate(client); + if (sensor->info_priv.auto_focus == SENSOR_AF_MODE_CONTINUOUS) { + sensor_af_const(client); + } + #endif sensor->info_priv.snap2preview = true; } else if (sensor_fmt_videochk(sd,f) == true) { /* ddl@rock-chips.com : Video */ qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_EFFECT);