CameraHal: Remove excessive focus mode configurations
- This change should improve overall stability during
image capture. Configuring focus mode while image
capture is active is always going to result in
'OMX_ErrorBadParameter'.
Bug: 6026480
Change-Id: I735c5d25adc293d163f77488c0dc6d30a636544b
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
index 12facc0..b5f156e 100755
--- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
+++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
@@ -2972,11 +2972,6 @@
}
}
- if ( (nextState & CAPTURE_ACTIVE) )
- {
- mPending3Asettings |= SetFocus;
- }
-
///Prepare the frames to be sent - initialize CameraFrame object and reference count
// TODO(XXX): ancillary data for snapshot frame is not being sent for video snapshot
// if we are waiting for a snapshot and in video mode...go ahead and send
@@ -3044,10 +3039,13 @@
// On the fly update to 3A settings not working
// Do not update 3A here if we are in the middle of a capture
// or in the middle of transitioning to it
- if( mPending3Asettings && ((nextState & CAPTURE_ACTIVE) == 0))
+ if( mPending3Asettings &&
+ ( (nextState & CAPTURE_ACTIVE) == 0 ) &&
+ ( (state & CAPTURE_ACTIVE) == 0 ) )
{
apply3Asettings(mParameters3A);
}
+
}
else if( pBuffHeader->nOutputPortIndex == OMX_CAMERA_PORT_VIDEO_OUT_MEASUREMENT )
{
diff --git a/camera/OMXCameraAdapter/OMXFocus.cpp b/camera/OMXCameraAdapter/OMXFocus.cpp
index e9a969c..5703610 100644
--- a/camera/OMXCameraAdapter/OMXFocus.cpp
+++ b/camera/OMXCameraAdapter/OMXFocus.cpp
@@ -311,10 +311,11 @@
OMX_IMAGE_FocusControlAutoInfinity ) ) {
stopAutoFocus();
} else if (focusMode.eFocusControl == OMX_IMAGE_FocusControlAuto) {
+ // This re-enabling of CAF doesn't seem to
+ // be needed any more.
// re-apply CAF after unlocking and canceling
- mPending3Asettings |= SetFocus;
+ // mPending3Asettings |= SetFocus;
}
-
// If the apps call #cancelAutoFocus()}, the face callbacks will also resume.
pauseFaceDetection(false);