From b1295f31a634cd83dd67e614e665db3f82a4d01e Mon Sep 17 00:00:00 2001
From: Pawit Pornkitprasan
Date: Wed, 4 Apr 2012 13:05:30 +0700
Subject: libcamera: Fix taking photo after video
Similar to patch 40e99e22e1a45d36b7fac9c4452aa1d74550b424 in gingerbread
---
libcamera/SecCamera.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'libcamera')
diff --git a/libcamera/SecCamera.cpp b/libcamera/SecCamera.cpp
index 7ea19e8..dabe878 100755
--- a/libcamera/SecCamera.cpp
+++ b/libcamera/SecCamera.cpp
@@ -974,6 +974,14 @@ int SecCamera::stopRecord(void)
if (m_camera_id == CAMERA_ID_BACK) {
ret = fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_CAF_START_STOP, 0);
CHECK(ret);
+
+ // Need to switch focus mode so that the camera can focus properly
+ // after using caf.
+ // Note: This bug is not affected when the original mode is macro
+ // so we can safely use that as a mode to switch to.
+ int orig_mode = m_params->focus_mode;
+ setFocusMode(FOCUS_MODE_MACRO);
+ setFocusMode(orig_mode);
}
m_flag_record_start = 0;
--
cgit v1.1