From 402e50994e14785d3dc0328b27fd74021a8744ca Mon Sep 17 00:00:00 2001 From: Dheeraj CVR Date: Wed, 24 Dec 2014 08:28:20 +0530 Subject: 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 --- camera/exynos_camera.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'camera') 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); + } } -- cgit v1.1