summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSundar Raman <sunds@ti.com>2011-10-20 13:30:07 -0700
committerIliyan Malchev <malchev@google.com>2011-10-20 13:57:44 -0700
commit697f06bc7657009b807865ba424e0b6dd33392e2 (patch)
tree46e33e3833fac4458862701e6f6dd4db71a71fc4
parent150f3c891ce774b1546e90fab640ccb9c29ce536 (diff)
downloadhardware_ti_omap4xxx-697f06bc7657009b807865ba424e0b6dd33392e2.zip
hardware_ti_omap4xxx-697f06bc7657009b807865ba424e0b6dd33392e2.tar.gz
hardware_ti_omap4xxx-697f06bc7657009b807865ba424e0b6dd33392e2.tar.bz2
CameraHAL: Disable AF assist in stop preview
If AF assist is ON when switching to video mode and flash is not set to OFF before switching, then the torch mode is somehow turned ON and never turns OFF. Since AF assist is not used after stopping preview, set it to OFF Change-Id: I44c9e6359a0488d235929f6bf1cdd4b257565caf Signed-off-by: Sundar Raman <sunds@ti.com>
-rwxr-xr-xcamera/OMXCameraAdapter/OMXCameraAdapter.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
index ba2de71..cae2815 100755
--- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
+++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
@@ -1899,6 +1899,23 @@ status_t OMXCameraAdapter::stopPreview()
// Error, but we probably still want to continue to stop preview
}
+ OMX_CONFIG_FOCUSASSISTTYPE focusAssist;
+ OMX_INIT_STRUCT_PTR (&focusAssist, OMX_CONFIG_FOCUSASSISTTYPE);
+ focusAssist.nPortIndex = OMX_ALL;
+ focusAssist.bFocusAssist = OMX_FALSE;
+ CAMHAL_LOGDB("Configuring AF Assist mode 0x%x", focusAssist.bFocusAssist);
+ eError = OMX_SetConfig(mCameraAdapterParameters.mHandleComp,
+ (OMX_INDEXTYPE) OMX_IndexConfigFocusAssist,
+ &focusAssist);
+ if ( OMX_ErrorNone != eError )
+ {
+ CAMHAL_LOGEB("Error while configuring AF Assist mode 0x%x", eError);
+ }
+ else
+ {
+ CAMHAL_LOGDA("Camera AF Assist mode configured successfully");
+ }
+
if ( 0 != mStopPreviewSem.Count() )
{
CAMHAL_LOGEB("Error mStopPreviewSem semaphore count %d", mStopPreviewSem.Count());