summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2013-02-23 14:39:40 +0000
committercodeworkx <codeworkx@cyanogenmod.org>2013-02-23 14:41:55 +0000
commita821e102539f87f2f9bd62388293a719944b5a45 (patch)
treed0545c59b8f8780404f3c46b63943526ee82c330 /camera
parent8007493654af43f357d6025d34f09c27cb5e8cb8 (diff)
downloaddevice_samsung_galaxys2-common-a821e102539f87f2f9bd62388293a719944b5a45.zip
device_samsung_galaxys2-common-a821e102539f87f2f9bd62388293a719944b5a45.tar.gz
device_samsung_galaxys2-common-a821e102539f87f2f9bd62388293a719944b5a45.tar.bz2
galaxys2: camera hal updates from paulk
Change-Id: I7ca6daa5ae8f72bb908b4c735193933f5524fdac Source: git://git.paulk.fr/exynos_camera.git
Diffstat (limited to 'camera')
-rw-r--r--camera/exynos_camera.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/camera/exynos_camera.c b/camera/exynos_camera.c
index 2a73bd7..d352f27 100644
--- a/camera/exynos_camera.c
+++ b/camera/exynos_camera.c
@@ -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) {