summaryrefslogtreecommitdiff
path: root/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
AgeCommit message (Collapse)Author
2012-11-07Revert "CameraHal: Sync AF cancel with incoming OMX events"android-sdk-support_r11android-cts-4.2_r2android-cts-4.2_r1android-4.2_r1android-4.2.2_r1.2android-4.2.2_r1.1android-4.2.2_r1android-4.2.1_r1.2android-4.2.1_r1.1android-4.2.1_r1jb-mr1.1-releasejb-mr1.1-devjb-mr1-releasejb-mr1-devEino-Ville Talvala
This reverts commit b96dffd40e25d29a61f9fbd7f2e5968b5335b957. Bug: 7495861
2012-10-23CameraHal: Sync AF cancel with incoming OMX eventsEmilian Peev
- Cancel AF is made to wait on incoming OMX events when AF status changes. An AF timeout is introduced in order not to block this call indefinitely. - Additionally calls to 'autoFocus()' will immediately trigger AF callbacks if fixed modes are being used. Bug: 6949572 Change-Id: I5f240fb6fc7fe53aecaff76d75d608dd522c1e27 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-05-23CameraHal: Avoids possible race conditions while accessing 'mParams'Emilian Peev
- Direct access of 'mParams' outside of 'get-/setParameters()' should be avoided. The underlying strings can get invalidated with each call to 'setParameters()', which can lead to instabilities. - This change also removes legacy stereo code, which is not used any more. Bug: 6509329 Change-Id: Ief6df206c33fbdc666644cea8630e0bce6a36c00 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-03-23CameraHal: Speedup face detection startEmilian Peev
- Currently when face detection gets enabled the face priority for AE and AF is getting configured as well. This configuration takes around 18 ms. on average and can delay the overall startup time. The optimization will move the algo setup away from face detection enablement and in to the FillBufferDone callback. Bug: 5488236 Change-Id: I2b0e8df9fdead7a5d761a1efbcbf57d39e27ae3c Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-03-13CameraHal: Omit 'apply3Adefaults()' during initializationEmilian Peev
- This change should improve the standby to first shot PPM bug:6136966 Signed-off-by: Emilian Peev <epeev@mm-sol.com> Change-Id: I20ffd1178a64b77d45b35bac1cf04be21d2d602b
2012-02-11CameraHal: Various AF related fixesEmilian Peev
- In case of AF timeout the focus callback was being disabled. This callback will not get re-enabled again until preview is restarted. - Cancel AF is not working properly. Depending on the timing the off status event might not reach 'doAutoFocus()'. - This change also replaces the 'mDoAFSem' semaphore with a condition variable. Change-Id: I2ab7d87a05d97435aa6e67a122cc37a975794fc2 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-02-01CameraHal: Implementation for CAF status callbacksTyler Luu
1. Remove internal handling of CAMERA_MSG_FOCUS. Before we were enabling CAMERA_MSG_FOCUS only when application calls autoFocus(). No longer needed since the CAMERA_MSG_FOCUS can come just during preview now. 2. Add handling of unregistered focus callbacks. Since OMXCamera will send callbacks even when we are not waiting for one, add some handling. Signed-off-by: Tyler Luu <tluu@ti.com> Change-Id: I457e67b33b2561dd0b1ce3863ce807a8c27f79f6 Conflicts: camera/OMXCameraAdapter/OMXFocus.cpp
2011-12-01CameraHAL: Handling OMX initializationAkwasi Boateng
Additional mOmxInitialized flag has been added to track whether OMX has been succesfully initialized to prevent duplicate OMX_DeInit() in OMXCameraAdapter destructor. Signed-off-by: Daniel Levin <x0155538@ti.com> Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com> Change-Id: I269c5ac9d5de3f3e9088a11a3bea7127c1bd79de
2011-11-22CameraHal: Add more Exif data for video snapshotTyler Luu
Fixes b/5582076. Requires changes to Ducati and external/jhead. 1. Add API to get and set ancillary data metadata so we can use the values to fill in Exif data. 2. Add support for additional tags. Change-Id: I537e683839c59e92a4a20ff62653b6d46e303f53 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-11-10CameraHAL: Clear events queue fix, clear command queue on exitSundar Raman
Fix 2/3 for b/5593964. 1. The events queue wasn't being cleared correctly inside OMXCameraAdapter as some items were being removed while the index was being formulated based on the original size 2. The command queue should be cleared before posting the EXIT message for the OMX adapter threads so as not to process those messages since we are exiting Change-Id: I0a5eaceb3d1504fee05b064ebb5fe888e129ad44 Signed-off-by: Sundar Raman <sunds@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-10-31CameraHAL: Use Ancillary data to check for snapshotMilen Mitkov
Uses the ancilary data field nDCCStatus to check if the preview frame is a snapshot. Fixes a rare issue in which a normal (non-snapshot) preview frame is received after capture has started. Change-Id: I242c17ee3dd1365eb24c6c15585bb125f6938dee Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com> related-to-bug: 5472396
2011-10-26CameraHal: Fixes for #testFocusDistanceTyler Luu
1. Seperate OMXCameraAdapter cancelAutoFocus with unsetting focus lock. Adding new internal parameter to unlock focus from the cancelAutoFocus in CameraHal. We need to cancel auto focus during stop preview in case it is still running. If we do the unlock in OMXCameraAdapter then, focus distance can change after stopPreview. 2. If autoFocus or takePicture comes after startPreview but before the first preview frame comes, then sometimes the focus distance queried after the calls won't be correct since OMX camera might still be transitioning. 3. Update focus distances when focus is running. b/5473673 Change-Id: I5a27d78aef437a1601a68e8c08fa860f04fc0c55 Signed-off-by: Tyler Luu <tluu@ti.com>
2011-10-20CameraHAL: WA for #testSceneModeTyler Luu
testSceneMode requires parameters to be updated properly before starting preview. OMX Camera doesn't currently support this so we are just going to keep a hard-coded LUT for the scene modes for now. Change-Id: I40c4492834d43c9328c87fd7aa4ea06fb1f1d90b Signed-off-by: Tyler Luu <tluu@ti.com>
2011-10-19CameraHAL: Fix for #testJpegExifSundar Raman
Set the focal length to correct defaults for primary and secondary for the sensors on the phone. Previous camerahal value was wrong. Call setupEXIF even in the case where we return from useBufferCapture when the port is already enabled. Change-Id: I224ec2f19af11de525455015c1822ba6a13c4d17 Signed-off-by: Sundar Raman <sunds@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-10-19CameraHAL: Keep image port enabled if possibleTyler Luu
Try to keep the image port enabled if possible after capturing an image. We need to disable the image port if any settings are changed or when stopping preview. To disable image port, buffers also have to be freed, and to keep the image port enabled, the same buffer needs to be used. So, we are reenabling functionality to trigger free the image buffer from camera adapter to free the buffer as late as possible and as required by camera adapter. Skip image buffer allocation if it is already enabled. Fixes issue with some jerks seen in preview during video capture while taking snapshot. b/5449158 Change-Id: I830cf8512fe039df10d28e1f5a22e61e30840852 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-10-19CameraHAL: protect mParameters3A from simultaneous read/write.Raji Reddy Kandi
Fix for Issue: Idle -> remove from the latest launched apps -> Launch Camera -> Settings -> Restore defaults -> ok -> Flash mode On -> White balance Cloudy -> Exposure -3 -> Scene mode Party -> Shooting -> Camcoder mode -> Settings -> Restore defaults -> ok ==> video preview is red even after we restored the settings. Change-Id: If4b3672693a092f1956708742a6cc5f2c2c284fb Signed-off-by: Raji Reddy Kandi <rajireddy.k@samsung.com>
2011-10-18CameraHal: Share a lock for exec and loaded switchTyler Luu
Share a lock between switchToLoaded function and doSwitchToExecuting, so the two don't try to switch state at the same time. b/5472446 Change-Id: I425943b97b7f08d1f7812214e4a305eb86af1ff9 Signed-off-by: Tyler Luu <tluu@ti.com>
2011-10-15CameraHal: Fixes for #testVideoSnapshotTyler Luu
1. Add raw notify callback for video snapshot 2. Add new state for video capture + AF 3. We were not populating focal length correctly for jhead. Need to send focal length as a rational in this format "xx/yy" 4. Need to send GPSProcessingMethod as an UNDEFINED ASCII to jhead b/5448171 Change-Id: Ie6be9ad821d1fa106d9c857681f2fa6427d4f283 Signed-off-by: Tyler Luu <tluu@ti.com>
2011-10-15CameraHal: Enable 3A feedback for scene modesTyler Luu
When a scene mode is set by the application, some 3A parameters will be updated by Ducati. Feed these parameters back to the application. Change-Id: I07afec0315d2807470037388572d0bc7ee8c3ad8 Signed-off-by: Tyler Luu <tluu@ti.com>
2011-10-14CameraHal: Adapt to new framework vstab paramTyler Luu
change to use the new KEY_VIDEO_STABILIZATION parameter from the framework instead of using TICameraParameter definition. Change-Id: Ifed4c147e6ad3c02b35772343d9d339ab1402eac Signed-off-by: Tyler Luu <tluu@ti.com>
2011-10-12CameraHAL: Restore zoom stages back to 60Sundar Raman
This provides for a smooth zoom experience with immediate zoom This reverts commit a38ea5631d139c3d5ffd4e181df2216dbce1b10c. Fixes b/5251916 Change-Id: If1724ec2ad5d3106e10ee5c2e691f99c19675eaf
2011-10-12CameraHAL: Pass zoom values smoothlySundar Raman
Update the zoom values to the ducati only in the fillBufferDone callback if another zoom request is already in progress. However, overwrite the zoom value with the latest value requested by the application Fixes b/5251916 Change-Id: I419baadb2ddd094277f003ddf25f63dca5d078f8 Signed-off-by: Sundar Raman <sunds@ti.com>
2011-10-07CameraHal: Fix issue with not setting 3A settingsTyler Luu
Accidently redefined some of the values for 3A settings enum in 3a general settings header file. Change-Id: I84b72ae0516d0362d381c4fa1d597cae86571fd7 Signed-off-by: Tyler Luu <tluu@ti.com>
2011-10-07omap4xxx: camera: set capture settings only if changedTyler Luu
Partial fix for b/5371242 Only set capture configs when they have changed from our current setting to save some SetConfig time. Change-Id: I68d7b7ebd4be3273abd534ce8e939da62d38d481 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-10-07omap4xxx: camera: switch to executing state when surface is nullAkwasi Boateng
Partial fix for b/5422679 To enhance standby to first shot performance Change-Id: Ib32e8120a7908419c76e8cf2f1830f0667b258c0 Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-10-07omap4xxx: camera: send different preview and video buffers for MMS modeAkwasi Boateng
Fixes b/5265389 b/5156090 1. Add support to send different preview and video buffers to framework in MMS mode. 2. For resolutions less than or equal to QVGA, preview resolution will be changed to a bigger resolution matching the aspect ratio of the preview resolution. 3. During record the changed resolution will be resized to the original resolution and sent to the encoder. 4. Modified NV12 resizer routine to account for frame offset and stride to avoid double memcpy of the buffers Change-Id: If66aa1fd861078d0a63b4a77a1bdc20d4c6bccda Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-10-07CameraHal: Allow only certain number of instancesTyler Luu
1) Protect against simultaneous access to camera_device_open 2) Set a value of MAX_SIMUL_CAMERAS_SUPPORTED to dictate number of simultaneous cameras that can be open at once. Set to 1 for now in this patch. Return error if more is requested. 3) Change OMXCameraAdapter to allocate new instance for each factory create call. 4) Add lock to capabalities factory function in OMXCameraAdapter to protected against multiple OMXCamera GetHandles... b/5401791 b/5404200 b/5405235 Change-Id: I179d493f8070d228877ebfac637047978afc7d55 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-09-27CameraHAL: Improved error handling inside the adaptersSundar Raman
1. unlock and cancel buffers to ANativeWindow when freeBuffers is called 2. Free the omx handle and deinitialize DOMX when errors occur while calling critical OMXCamera apis 3. Retry OMX_GetHandle if it fails to take care of error recovery scenarios. "Fixes b/5379663" Change-Id: I4729fab40e6104dfa6660ba6f6b1a90f805c2f59 Signed-off-by: Sundar Raman <sunds@ti.com>
2011-09-23Make previous zoom index a member variableAkwasi Boateng
Change previous zoom index variable from static to member variable since variable is not reset when application is closed or during suspend resume. Change-Id: I7a757655dc7e5b30d21716dd38908f3d18131cde Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
2011-09-23CameraHal: Add metering area mutexTyler Luu
mMeteringAreas needs to be protected by a mutex so it's not cleared or modified while setting it Ducati. Change-Id: I0ca8f5e3b57b88b518a8e1ab22c442c21131e39c Signed-off-by: Tyler Luu <tluu@ti.com>
2011-09-21OMXCameraAdapter: Update timstamp calculation and commentDevaraj Rangasamy
In timestamp calculation, latency incurred in Ducati camera buffer reaching CameraHal should be considered Patchset 2: - Updated variable name, migrated to header file - Update comment description Change-Id: Icc93c27a66477867e9c415b139a331646eb2fba8 Signed-off-by: Devaraj Rangasamy <dev@ti.com>
2011-09-21CameraHal: Add filter to smooth faces from OMXCameraTyler Luu
Filter faces coming from Ducati to smooth out the jitter. This patch requires the face tracking mechanism in Ducati so faces are ordered properly for each frame. Also, this patch is only providing filtering of face sizes since Ducati is already smoothing the face positions. b/5141268 Change-Id: Ia7ee1c46ca41fcdd1e45505242f2802b0b4fb647 Orginal-author: Mandeep Kumar <mandeep@ti.com> Signed-off-by: Tyler Luu <tluu@ti.com>
2011-09-19CameraHal: Lock focus after AF completionTyler Luu
1) Add API to use OMX_IndexConfigImageFocusLock to lock autofocus 2) Remove FIXME to always return true status when CAF is set Change-Id: Ie195206243bc1f750954def5f4f9f4466295bc7c b/5338488
2011-09-19CameraHAL: Fixes for FPS range configurationSundar Raman
Change-Id: Idfc506812d6e0f1d88bdc5d7d62c159f9c9ad642 Signed-off-by: Sundar Raman <sunds@ti.com>
2011-09-14Update frame ref countingAkwasi Boateng
1. Make only one sendframe call from OMXCameraAdapter 2. Add frame type mask to frame structure 3. Frame type mask used to indicate type of frame e.g video, preview, image or preview and video 4. Set frame ref count before sending frames to subscribers. 5. Hold frame subscriber lock for setting the refcount and sending the frames to the subscribers to allow for the number of subscribers not to change until frames are sent. Change-Id: Ic00a195847f2dc962e931ee8a9f36e3933e67c2d Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
2011-09-12CameraHal: Add Exif support to video snapshotTyler Luu
Use jhead library to insert Exif to jpeg stream returned from libjpeg. Change-Id: Ia6398180b7ef3c1b3ddcb35e489527289565fef5 Signed-off-by: Tyler Luu <tluu@ti.com>
2011-09-12Unblock semaphores during Fatal ErrorsAkwasi Boateng
1. Remove all pending events and unblock all waiting semaphore during Fatal error. 2. Exit execution when in invalid state. 3. Remove error nitiifcation from Appcallback thread Change-Id: I1612ff75e83ebf285d4cc168a829e0f81d4968b1 Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
2011-09-12CameraHAL CTS: Fix for #testAutoExposureLock, #testAutoWhiteBalanceLockSundar Raman
Locks were not retained if the user forces the lock to true before calling autoFocus. This patch addresses this scenario. Change-Id: I2b5161806f8123b3042d46bc856773f0d4701458 Signed-off-by: Sundar Raman <sunds@ti.com>
2011-09-12CameraHAL: Default continuous autofocus mode for 3rd party appsSundar Raman
3rd party apps like bar code scanner work really well with continous auto focus as the default mode. So this patch sets the default focus mode to continuous-picture Change-Id: I721ad98f26ad18a6ecf98c09c16ac17e8aacdf05 Signed-off-by: Sundar Raman <sunds@ti.com>
2011-09-09Destroy and recreate semaphore in case of timeoutAkwasi Boateng
Destroy and recreate semaphor during timeout and remove event from event queue. Change-Id: Id9428ff58a55f90a6807776327bfba1961d9089d Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
2011-09-07Revert "Revert "CameraHAL : Multiple focus and exposure areas support""Iliyan Malchev
This reverts commit 72bac2af47f73167bd288bc7278e5496ccabe6f4.
2011-09-06Revert "CameraHAL : Multiple focus and exposure areas support"Iliyan Malchev
This reverts commit bd9754a1b2c8d5e0a8788d0e42d018857bfef7a7. Conflicts: camera/inc/OMXCameraAdapter/OMXCameraAdapter.h Change-Id: Iad51c457b05de9b5492061b8402e508a6c5b42bf
2011-09-02CameraHal: Set KEY_VIDEO_SNAPSHOT_SUPPORTED defaultTyler Luu
Change-Id: I106a62bc752398f52224d1b1b7ef78a703ab1f17 Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-09-02CameraHAL : Multiple focus and exposure areas supportMilen Mitkov
Adds support for multiple focus and exposure areas and also correctly returning the number of maximum supported focus and exposure areas. - Patch set 4: converting the coordinates, which are sent to 3A in the range 0 - 255. Both Focus and Exposure algorithms use this range - Patch set 5: Handling special area (0, 0, 0, 0, 0), rebasing and also memory allocation alignment to 4K chunks. - Patch set 6: Freeing the alloc'd buffer in case of error. Change-Id: I45bdd4309b75ac4d50deb05e97120362cdb1937b Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com>
2011-08-31CameraHAL: Fixes some uninitialized variables in OMXCameraAdapterTyler Luu
Change-Id: I3603c8ea55cf8ffc1479ec2cc0df437bd2838ad1 Original-author: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Tyler Luu <tluu@ti.com>
2011-08-31CameraHAL: Adds locking when accessing 'mFocusAreas'Tyler Luu
- This is due to the access pattern of 'mFocusAreas. Currently both 'setFocusMode()' and 'setParametersFocus()' can in parallel try to write/read from this Vector. A race condition is possible, in which the former method can clear a focus area, while the latter method is trying to increment its strong pointer. This will inevitably result in a segfault. Change-Id: I0e94d18326b85c20f73296d31d980b9c39685c32 Original-author: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Tyler Luu <tluu@ti.com>
2011-08-31CameraHAL: Improves GPS conversion accuracyTyler Luu
- Fix needed for CTS test #testJpegExif Change-Id: Ib43edeb569d014e94114e3d2a2017357ff9c0eb9 Original-author: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Tyler Luu <tluu@ti.com>
2011-08-31CameraHAL: Enable GBCE by defaultSundar Raman
Needed to improve image quality Change-Id: I727b8ee21a186e1616e690f85075e4e8a64617f9 Signed-off-by: Sundar Raman <sunds@ti.com>
2011-08-29CameraHAL: Reduce the number of zoom stages to make it responsiveSundar Raman
Reduce the number of zoom stages from 61 to 31 to make the smooth zoom more responsive. Change-Id: I74eb20795cc5164cb03ca7155300bed7cd0716e6 Signed-off-by: Sundar Raman <sunds@ti.com>
2011-08-26CameraHal: Use LUT to populate VFR listTyler Luu
Instead of trying to calculate supported VFR list from the min and max reported from Ducati, use a prepopulated LUT. It is difficult to programmatically add odd variable framerates, i.e (24,30). Change-Id: I149ee68dddd57f0f0f69ded6ad51739eec79c771 Signed-off-by: Tyler Luu <tluu@ti.com>