3
0

galaxys2: camera hal updates from paulk

Change-Id: I7ca6daa5ae8f72bb908b4c735193933f5524fdac
Source: git://git.paulk.fr/exynos_camera.git
This commit is contained in:
codeworkx 2013-02-23 14:39:40 +00:00
parent 8007493654
commit a821e10253

View File

@ -61,9 +61,9 @@ struct exynos_camera_preset exynos_camera_presets_galaxys2[] = {
.preview_size_values = "1280x720,640x480,720x480,800x480,800x450,352x288,320x240,176x144",
.preview_size = "640x480",
.preview_format_values = "yuv420sp,yuv420p,rgb565",
.preview_format = "rgb565",
.preview_format = "yuv420sp",
.preview_frame_rate_values = "30,25,20,15,10,7",
.preview_frame_rate = 20,
.preview_frame_rate = 30,
.preview_fps_range_values = "(7000,30000)",
.preview_fps_range = "7000,30000",
@ -130,9 +130,9 @@ struct exynos_camera_preset exynos_camera_presets_galaxys2[] = {
.preview_size_values = "640x480,352x288,320x240,176x144",
.preview_size = "640x480",
.preview_format_values = "yuv420sp,yuv420p,rgb565",
.preview_format = "rgb565",
.preview_format = "yuv420sp",
.preview_frame_rate_values = "30,25,20,15,10,7",
.preview_frame_rate = 15,
.preview_frame_rate = 30,
.preview_fps_range_values = "(7000,30000)",
.preview_fps_range = "7000,30000",
@ -1610,14 +1610,11 @@ void *exynos_camera_auto_focus_thread(void *data)
pthread_mutex_unlock(&exynos_camera->auto_focus_mutex);
goto thread_exit;
case 0x0: // fail
auto_focus_result = 0;
pthread_mutex_unlock(&exynos_camera->auto_focus_mutex);
goto thread_exit;
default:
ALOGE("Unknown AF result flag: 0x%x", auto_focus_status);
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;
goto thread_exit;
}
pthread_mutex_unlock(&exynos_camera->auto_focus_mutex);
@ -1904,13 +1901,13 @@ int exynos_camera_preview_start(struct exynos_camera *exynos_camera)
if (exynos_camera == NULL)
return -EINVAL;
if (exynos_camera->preview_enabled) {
ALOGE("Preview was already started!");
return 0;
}
// V4L2
format = exynos_camera->preview_format;
rc = exynos_v4l2_enum_fmt_cap(exynos_camera, 0, format);
@ -2312,8 +2309,10 @@ int exynos_camera_set_preview_window(struct camera_device *dev,
if (w->set_buffer_count == NULL || w->set_usage == NULL || w->set_buffers_geometry == NULL)
return -EINVAL;
if (exynos_camera->preview_width == 640 || exynos_camera->preview_buffers_count <= 0)
if (exynos_camera->preview_width == 640 || exynos_camera->preview_buffers_count <= 0) {
ALOGE("%s: Invalid preview buffers count", __func__);
exynos_camera->preview_buffers_count = EXYNOS_CAMERA_MAX_BUFFERS_COUNT;
}
rc = w->set_buffer_count(w, exynos_camera->preview_buffers_count);
if (rc) {