Update focus behaviour to match Samsungs
Thanks to angelsl Change-Id: I9d2a12a818fce1ca88e635c03fb4fdeaab45bad4
This commit is contained in:
parent
c063919328
commit
aa46ea0b54
@ -1601,21 +1601,17 @@ void *exynos_camera_auto_focus_thread(void *data)
|
||||
goto thread_exit;
|
||||
}
|
||||
|
||||
switch (auto_focus_status) {
|
||||
case M5MO_AF_STATUS_IN_PROGRESS:
|
||||
usleep(500);
|
||||
break;
|
||||
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 M5MO_AF_STATUS_FAIL:
|
||||
default:
|
||||
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;
|
||||
if (auto_focus_status & M5MO_AF_STATUS_IN_PROGRESS) { // Progress
|
||||
usleep(10000); // Sleep 10 ms
|
||||
} else if (auto_focus_status == M5MO_AF_STATUS_SUCCESS || auto_focus_status == M5MO_AF_STATUS_1ST_SUCCESS) { // Success
|
||||
auto_focus_result = 1;
|
||||
pthread_mutex_unlock(&exynos_camera->auto_focus_mutex);
|
||||
goto thread_exit;
|
||||
} else {
|
||||
auto_focus_result = 0;
|
||||
ALOGE("AF failed or unknown result flag: 0x%x", auto_focus_status);
|
||||
pthread_mutex_unlock(&exynos_camera->auto_focus_mutex);
|
||||
goto thread_exit;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&exynos_camera->auto_focus_mutex);
|
||||
|
@ -48,10 +48,9 @@
|
||||
|
||||
enum m5mo_af_status {
|
||||
M5MO_AF_STATUS_FAIL = 0,
|
||||
M5MO_AF_STATUS_IN_PROGRESS,
|
||||
M5MO_AF_STATUS_SUCCESS,
|
||||
M5MO_AF_STATUS_1ST_SUCCESS,
|
||||
M5MO_AF_STATUS_IN_PROGRESS = 5,
|
||||
M5MO_AF_STATUS_MAX,
|
||||
M5MO_AF_STATUS_1ST_SUCCESS = 4,
|
||||
};
|
||||
|
||||
struct list_head {
|
||||
|
Loading…
Reference in New Issue
Block a user