Skip to content

Commit

Permalink
OMAP4 CameraHAL: Take care of few corner scenarios when hitting HOME …
Browse files Browse the repository at this point in the history
…button during Image capture

- We don't have to DQ buffers from overlay on stopPreview since the overlay is going to be destroyed anwyay
and the buffers freed. So removed the handleFrameReturn() call from stopPreview.

- There was a race condition between stopPreview and startImageCapture functions as startImageCapture is executed in a
different thread and there was no synchronization between the two, leading to component being forced to LOADED state
with image port still enabled and capturing images. This is fixed now by proper usage of mLock to prevent the race
condition.

- If stopImageCapture is called, we wait for the ongoing image capture to complete before we disable the image capture
port. Otherwise, it messes up OMXCamera's state.

- There was a deadlock situation between AF callback and stopPreview in CameraHAL. The callback was being sent even
though the focus was cancelled previously. This patch takes care of this corner case and returns from doAutoFocus
if the focus was cancelled while waiting for the callback.

Signed-off-by: Sundar Raman <sunds@ti.com>

Patch Set 13: Simple cherry-pick on current tree.  No changes made.
Taking verifications, approvals and build test from previous patch sets.
Signed-off-by: Jean Johnson <jean-johnson@ti.com>
Change-Id: I2824358b1fbecac17d9762706e45c3b7a50f5aed
  • Loading branch information
Sundar Raman authored and Jean Johnson committed Apr 15, 2011
1 parent 10db7dd commit b52fe5d
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 66 deletions.
7 changes: 7 additions & 0 deletions camera-omap4/inc/OMXCameraAdapter/OMXCameraAdapter.h
Expand Up @@ -677,6 +677,7 @@ class OMXCameraAdapter : public BaseCameraAdapter
Mutex mFocusLock;
bool mWaitingForSnapshot;
int mSnapshotCount;
bool mCaptureConfigured;

//Temporal bracketing management data
mutable Mutex mBracketingLock;
Expand Down Expand Up @@ -717,6 +718,12 @@ class OMXCameraAdapter : public BaseCameraAdapter
// Time source delta of ducati & system time
OMX_TICKS mTimeSourceDelta;
bool onlyOnce;


Semaphore mCaptureSem;
bool mCaptureSignalled;


};
}; //// namespace
#endif //OMX_CAMERA_ADAPTER_H
Expand Down

0 comments on commit b52fe5d

Please sign in to comment.