summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorDheeraj CVR <cvr.dheeraj@gmail.com>2013-12-29 13:41:48 +0530
committerDheeraj CVR <cvr.dheeraj@gmail.com>2013-12-29 13:41:58 +0530
commitfecfc168ab1330c4076e1a4576ec0905afdff6a7 (patch)
tree25ac8b7ce0c9e510f75341a112d3cacb4277cb73 /camera
parentfa7f881998333debfa6dc5494d586f33ba92086f (diff)
downloaddevice_samsung_smdk4412-common-fecfc168ab1330c4076e1a4576ec0905afdff6a7.zip
device_samsung_smdk4412-common-fecfc168ab1330c4076e1a4576ec0905afdff6a7.tar.gz
device_samsung_smdk4412-common-fecfc168ab1330c4076e1a4576ec0905afdff6a7.tar.bz2
smdk4412-common: camera: don't defer picture if CAF is in progress
CAF is considerably slower than Auto or Touch Focus and since we are deferring the picture while CAF is in progress, there are delays while taking the picture and these delays are sometimes huge. Disregard the CAF state since we could Touch to Focus if required. Change-Id: If981f6402cc97e0781060dc48fa7d8e44288168f
Diffstat (limited to 'camera')
-rw-r--r--camera/exynos_camera.c17
-rw-r--r--camera/exynos_camera.h1
2 files changed, 5 insertions, 13 deletions
diff --git a/camera/exynos_camera.c b/camera/exynos_camera.c
index 7cea71a..8d6f109 100644
--- a/camera/exynos_camera.c
+++ b/camera/exynos_camera.c
@@ -1532,14 +1532,11 @@ int exynos_camera_capture(struct exynos_camera *exynos_camera)
current_af = CAMERA_AF_STATUS_RESTART;
}
- if (current_af != exynos_camera->auto_focus_result) {
- exynos_camera->auto_focus_result = current_af;
- if (exynos_camera->auto_focus_enabled) {
- rc = exynos_camera_auto_focus(exynos_camera, current_af);
- if (rc < 0) {
- ALOGE("%s: Unable to auto focus", __func__);
- goto error;
- }
+ if (exynos_camera->auto_focus_enabled) {
+ rc = exynos_camera_auto_focus(exynos_camera, current_af);
+ if (rc < 0) {
+ ALOGE("%s: Unable to auto focus", __func__);
+ goto error;
}
}
@@ -2778,10 +2775,6 @@ 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->auto_focus_result == CAMERA_AF_STATUS_IN_PROGRESS) {
- 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) {
diff --git a/camera/exynos_camera.h b/camera/exynos_camera.h
index 6579305..5118539 100644
--- a/camera/exynos_camera.h
+++ b/camera/exynos_camera.h
@@ -320,7 +320,6 @@ struct exynos_camera {
int capture_memory_index;
void *capture_yuv_buffer;
void *capture_jpeg_buffer;
- int auto_focus_result;
int capture_hybrid;
int capture_width;
int capture_height;