diff options
Diffstat (limited to 'camera')
-rw-r--r-- | camera/exynos_camera.c | 10 | ||||
-rw-r--r-- | camera/exynos_camera.h | 10 |
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; |