summaryrefslogtreecommitdiffstats
path: root/camera/OMXCameraAdapter
diff options
context:
space:
mode:
authorTyler Luu <tluu@ti.com>2011-10-13 12:29:59 -0500
committerIliyan Malchev <malchev@google.com>2011-10-15 13:44:35 -0700
commit1bf6c04f5e47b85354cb42290183038d22915253 (patch)
tree1142a7409e86d7a3da79a92a12a6ddb631229a66 /camera/OMXCameraAdapter
parentc54162032e268b9c377b3c3684d475b4f1a66d53 (diff)
downloadhardware_ti_omap4-1bf6c04f5e47b85354cb42290183038d22915253.zip
hardware_ti_omap4-1bf6c04f5e47b85354cb42290183038d22915253.tar.gz
hardware_ti_omap4-1bf6c04f5e47b85354cb42290183038d22915253.tar.bz2
CameraHal: Allow EV compensation w/ preset scene
CameraHal was previously ignoring EV compensation when a scene mode was set. Change-Id: I15023a5c6019ca333a4ce40f178a8e4ef53be387 Signed-off-by: Tyler Luu <tluu@ti.com>
Diffstat (limited to 'camera/OMXCameraAdapter')
-rw-r--r--camera/OMXCameraAdapter/OMX3A.cpp26
-rw-r--r--camera/OMXCameraAdapter/OMXCameraAdapter.cpp2
2 files changed, 16 insertions, 12 deletions
diff --git a/camera/OMXCameraAdapter/OMX3A.cpp b/camera/OMXCameraAdapter/OMX3A.cpp
index 17cd43c..b5416ca 100644
--- a/camera/OMXCameraAdapter/OMX3A.cpp
+++ b/camera/OMXCameraAdapter/OMX3A.cpp
@@ -63,7 +63,12 @@ status_t OMXCameraAdapter::setParameters3A(const CameraParameters &params,
// set preset scene mode immediately instead of in next FBD
// for feedback params to work properly since they need to be read
// by application in subsequent getParameters()
- return setScene(mParameters3A);
+ ret |= setScene(mParameters3A);
+ // re-apply EV compensation after setting scene mode since it probably reset it
+ if(mParameters3A.EVCompensation) {
+ setEVCompensation(mParameters3A);
+ }
+ return ret;
} else {
mPending3Asettings |= SetSceneMode;
}
@@ -681,7 +686,6 @@ status_t OMXCameraAdapter::setScene(Gen3A_settings& Gen3A)
// Get preset scene mode feedback
getFocusMode(Gen3A);
getFlashMode(Gen3A);
- getEVCompensation(Gen3A);
getWBMode(Gen3A);
// TODO(XXX): Re-enable these for mainline
@@ -1534,16 +1538,18 @@ status_t OMXCameraAdapter::apply3Asettings( Gen3A_settings& Gen3A )
* There is only one exception to this rule,
* the manual a.k.a. auto scene.
*/
- if ( ( SetSceneMode & mPending3Asettings ) )
- {
+ if (SetSceneMode & mPending3Asettings) {
mPending3Asettings &= ~SetSceneMode;
- return setScene(Gen3A);
- }
- else if ( OMX_Manual != Gen3A.SceneMode )
- {
- mPending3Asettings = 0;
- return NO_ERROR;
+ ret |= setScene(Gen3A);
+ // re-apply EV compensation after setting scene mode since it probably reset it
+ if(Gen3A.EVCompensation) {
+ setEVCompensation(Gen3A);
}
+ return ret;
+ } else if (OMX_Manual != Gen3A.SceneMode) {
+ // only certain settings are allowed when scene mode is set
+ mPending3Asettings &= SetEVCompensation;
+ }
for( currSett = 1; currSett < E3aSettingMax; currSett <<= 1)
{
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
index 3730bc2..00212d5 100644
--- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
+++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
@@ -621,8 +621,6 @@ void OMXCameraAdapter::getParameters(CameraParameters& params)
const char *valstr = NULL;
LOG_FUNCTION_NAME;
- params.set(CameraParameters::KEY_EXPOSURE_COMPENSATION, mParameters3A.EVCompensation);
-
valstr = getLUTvalue_OMXtoHAL(mParameters3A.WhiteBallance, WBalLUT);
if (valstr) params.set(CameraParameters::KEY_WHITE_BALANCE , valstr);