summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2012-04-04 13:05:30 +0700
committerPawit Pornkitprasan <p.pawit@gmail.com>2012-04-04 13:05:32 +0700
commitb1295f31a634cd83dd67e614e665db3f82a4d01e (patch)
tree2a8af0d1930b1ee7bf8e45391587a181b469b10f
parentae3a4807e920b148b31dbc27587ebeda1ed2a65a (diff)
downloaddevice_samsung_aries-common-b1295f31a634cd83dd67e614e665db3f82a4d01e.zip
device_samsung_aries-common-b1295f31a634cd83dd67e614e665db3f82a4d01e.tar.gz
device_samsung_aries-common-b1295f31a634cd83dd67e614e665db3f82a4d01e.tar.bz2
libcamera: Fix taking photo after video
Similar to patch 40e99e22e1a45d36b7fac9c4452aa1d74550b424 in gingerbread
-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;