From 4ccae23384fea54dc633007d47ae820c071cf036 Mon Sep 17 00:00:00 2001 From: codeworkx Date: Sun, 2 Dec 2012 15:48:43 +0100 Subject: [PATCH] galaxys2: camera have iso Change-Id: I103e58d0f115bc4560c152e9747847ea5ed4ac01 --- BoardCommonConfig.mk | 10 +++++++--- camera/CameraWrapper.cpp | 27 +++++++++++++-------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/BoardCommonConfig.mk b/BoardCommonConfig.mk index 59d9723..96b3038 100644 --- a/BoardCommonConfig.mk +++ b/BoardCommonConfig.mk @@ -30,11 +30,11 @@ TARGET_ARCH_VARIANT_CPU := cortex-a9 ARCH_ARM_HAVE_NEON := true ARCH_ARM_HAVE_TLS_REGISTER := true EXYNOS4210_ENHANCEMENTS := true -BOARD_USES_SKTEXTBOX := true ifdef EXYNOS4210_ENHANCEMENTS COMMON_GLOBAL_CFLAGS += -DEXYNOS4_ENHANCEMENTS COMMON_GLOBAL_CFLAGS += -DEXYNOS4210_ENHANCEMENTS +COMMON_GLOBAL_CFLAGS += -DDISABLE_HW_ID_MATCH_CHECK endif TARGET_BOARD_PLATFORM := exynos4 @@ -79,9 +79,12 @@ ENABLE_WEBGL := true # HWComposer BOARD_USES_HWCOMPOSER := true BOARD_USE_SYSFS_VSYNC_NOTIFICATION := true -BOARD_USE_SECTVOUT := true BOARD_USES_FIMGAPI := true +# TVOut +BOARD_USE_SECTVOUT := true +BOARD_USES_SKTEXTBOX := true + # OMX BOARD_USE_SAMSUNG_COLORFORMAT := true BOARD_NONBLOCK_MODE_PROCESS := true @@ -99,7 +102,8 @@ BOARD_MOBILEDATA_INTERFACE_NAME := "pdp0" # Camera BOARD_USES_PROPRIETARY_LIBCAMERA := true BOARD_USES_PROPRIETARY_LIBFIMC := true -COMMON_GLOBAL_CFLAGS += -DDISABLE_HW_ID_MATCH_CHECK +BOARD_CAMERA_HAVE_ISO := true +COMMON_GLOBAL_CFLAGS += -DHAVE_ISO COMMON_GLOBAL_CFLAGS += -DSAMSUNG_CAMERA_HARDWARE # Wifi diff --git a/camera/CameraWrapper.cpp b/camera/CameraWrapper.cpp index 6e886a7..6e2f8c0 100644 --- a/camera/CameraWrapper.cpp +++ b/camera/CameraWrapper.cpp @@ -110,7 +110,7 @@ static char * camera_fixup_getparams(int id, const char * settings) params.set(android::CameraParameters::KEY_PREVIEW_SIZE, videoSize); } - params.set("iso-values", iso_values[id]); + params.set(android::CameraParameters::KEY_SUPPORTED_ISO_MODES, iso_values[id]); android::String8 strParams = params.flatten(); char *ret = strdup(strParams.string()); @@ -125,19 +125,18 @@ char * camera_fixup_setparams(int id, const char * settings) params.unflatten(android::String8(settings)); // fix params here - - const char* isoMode = params.get("iso"); - if(isoMode) { - if(!strcmp(isoMode, "ISO50")) - params.set("iso", "50"); - else if(!strcmp(isoMode, "ISO100")) - params.set("iso", "100"); - else if(!strcmp(isoMode, "ISO200")) - params.set("iso", "200"); - else if(!strcmp(isoMode, "ISO400")) - params.set("iso", "400"); - else if(!strcmp(isoMode, "ISO800")) - params.set("iso", "800"); + if(params.get("iso")) { + const char* isoMode = params.get(android::CameraParameters::KEY_ISO_MODE); + if(strcmp(isoMode, "ISO50") == 0) + params.set(android::CameraParameters::KEY_ISO_MODE, "50"); + else if(strcmp(isoMode, "ISO100") == 0) + params.set(android::CameraParameters::KEY_ISO_MODE, "100"); + else if(strcmp(isoMode, "ISO200") == 0) + params.set(android::CameraParameters::KEY_ISO_MODE, "200"); + else if(strcmp(isoMode, "ISO400") == 0) + params.set(android::CameraParameters::KEY_ISO_MODE, "400"); + else if(strcmp(isoMode, "ISO800") == 0) + params.set(android::CameraParameters::KEY_ISO_MODE, "800"); } android::String8 strParams = params.flatten();