summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2013-10-08 17:52:26 +0200
committerPaul Kocialkowski <contact@paulk.fr>2013-10-10 19:31:15 +0200
commit6f15b6993415f0e07cf62021407cd34c92553d36 (patch)
tree462ebd5c79b43ed2aad6dc5d859edca8c38a5116
parentba8d1f1770c2e8661c34ccbbbd4823ec1bdd8d7f (diff)
downloaddevice_samsung_i9300-6f15b6993415f0e07cf62021407cd34c92553d36.zip
device_samsung_i9300-6f15b6993415f0e07cf62021407cd34c92553d36.tar.gz
device_samsung_i9300-6f15b6993415f0e07cf62021407cd34c92553d36.tar.bz2
camera: Wait for continous focus to complete before taking a picture
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r--camera/exynos_camera.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/camera/exynos_camera.c b/camera/exynos_camera.c
index a7d2a8c..47ea1cf 100644
--- a/camera/exynos_camera.c
+++ b/camera/exynos_camera.c
@@ -2602,6 +2602,12 @@ int exynos_camera_picture_callback(struct exynos_camera *exynos_camera,
pthread_mutex_lock(&exynos_camera->picture_mutex);
if (!exynos_camera->picture_enabled && !exynos_camera->camera_fimc_is) {
+ if (exynos_camera->camera_capture_format == V4L2_PIX_FMT_INTERLEAVED && exynos_camera->focus_mode == FOCUS_MODE_CONTINOUS_PICTURE && exynos_camera->capture_auto_focus_result == CAMERA_AF_STATUS_IN_PROGRESS) {
+ LOGD("%s: Not asking for picture until auto focus is done", __func__);
+ pthread_mutex_unlock(&exynos_camera->picture_mutex);
+ return 0;
+ }
+
rc = exynos_v4l2_s_ctrl(exynos_camera, 0, V4L2_CID_CAMERA_CAPTURE, 0);
if (rc < 0) {
LOGE("%s: Unable to set capture", __func__);