summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorDaniel Levin <dendy@ti.com>2012-07-25 17:13:42 -0500
committerDaniel Levin <dendy@ti.com>2012-07-25 17:13:42 -0500
commita091b6939383ea4ca54313836fd9466de94efc3d (patch)
tree2fca36b23958513414e4b8009ff5c187926db740 /camera
parentb8052bdcd252f61fc16f6389b6974301735ec91c (diff)
parent65aba9a1d72ab541447ecc27236433e1ef7b9a8c (diff)
downloadhardware_ti_omap4-a091b6939383ea4ca54313836fd9466de94efc3d.zip
hardware_ti_omap4-a091b6939383ea4ca54313836fd9466de94efc3d.tar.gz
hardware_ti_omap4-a091b6939383ea4ca54313836fd9466de94efc3d.tar.bz2
Merge "CameraHal: Avoids possible race conditions while accessing 'mParams'" into jb-migration
Change-Id: I73dd1771bc16aa80f02a271a7d284dda07e0d0e0 Signed-off-by: Daniel Levin <dendy@ti.com>
Diffstat (limited to 'camera')
-rw-r--r--camera/OMXCameraAdapter/OMXAlgo.cpp7
-rw-r--r--camera/OMXCameraAdapter/OMXCameraAdapter.cpp14
-rw-r--r--camera/inc/OMXCameraAdapter/OMXCameraAdapter.h5
3 files changed, 26 insertions, 0 deletions
diff --git a/camera/OMXCameraAdapter/OMXAlgo.cpp b/camera/OMXCameraAdapter/OMXAlgo.cpp
index 9765f68..312f0f8 100644
--- a/camera/OMXCameraAdapter/OMXAlgo.cpp
+++ b/camera/OMXCameraAdapter/OMXAlgo.cpp
@@ -673,6 +673,13 @@ status_t OMXCameraAdapter::setCaptureMode(OMXCameraAdapter::CaptureMode mode)
const char* valstr = NULL;
CAMHAL_LOGDA("Camera mode: HIGH QUALITY_ZSL");
camMode.eCamOperatingMode = OMX_TI_CaptureImageProfileZeroShutterLag;
+
+#ifdef CAMERAHAL_TUNA
+ if ( !mIternalRecordingHint ) {
+ zslHistoryLen.nHistoryLen = 5;
+ }
+#endif
+
}
else if( OMXCameraAdapter::VIDEO_MODE == mode )
{
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
index 710c16a..afe0068 100644
--- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
+++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
@@ -228,6 +228,11 @@ status_t OMXCameraAdapter::initialize(CameraProperties::Properties* caps)
mSensorOverclock = false;
mAutoConv = OMX_TI_AutoConvergenceModeMax;
mManualConv = 0;
+
+#ifdef CAMERAHAL_TUNA
+ mIternalRecordingHint = false;
+#endif
+
mDeviceOrientation = 0;
mCapabilities = caps;
mZoomUpdating = false;
@@ -644,6 +649,15 @@ status_t OMXCameraAdapter::setParameters(const android::CameraParameters &params
mOMXStateSwitch = true;
}
+#ifdef CAMERAHAL_TUNA
+ valstr = params.get(TICameraParameters::KEY_RECORDING_HINT);
+ if (!valstr || (valstr && (strcmp(valstr, android::CameraParameters::FALSE)))) {
+ mIternalRecordingHint = false;
+ } else {
+ mIternalRecordingHint = true;
+ }
+#endif
+
#ifdef OMAP_ENHANCEMENT
if ( (valstr = params.get(TICameraParameters::KEY_MEASUREMENT_ENABLE)) != NULL )
{
diff --git a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
index 19aea6f..655dc72 100644
--- a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
+++ b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
@@ -1105,6 +1105,11 @@ private:
size_t mBracketingRange;
int mCurrentZoomBracketing;
android::CameraParameters mParameters;
+
+#ifdef CAMERAHAL_TUNA
+ bool mIternalRecordingHint;
+#endif
+
bool mOmxInitialized;
OMXCameraAdapterComponentContext mCameraAdapterParameters;
bool mFirstTimeInit;