summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlibcamera/SecCamera.cpp8
1 files changed, 8 insertions, 0 deletions
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;