summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorEspen Fjellvær Olsen <espen@mrfjo.org>2013-02-23 12:21:29 +0100
committerEspen Fjellvær Olsen <espen@mrfjo.org>2013-02-24 13:47:00 +0100
commitc06391932856ff5cef12aa2d7083e0d34e7dac3d (patch)
treee1d77c845514e2ebd6d0a8ec7ed67ce6fdbca702 /camera
parent2ce87454857c2988c81b42aa08ad476d73a41c9b (diff)
downloaddevice_samsung_galaxys2-common-c06391932856ff5cef12aa2d7083e0d34e7dac3d.zip
device_samsung_galaxys2-common-c06391932856ff5cef12aa2d7083e0d34e7dac3d.tar.gz
device_samsung_galaxys2-common-c06391932856ff5cef12aa2d7083e0d34e7dac3d.tar.bz2
galaxys2: camera: code cleanup, higher min buffer count
Change-Id: I6abec7c91b15d4c9cd9916c878230403a4e1f89f
Diffstat (limited to 'camera')
-rw-r--r--camera/exynos_camera.c10
-rw-r--r--camera/exynos_camera.h10
2 files changed, 14 insertions, 6 deletions
diff --git a/camera/exynos_camera.c b/camera/exynos_camera.c
index 13aab0a..2c8903c 100644
--- a/camera/exynos_camera.c
+++ b/camera/exynos_camera.c
@@ -1602,18 +1602,18 @@ void *exynos_camera_auto_focus_thread(void *data)
}
switch (auto_focus_status) {
- case 0x5: // in progress
+ case M5MO_AF_STATUS_IN_PROGRESS:
usleep(500);
break;
- case 0x1: // success
- case 0x2: // success
+ case M5MO_AF_STATUS_SUCCESS:
+ case M5MO_AF_STATUS_1ST_SUCCESS:
auto_focus_result = 1;
pthread_mutex_unlock(&exynos_camera->auto_focus_mutex);
goto thread_exit;
- case 0x0: // fail
+ case M5MO_AF_STATUS_FAIL:
default:
- auto_focus_result = 0;
ALOGE("AF failed or unknown result flag: 0x%x", auto_focus_status);
+ auto_focus_result = 0;
pthread_mutex_unlock(&exynos_camera->auto_focus_mutex);
goto thread_exit;
}
diff --git a/camera/exynos_camera.h b/camera/exynos_camera.h
index 4d7edc6..6e1fee6 100644
--- a/camera/exynos_camera.h
+++ b/camera/exynos_camera.h
@@ -34,7 +34,7 @@
#define EXYNOS_CAMERA_MAX_PRESETS_COUNT 2
#define EXYNOS_CAMERA_MAX_V4L2_NODES_COUNT 4
-#define EXYNOS_CAMERA_MIN_BUFFERS_COUNT 2
+#define EXYNOS_CAMERA_MIN_BUFFERS_COUNT 3
#define EXYNOS_CAMERA_MAX_BUFFERS_COUNT 8
#define EXYNOS_CAMERA_MSG_ENABLED(msg) \
@@ -46,6 +46,14 @@
* Structures
*/
+enum m5mo_af_status {
+ M5MO_AF_STATUS_FAIL = 0,
+ M5MO_AF_STATUS_SUCCESS,
+ M5MO_AF_STATUS_1ST_SUCCESS,
+ M5MO_AF_STATUS_IN_PROGRESS = 5,
+ M5MO_AF_STATUS_MAX,
+};
+
struct list_head {
struct list_head *next;
struct list_head *prev;