summaryrefslogtreecommitdiff
path: root/camera
AgeCommit message (Collapse)Author
2011-12-14Use local time in EXIF.android-sdk-4.0.3-tools_r1android-cts-verifier-4.0_r1android-cts-verifier-4.0.3_r1android-cts-4.0.3_r2android-cts-4.0.3_r1ics-mr1Angus Kong
UTC is only used in GPS time stamp and local time is used in other date/time field. bug: 5757809 Change-Id: I8c728dca9db003c6a750df300d993e3615ef71c8
2011-12-01CameraHAL: Fixes a couple of corner cases with AF and capture DO NOT MERGEAkwasi Boateng
Fixes b/5627968. On some occasions during monkey tests, both the AF callback and the shutter callback can be delayed just enough to encounter the OMX component in loaded state. Usually this happens when the camera is getting closed and this scenario should be properly handled by exiting immediately without trying to trigger any callbacks to the client. Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com> Change-Id: Ia18faf471a8e10579b09973178d73e69e782c63c
2011-11-30CameraHAL: Perform focus even if CAF has failedMilen Mitkov
Fixes b/5534973 Used to force focus if CAF has failed (before capture). CAF's state is 'failed' even if a scene change is detected only. Change-Id: I0878a9f862b7800b566e578efdfa62baec7e5889 Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com>
2011-11-30CameraHAL: Enable LDCNSF for Video snapshotMilen Mitkov
Enables LDCNSF for Video snapshot, also adds start_offset and right_crop fields to the JPEG encoder wrapper, because the image with LDCNSF has artifacts on top and right. Change-Id: I1011252e3f8068083f9d057b7763b7f79c59a75d Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com>
2011-11-18am 0bb54549: Ignore camera.flash_off system property for user buildJames Dong
* commit '0bb5454945320db77ff426baf9c0c34631c373ab': Ignore camera.flash_off system property for user build
2011-11-17Ignore camera.flash_off system property for user buildandroid-sdk-adt_r16.0.1android-cts-4.0_r1ics-mr0James Dong
This system property is meant for testing only and should be ignored for user build. Change-Id: I553b68d62f41012766d7d208451a178a733d151e related-to-bug: 5617451
2011-11-17CameraHAL: clean up logsIliyan Malchev
-- introduce CAMHAL_LOGI so that we don't have to dump informational messages as LOGE -- convert some verbose messages to CAMHAL_LOGDB -- convert most frequent non-error log messages to CAMHAL_LOGI Change-Id: I8afc24aa17da2c157b7b37300a79b4cde81f87e5 Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-11-17CameraHAL: Do not return error if AF failsIliyan Malchev
Fixes b/5612881 Some third-party apps do not handle errors thrown by the camera HAL when they try to invoke autoFocus while AF is in progress. The Barcode Scanner, in particular, will quit in this case without releasing the Camera handle, wreaking all sorts of power-management havoc. Even though CTS does not mandate it, previous versions of Android and other camera HAL implementations simply return success in this case. This patch makes this HAL conform to this behavior. Change-Id: I758e2de7f84b61043267f052169068b64d75d0d1 Signed-off-by: Sundar Raman <sunds@ti.com>
2011-11-16CameraHal: Use Different Timeout for Video ModeTyler Luu
Select AF timeout based on whether or not we are in video mode. b/5492725 Change-Id: I2fa722e6a3a7c149488ddb29ce44262914d19e38 Signed-off-by: Tyler Luu <tluu@ti.com>
2011-11-15When camera.flash_off is 1, disable camera flash.James Dong
This is for testing purpose only Change-Id: Idf0a6d5d52daeb4b5ff7576d0119868bdeff40eb related-to-bug: 5617451
2011-11-11videosnapshot memory corruption fixes.p-masterAkwasi Boateng
1. Fixes memory corruption of dst buffer in nv21_to_yuv() convertion 2. Free malloced row_tmp buffer 3. Free params string in Appcallback Change-Id: I2179f1158f6e72cca0f7e5c815b1cb576bfa925e Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> related-to-bug: 5601247
2011-11-10Revert "CameraHAL: Fix preview not starting after surface is abdandoned"James Dong
This reverts commit cbaa66464ff86bddf40e3c8de8db44473ff27de9. we need to revert this change since this leads to a stop ship problem where we can only take a single picture.
2011-11-10CameraHal: WA for green thumbnail for video snapshotTyler Luu
WA for regression introduced with: 'cf0a61f135: CameraHAL: Use Ancillary data to check for snapshot" Video snapshot postview frames are not currently being tagged with the ancillary data. Let this check pass through when in video mode. Change-Id: I9b3aacb902d15f1cd7f993f6664976299fcb0427 Signed-off-by: Tyler Luu <tluu@ti.com>
2011-11-10CameraHAL: Fix preview not starting after surface is abdandonedTyler Luu
Fix 3/3 for b/5593964. (I'm bundling this fix with b/5573610 because it is preview-related, though strictly speaking not part of b/b/5573610. It has been with us since the beginning.) If an application gets backgrounded (HOME key) without stopping preview and releasing camera, preview would previously not restart when application is resumed. ANativeWindowDisplayAdapter would detect that the preview surface was abandoned and stop sending buffers to CameraAdapter. We were previously not doing anything when CameraService called setPreviewWindow when a display adapter was already created. To fix this issue, we need to send the preview window and restart preview. Change-Id: I36089b0046f9861897d32c50b52128a41e2de2a5 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-11-10CameraHAL: Fixes for ANR and a setParameter issueSundar Raman
Fix 1/3 for b/5593964. 1. Ensure we don't race with stopImageCapture when stopPreview is called 2. Signal the shutter callback correctly 3. Do not crash the media server if focus APIs and image capture returns error Still go ahead and perform de-init 4. Replace setParameter from CameraHAl to AppCallbackNotifier with getParameter when needed. Change-Id: I2b2745827d227a8d7927ce1611a84c29129e8891 Signed-off-by: Sundar Raman <sunds@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-11-09CameraHAL: Setting focus mode shouldnt start focus scanningMilen Mitkov
Part of the fix for b/5591797. Use the new index OMX_TI_IndexAutofocusEnable to control the AF algorithm when it should start scanning. Until now, setting the focus to almost any mode caused (unwanted) scanning. Also, "Infinity" focus should actually have the ability to perform scanning. Change-Id: Iaa0f46a17d63acdd8f43b4b2b011f68fc7506165 Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-11-09CameraHal: Apply3aSettings at start previewVladislav Hristov
Fixes b/5515136. Change-Id: I3b462b337f42be7ebe07642f5298f45bb1431daa Signed-off-by: Vladislav Hristov <vhristov@mm-sol.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-11-07CameraHal: Wait for frame before stopping previewTyler Luu
Fix 3/3 for b/5472396. We should wait for the first frame to come before trying to stopPreview. If not, we might put OMXCamera in a bad state i.e (IDLE->LOADED timeout). Seeing this a lot after a capture Change-Id: I4ac6cc4f12bdc0d4d73e065b7c53caf8a440a43c Signed-off-by: Tyler Luu <tluu@ti.com>
2011-11-07CameraHal: Clean-up if mCaptureSem times outTyler Luu
Fix 2/3 for b/5472396. In stopImageCapture, continue cleaning up even if mCaptureSem times out. Change-Id: Idf65a488b2ce55a9d451a899df0bc76f6480647b Signed-off-by: Tyler Luu <tluu@ti.com>
2011-11-07CameraHal: Add function to rollback state machineTyler Luu
Fix 1/3 for b/5472396. Adding a function to rollback the state machine to INTITIALIZED_STATE from any given current state. With this function, we can better manage the different states that CameraAdapter could be in when stopPreview is called. Change-Id: I0a456738e8575873b5ac6fb2a31395dab54ef6f7 Signed-off-by: Tyler Luu <tluu@ti.com>
2011-11-02CameraHal: Add 2592x1728 and 2592x1458 image capture resolutionsGilles-Arnaud Bleu-Laine
Part of the fix for b/5546023 Adding new resolution to support 16:9 and 3:2 aspect ratio. Note: This allows to keep same aspect ratio between video preview and video snapshot. This change requires a matching Ducati update. For the power savings to take effect, the new resolution must actually be used by the application. Change-Id: I87d5f3155856b0c2c83763349843628eeadfacfc Signed-off-by: Gilles-Arnaud Bleu-Laine <gilles@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-10-31CameraHAL: Return status after CAF finishesMilen Mitkov
If the user initiates autofocus while CAF is scanning (e.g. when capturing), wait until CAF finishes and just then notify the focus subscribers. bug:5514415 Change-Id: I971783c74f9977755cc93cdba964e4fcd3a2ab0a Signed-off-by: Milen Mitkov <mmitkov@mm-sol.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-28CameraHal: Limit 1080p framerate maxTyler Luu
Change-Id: Ic02b60940f80d309f9a87b6e1307fbbdd0c592ff Signed-off-by: Tyler Luu <tluu@ti.com> related-to-bug: 5508276
2011-10-27CameraHal: Check state in doAutoFocusTyler Luu
Check the state in doAutoFocus and return if we are not in the AF_STATE. If user/monkey is pressing all over the screen, this will result in multiple autoFocus/cancelAutoFocus calls until the last autoFocus call comes when the user/monkey stop pressing preview window. This will result in multiple CAMERA_PERFORM_AUTOFOCUS commands being queued in OMXCameraAdapter's CommandHandler that will all eventually need to be serviced which will result in multiple doAutoFocus calls. This is the reason why we need to check the state in the beginning of the function and return if we are not focusing. Change-Id: If245751a296604bca511ad237b769be24175cbc6 Signed-off-by: Tyler Luu <tluu@ti.com> related-to-bug: 5472396
2011-10-27Merge "Remove non-(calibrated, api, or verified) 3A settings" into ics-mr0James Dong
2011-10-27Remove non-(calibrated, api, or verified) 3A settingsTyler Luu
Change-Id: I16aaafeb43a0799cf12d97979709524e3b0fc933 Signed-off-by: Tyler Luu <tluu@ti.com> related-to-bug: 5472533
2011-10-27Only return error for Invalid stateAkwasi Boateng
Return error only for when component is in Invalid state and we make any focus calls Change-Id: I2efc3fb7859eca713b0ad738b7122ea8f36561c2 Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.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-25CameraHal: Remove non-API 3A settingsTyler Luu
b/5472533 Change-Id: I62ce16499c62e11a321c89872eec19d9d1eac635 Signed-off-by: Tyler Luu <tluu@ti.com>
2011-10-25Fixes for MMS setparameter crashesAkwasi Boateng
1. Fix native crash for set parameter when zoom is applied in MMS mode and while recording is in progress. 2. Don't allow restart of preview or preview stop when recording is in progress. 3. Fix slow zoom when in MMS mode casued by unnecessary preview restarts. 4. Fix initial jerky preview when you start recording in MMS mode caused by having to restart preview. Change-Id: Ie64799974488caae5887e4c9f9072d74a12dd797 Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> related-to-bug: 5507018
2011-10-25Fix garbled characters at the end of Exif Make/ModelTyler Luu
bug:5481563 Change-Id: Idce652daf7d6164ad84695cc76c358757b5c7b37 Signed-off-by: Tyler Luu <tluu@ti.com>
2011-10-24Fix for double OMX_Deinit() callsAkwasi Boateng
Change-Id: I43260d50a284a7d651b6309b344404bf45c7a617 Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> related-to-bug: 5451993
2011-10-21CameraHal: Fix for #testJpegThumbnailSizeTyler Luu
Fixes b/5492679 If an image capture is taken before running this test, the test will fail because the image capture settings were not being re-applied to the image port. This patch updates all the capture settings on first time init. Change-Id: Iac8ace02b271b431a55736fbbeee29fadc4393bd Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-10-20CameraHAL: Return null device when device_open failsTyler Luu
Partial fix for b/5451993 Change-Id: I47a1a3fec21b0e6a0abb8b956642b05b3a6be107 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-10-20CameraHAL: Allow WB, Exp, and Flash settings to change in sceneTyler Luu
Configure AE and AWB locks correctly in scene modes that require CAF (e.g., party scene). This makes CAF work correctly in such scenes. Change-Id: Ide4e32b73d10be8113af56735f7ee7e2398d240b Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com> 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-20CameraHAL: Disable AF assist in stop previewSundar Raman
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>
2011-10-19CameraHAL: allow set preview resolution when preview is enabledAkwasi Boateng
Fixes b/5397081 Allow preview resolution to be changed while previewing and also ignore stop preview while recording app should call stop recording. Change-Id: I85d0388f3fb2cd12593ab225389bda022cbd938b Signed-off-by: Iliyan Malchev <malchev@google.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: Select proper CAF mode for scene feedbackTyler Luu
We were not choosing the right CAF mode during scene mode feedback because CAF video has precedence in the focus mode LUT. Adding some logic to select CAF picture if we are not if video mode. Change-Id: I98260dae04708d5d42248cbafa4adb57ce18221f Signed-off-by: Tyler Luu <tluu@ti.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: Recorded video has jerks with video snapshotTyler Luu
Avoid video frame drops during video snapshot. We were previously not sending the video frame to AppCallbackNotifier because the first frame after video snapshot was considered a snapshot (postview) frame. This patch sets the video frame mask regardless of preview or snapshot frame during recording b/5449158 Change-Id: Idaecbaa53686b81428a3d63ea95481f5b6eff23d Signed-off-by: Raji Reddy Kandi <rajireddy.k@samsung.com> Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-10-19CameraHAL: Make CAF mode APIs consistentTyler Luu
Make FOCUS_MODE_CONTINUOUS_VIDEO and FOCUS_MODE_CONTINUOUS_PICTURE consistent to the user. For us, this means we need to make some decision on which capture mode to select based on which CAF mode is selected by the application. b/5441086 Change-Id: I39e51ea916e1baa263b6dcc88f76a4940809ecb9 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-19CameraHAL: Apply 3A settings offset for default valuesMilen Mitkov
Contrast, Sharpness and Saturation were configured with different values because of the required offsets. Change-Id: Ib84ef078b4d7fe671df116b56d29ea1c51dcd24c Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com>
2011-10-19CameraHAL: Always reset focus mode after captureMilen Mitkov
Workaround when doing many consecutive shots, CAF wasn't getting restarted. Change-Id: Ibef033535360dc534de2b761861f7e9c5e79aec2 Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com>
2011-10-19CameraHAL: Focus mode may override scene settingsMilen Mitkov
This is required since CAF and Touch focus are needed even in scenes different from manual. Change-Id: I8f3ecfd7474e988757a0a4c85b37459e2d1a671b Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com>
2011-10-19CameraHAL: Set face prio when starting face detectionMilen Mitkov
We don't need to set the exposure mode when starting face detection, just enable face priority. Previously, this caused the exposure mode for a given scene to be overwritten. Change-Id: I4bad4c9846b7d225f8f1bf346fdc3dac1b16ca1b Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com>