summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorDheeraj CVR <cvr.dheeraj@gmail.com>2014-12-24 08:28:20 +0530
committersbrissen <sbrissen@hotmail.com>2014-12-29 14:18:11 -0500
commit402e50994e14785d3dc0328b27fd74021a8744ca (patch)
tree34e1caf27df9ef1c3e3cffb6909d8d4c3b83f49a /camera
parentbfc2eb03ee7919991bd96a572499dae2df20d34a (diff)
downloaddevice_samsung_smdk4412-common-402e50994e14785d3dc0328b27fd74021a8744ca.zip
device_samsung_smdk4412-common-402e50994e14785d3dc0328b27fd74021a8744ca.tar.gz
device_samsung_smdk4412-common-402e50994e14785d3dc0328b27fd74021a8744ca.tar.bz2
smdk4412-common: camera: don't propogate cancel autofocus in CAF
Setting AUTO_FOCUS_OFF during CAF mode seems to be dangerous and hangs the sensor. Hence, we only propogate V4L2_CID_CAMERA_SET_AUTO_FOCUS if we have previously started the Autofocus (Manual/Touch). Change-Id: Ia081257c16f2b7a2e2d6a1e93e239179f39c3fec
Diffstat (limited to 'camera')
-rw-r--r--camera/exynos_camera.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/camera/exynos_camera.c b/camera/exynos_camera.c
index 0a62ab3..8501bea 100644
--- a/camera/exynos_camera.c
+++ b/camera/exynos_camera.c
@@ -3209,12 +3209,12 @@ void exynos_camera_auto_focus_stop(struct exynos_camera *exynos_camera)
ALOGD("%s()", __func__);
- rc = exynos_v4l2_s_ctrl(exynos_camera, 0, V4L2_CID_CAMERA_SET_AUTO_FOCUS, AUTO_FOCUS_OFF);
- if (rc < 0)
- ALOGE("%s: Unable to set auto-focus off", __func__);
-
- if (exynos_camera->auto_focus_enabled)
- exynos_camera_auto_focus_finish(exynos_camera);
+ if (exynos_camera->auto_focus_enabled) {
+ rc = exynos_v4l2_s_ctrl(exynos_camera, 0, V4L2_CID_CAMERA_SET_AUTO_FOCUS, AUTO_FOCUS_OFF);
+ if (rc < 0)
+ ALOGE("%s: Unable to set auto-focus off", __func__);
+ exynos_camera_auto_focus_finish(exynos_camera);
+ }
}