summaryrefslogtreecommitdiffstats
path: root/camera/OMXCameraAdapter
diff options
context:
space:
mode:
authorEmilian Peev <epeev@mm-sol.com>2012-05-02 15:04:50 +0300
committerWu-cheng Li <wuchengli@google.com>2012-05-04 23:28:47 +0800
commitd8bf3dc07ef357eb0761cfdacab458f2358907aa (patch)
tree4ce2447b61a8e5010baa0bb5d837161435bdedef /camera/OMXCameraAdapter
parent06eefd58a5593c2bf780c89c6c2e0ff1d34045bc (diff)
downloadhardware_ti_omap4xxx-d8bf3dc07ef357eb0761cfdacab458f2358907aa.zip
hardware_ti_omap4xxx-d8bf3dc07ef357eb0761cfdacab458f2358907aa.tar.gz
hardware_ti_omap4xxx-d8bf3dc07ef357eb0761cfdacab458f2358907aa.tar.bz2
CameraHal: Do full AF sweep during lost AF status
- Previously only "OMX_FocusStatusUnableToReach" status was activating the full AF scan. Currently with CAF callbacks updates in Ducati, this is no longer the case and "OMX_FocusStatusLost" should be considered as well. Bug: 6378194 Change-Id: Ib296c6d7197cd275a9e5106f791451f4179be3e9 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Diffstat (limited to 'camera/OMXCameraAdapter')
-rwxr-xr-xcamera/OMXCameraAdapter/OMXCameraAdapter.cpp1
-rw-r--r--camera/OMXCameraAdapter/OMXFocus.cpp17
2 files changed, 10 insertions, 8 deletions
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
index a41327c..b3fcf67 100755
--- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
+++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
@@ -2968,6 +2968,7 @@ OMX_ERRORTYPE OMXCameraAdapter::OMXCameraAdapterFillBufferDone(OMX_IN OMX_HANDLE
{
ancillaryData = (OMX_TI_ANCILLARYDATATYPE*) extraData->data;
snapshotFrame = ancillaryData->nDCCStatus;
+ mPending3Asettings |= SetFocus;
}
}
diff --git a/camera/OMXCameraAdapter/OMXFocus.cpp b/camera/OMXCameraAdapter/OMXFocus.cpp
index 50e2c21..be1dfc5 100644
--- a/camera/OMXCameraAdapter/OMXFocus.cpp
+++ b/camera/OMXCameraAdapter/OMXFocus.cpp
@@ -148,9 +148,10 @@ status_t OMXCameraAdapter::doAutoFocus()
}
}
- if ( (focusControl.eFocusControl == OMX_IMAGE_FocusControlAuto
- && (focusStatus.eFocusStatus == OMX_FocusStatusRequest
- || focusStatus.eFocusStatus == OMX_FocusStatusUnableToReach) ) ||
+ if ( (focusControl.eFocusControl == OMX_IMAGE_FocusControlAuto &&
+ ( focusStatus.eFocusStatus == OMX_FocusStatusRequest ||
+ focusStatus.eFocusStatus == OMX_FocusStatusUnableToReach ||
+ focusStatus.eFocusStatus == OMX_FocusStatusLost ) ) ||
(mParameters3A.Focus != (OMX_IMAGE_FOCUSCONTROLTYPE)OMX_IMAGE_FocusControlAuto) )
{
OMX_INIT_STRUCT_PTR (&bOMX, OMX_CONFIG_BOOLEANTYPE);
@@ -163,11 +164,11 @@ status_t OMXCameraAdapter::doAutoFocus()
// force AF, Ducati will take care of whether CAF
// or AF will be performed, depending on light conditions
- if ( focusControl.eFocusControl == OMX_IMAGE_FocusControlAuto
- && focusStatus.eFocusStatus == OMX_FocusStatusUnableToReach )
- {
- focusControl.eFocusControl = OMX_IMAGE_FocusControlAutoLock;
- }
+ if ( focusControl.eFocusControl == OMX_IMAGE_FocusControlAuto &&
+ ( focusStatus.eFocusStatus == OMX_FocusStatusUnableToReach ||
+ focusStatus.eFocusStatus == OMX_FocusStatusLost ) ) {
+ focusControl.eFocusControl = OMX_IMAGE_FocusControlAutoLock;
+ }
if ( focusControl.eFocusControl != OMX_IMAGE_FocusControlAuto )
{