3
0

galaxys2: camera: code cleanup, higher min buffer count

Change-Id: I6abec7c91b15d4c9cd9916c878230403a4e1f89f
This commit is contained in:
Espen Fjellvær Olsen 2013-02-23 12:21:29 +01:00
parent 2ce8745485
commit c063919328
2 changed files with 14 additions and 6 deletions

View File

@ -1602,18 +1602,18 @@ void *exynos_camera_auto_focus_thread(void *data)
} }
switch (auto_focus_status) { switch (auto_focus_status) {
case 0x5: // in progress case M5MO_AF_STATUS_IN_PROGRESS:
usleep(500); usleep(500);
break; break;
case 0x1: // success case M5MO_AF_STATUS_SUCCESS:
case 0x2: // success case M5MO_AF_STATUS_1ST_SUCCESS:
auto_focus_result = 1; auto_focus_result = 1;
pthread_mutex_unlock(&exynos_camera->auto_focus_mutex); pthread_mutex_unlock(&exynos_camera->auto_focus_mutex);
goto thread_exit; goto thread_exit;
case 0x0: // fail case M5MO_AF_STATUS_FAIL:
default: default:
auto_focus_result = 0;
ALOGE("AF failed or unknown result flag: 0x%x", auto_focus_status); ALOGE("AF failed or unknown result flag: 0x%x", auto_focus_status);
auto_focus_result = 0;
pthread_mutex_unlock(&exynos_camera->auto_focus_mutex); pthread_mutex_unlock(&exynos_camera->auto_focus_mutex);
goto thread_exit; goto thread_exit;
} }

View File

@ -34,7 +34,7 @@
#define EXYNOS_CAMERA_MAX_PRESETS_COUNT 2 #define EXYNOS_CAMERA_MAX_PRESETS_COUNT 2
#define EXYNOS_CAMERA_MAX_V4L2_NODES_COUNT 4 #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_MAX_BUFFERS_COUNT 8
#define EXYNOS_CAMERA_MSG_ENABLED(msg) \ #define EXYNOS_CAMERA_MSG_ENABLED(msg) \
@ -46,6 +46,14 @@
* Structures * 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 {
struct list_head *next; struct list_head *next;
struct list_head *prev; struct list_head *prev;