summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSundar Raman <sunds@ti.com>2011-10-19 22:15:22 -0700
committerIliyan Malchev <malchev@google.com>2011-10-19 23:15:41 -0700
commitd16343600a83478ed6223e51aa41f717f28b6351 (patch)
treee65febadb7b8ee809f1fb6bd2b5124da371ea0bb
parentcd24c84966f2abddfb1f4ffba30f500e5fc63db3 (diff)
downloadhardware_ti_omap4xxx-d16343600a83478ed6223e51aa41f717f28b6351.zip
hardware_ti_omap4xxx-d16343600a83478ed6223e51aa41f717f28b6351.tar.gz
hardware_ti_omap4xxx-d16343600a83478ed6223e51aa41f717f28b6351.tar.bz2
CameraHAL: Fix for #testJpegExif
Set the focal length to correct defaults for primary and secondary for the sensors on the phone. Previous camerahal value was wrong. Call setupEXIF even in the case where we return from useBufferCapture when the port is already enabled. Change-Id: I224ec2f19af11de525455015c1822ba6a13c4d17 Signed-off-by: Sundar Raman <sunds@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
-rw-r--r--camera/OMXCameraAdapter/OMXCapabilities.cpp6
-rw-r--r--camera/OMXCameraAdapter/OMXCapture.cpp10
-rw-r--r--camera/OMXCameraAdapter/OMXDefaults.cpp3
-rw-r--r--camera/inc/OMXCameraAdapter/OMXCameraAdapter.h3
4 files changed, 19 insertions, 3 deletions
diff --git a/camera/OMXCameraAdapter/OMXCapabilities.cpp b/camera/OMXCameraAdapter/OMXCapabilities.cpp
index e35bd61..054605e 100644
--- a/camera/OMXCameraAdapter/OMXCapabilities.cpp
+++ b/camera/OMXCameraAdapter/OMXCapabilities.cpp
@@ -1060,7 +1060,11 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params,
params->set(CameraProperties::MAX_FD_SW_FACES, DEFAULT_MAX_FD_SW_FACES);
params->set(CameraProperties::AUTO_EXPOSURE_LOCK, DEFAULT_AE_LOCK);
params->set(CameraProperties::AUTO_WHITEBALANCE_LOCK, DEFAULT_AWB_LOCK);
- params->set(CameraProperties::FOCAL_LENGTH, DEFAULT_FOCAL_LENGTH);
+ if(caps.tSenMounting.nSenId == 305) {
+ params->set(CameraProperties::FOCAL_LENGTH, DEFAULT_FOCAL_LENGTH_PRIMARY);
+ } else {
+ params->set(CameraProperties::FOCAL_LENGTH, DEFAULT_FOCAL_LENGTH_SECONDARY);
+ }
params->set(CameraProperties::HOR_ANGLE, DEFAULT_HOR_ANGLE);
params->set(CameraProperties::VER_ANGLE, DEFAULT_VER_ANGLE);
params->set(CameraProperties::VIDEO_SNAPSHOT_SUPPORTED, DEFAULT_VIDEO_SNAPSHOT_SUPPORTED);
diff --git a/camera/OMXCameraAdapter/OMXCapture.cpp b/camera/OMXCameraAdapter/OMXCapture.cpp
index 7ae27aa..0c31496 100644
--- a/camera/OMXCameraAdapter/OMXCapture.cpp
+++ b/camera/OMXCameraAdapter/OMXCapture.cpp
@@ -1047,6 +1047,16 @@ status_t OMXCameraAdapter::UseBuffersCapture(void* bufArr, int num)
// capture is already configured...we can skip this step
if (mCaptureConfigured) {
+
+ if ( NO_ERROR == ret )
+ {
+ ret = setupEXIF();
+ if ( NO_ERROR != ret )
+ {
+ CAMHAL_LOGEB("Error configuring EXIF Buffer %x", ret);
+ }
+ }
+
mCapturedFrames = mBurstFrames;
return NO_ERROR;
}
diff --git a/camera/OMXCameraAdapter/OMXDefaults.cpp b/camera/OMXCameraAdapter/OMXDefaults.cpp
index 5e6fe8e..aff38d1 100644
--- a/camera/OMXCameraAdapter/OMXDefaults.cpp
+++ b/camera/OMXCameraAdapter/OMXDefaults.cpp
@@ -67,7 +67,8 @@ const char OMXCameraAdapter::DEFAULT_WB[] = "auto";
const char OMXCameraAdapter::DEFAULT_ZOOM[] = "0";
const char OMXCameraAdapter::DEFAULT_MAX_FD_HW_FACES[] = __STRINGIFY(MAX_NUM_FACES_SUPPORTED);
const char OMXCameraAdapter::DEFAULT_MAX_FD_SW_FACES[] = "0";
-const char OMXCameraAdapter::DEFAULT_FOCAL_LENGTH[] = "4.6";
+const char OMXCameraAdapter::DEFAULT_FOCAL_LENGTH_PRIMARY[] = "3.43";
+const char OMXCameraAdapter::DEFAULT_FOCAL_LENGTH_SECONDARY[] = "1.95";
const char OMXCameraAdapter::DEFAULT_HOR_ANGLE[] = "54.8";
const char OMXCameraAdapter::DEFAULT_VER_ANGLE[] = "42.5";
const char OMXCameraAdapter::DEFAULT_AE_LOCK[] = "false";
diff --git a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
index 3390ecf..779a385 100644
--- a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
+++ b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
@@ -751,7 +751,8 @@ private:
static const char DEFAULT_MAX_NUM_METERING_AREAS[];
static const char DEFAULT_LOCK_SUPPORTED[];
static const char DEFAULT_LOCK_UNSUPPORTED[];
- static const char DEFAULT_FOCAL_LENGTH[];
+ static const char DEFAULT_FOCAL_LENGTH_PRIMARY[];
+ static const char DEFAULT_FOCAL_LENGTH_SECONDARY[];
static const char DEFAULT_HOR_ANGLE[];
static const char DEFAULT_VER_ANGLE[];
static const char DEFAULT_VIDEO_SNAPSHOT_SUPPORTED[];