summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* CameraHal: Allow only certain number of instancesTyler Luu2011-10-079-249/+219
| | | | | | | | | | | | | | | | | 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>
* hwc: make docking/mirroring properties persistantErik Gilling2011-10-061-4/+4
| | | | | Change-Id: I343b2c8ff7adbe56ce16ac80aa3c001e20eba56b Signed-off-by: Erik Gilling <konkers@android.com>
* hwc: finetune hdmi cloning supportLajos Molnar2011-10-061-27/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use properties to enable/disable hdmi mirroring/docking, and to set transformation for mirroring/docking: hwc.hdmi.mirroring.enabled hwc.hdmi.docking.enabled hwc.hdmi.mirroring.transform hwc.hdmi.docking.transform The following use-cases are supported: 1) mirroring-only (external layers are ignored) - for testing only 2) docking-only 3) mirroring and docking (default) transform values are bitfields: bits 0-1: number of clockwise 90-degree rotations bit 2: horizontal mirroring (applied after rotation) mirroring transform is performed in addition to LCD transformations. docking transform is performed on the actual layers. Change-Id: I9822355afba79f4e7f1f7615e7e1e713daab4dd7 Signed-off-by: Lajos Molnar <molnar@ti.com>
* hwc: refine HDMI best mode selection: favor less scaling over aspect ratioLajos Molnar2011-10-061-5/+5
| | | | | | | | | Pick a size that scales less over a size with a better aspect ratio fit, because the aspect ratio of the display is constant anyways. This will avoid selecting e.g. a 4:3 aspect ratio 480p format when displaying a 4:3 high-resolution video. Change-Id: If5e378208809625c34c1d53ec8018cf0b653be3e
* hwc: invalidate only when we have to when switching to hdmiLajos Molnar2011-10-061-5/+11
| | | | | | | | | | | | This moves forcing of invalidate only if all overlays are used on LCD. Then the layers will be first rendered with one less overlay/half of the overlays on LCD, freeing up overlays. On the second invalidate the cloning will start. This patch also resolves a potential race conditino when setting ext_requested. Change-Id: I0b9cf81091c9f66e37d3dab5f9f9648147c7295c
* hwc: do not pick interlaced hdmi mode as it is not yet supportedLajos Molnar2011-10-061-0/+2
| | | | Change-Id: Icc68bc26d7acc939d512dfaaf0bad12c97f9d701
* hwc: decide scaling support based on correct display's pixel clockLajos Molnar2011-10-061-9/+18
| | | | | | | | | | | Fixes the following issues: - external display scaling check should use mode's pixel clock - pixel clock is not relevant for manual displays (where pixel clock is 0); however, 0 pixel clock for external display means that display is off. Change-Id: Ief404811ed0f5152784490e97ac965f0e44fb4de Signed-off-by: Lajos Molnar <molnar@ti.com>
* Enabling Fast Shot2shot by disabling AF scan in the CAF modeHeechan Park2011-10-051-14/+1
| | | | | | | bug:5219431 Signed-off-by: Heechan Park <heech.park@samsung.com> Change-Id: I5659f94273e6e4b79395742edb00799a64ecfd46
* Merge "Set EXIF maker and model to system properties." into ics-factoryromWu-cheng Li2011-10-041-3/+9
|\
| * Set EXIF maker and model to system properties.Wu-cheng Li2011-10-051-3/+9
| | | | | | | | | | | | | | | | | | Set EXIF maker to ro.product.manufacturer and EXIF model to ro.product.model. bug:5404097 Change-Id: Ibeaa2225b2593ae7cdcbf75f85e1923095017db6
* | hwc: reset screen before first setLajos Molnar2011-10-041-11/+31
|/ | | | | | | | | Move resetting of screen (blank/unblank) to just before first set. Also turn off bootloader image, as blank/unblank does not change the composition. Change-Id: Ia1d25887dcc566ba2c20f8d390199d815d374d7a Signed-off-by: Lajos Molnar <molnar@ti.com>
* improve logging in hwc.Mathias Agopian2011-09-291-4/+4
| | | | | | we now print the handle of overlay buffers. Change-Id: I6df51fec1f0227afce2d7e5bb85b994167ca1e01
* DOMX: change DCC lookup pathStanimir Varbanov2011-09-281-1/+1
| | | | | | | | | | | | Change the DCC lookup path in the domx, to a path which is not mounted as a read-only as default. This would enable to dynamicaly change the dcc settings, without needing to remount the /system/ partition. Change-Id: I8fdc8c1ec7b3812b12188bfa5cee43c6e4a296c9 Signed-off-by: Vladislav Hristov <vhristov@mm-sol.com> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
* CameraHAL: Improved error handling inside the adaptersSundar Raman2011-09-275-128/+195
| | | | | | | | | | | | | 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>
* hwc: fix overlay assignment if all layers are scaledLajos Molnar2011-09-271-1/+2
| | | | | | | | | | Fix a bug that assigned the same overlay for multiple layers if all layers were scaled or NV12. Also, the number of NV12 layers displayable by DSS is limited. Change-Id: I4db33d7fc8563930a1e4214a704af2728fb9cec0 Signed-off-by: Lajos Molnar <molnar@ti.com>
* CameraHal: Changes to releasing of focus lockTyler Luu2011-09-272-14/+0
| | | | | | | | | | Do not release focus lock during stopPreview and after takePicture. bug:5356404 Change-Id: Ib7078f5261ee21579143c4519896d1b13874697b Signed-off-by: Tyler Luu <tluu@ti.com>
* Make previous zoom index a member variableAkwasi Boateng2011-09-233-4/+4
| | | | | | | | | 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>
* CameraHal: Do not unset exposure/wb lock in stopPreviewTyler Luu2011-09-231-11/+0
| | | | | | | | Did not remove code that explicitly unsets white balance and exposure lock in stopPreview after capture case. Change-Id: I1f990eb0819223c3642205584d2124bccc47355c Signed-off-by: Tyler Luu <tluu@ti.com>
* CameraHal: Timing issue in returning focus callbackTyler Luu2011-09-231-2/+4
| | | | | | | | | | | If the CommandHandler thread in OMXCameraAdapter preempts the main thread before the AF state can be commited, there was a chance that we would never send a focus callback. This patch makes returnFocusStatus check for next state as well as current state. Change-Id: I7dfd68061ab5391bea1d12f5c978dba7544bfc9a Signed-off-by: Tyler Luu <tluu@ti.com>
* libtiutils: fix an fd leak I introducedIliyan Malchev2011-09-231-2/+2
| | | | | Change-Id: Ib956613f334c31b20a402bc618cd72a04603d828 Signed-off-by: Iliyan Malchev <malchev@google.com>
* CameraHal: Add metering area mutexTyler Luu2011-09-232-0/+5
| | | | | | | | | 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>
* MPEG4 enc: Dont encode buffer with filled len zero.Sarthak Aggarwal2011-09-221-1/+21
| | | | | | | | | | | Fixes b/5332812 Even in case filled len sent by client was 0, proxy was overriding it with a non-zero value leading ducati side to encode it. this patch rectifies that. Change-Id: Ic62cbf5e7bc580d213895475fa28fbb8a004ed7b Signed-off-by: Sarthak Aggarwal <sarthak@ti.com>
* DOMX: H264ENC,MPEG4ENC: Fix file-descriptor leak issueDevaraj Rangasamy2011-09-222-21/+22
| | | | | | | | | | | | | | | | Fixes b/5360550 H264,MPEG4 Encoder proxies is not releasing pipe on component deinit during encode usecase exit. Patchset2: - removed redundant macro Patchset3: - added mpeg4-enc fix too Change-Id: I1bf9b4bd85fdee7ced74da5918d370624c8c9c43 Signed-off-by: Devaraj Rangasamy <dev@ti.com>
* omap4xxx: fix errors and dead code in usage of pipe(2)Iliyan Malchev2011-09-222-103/+16
| | | | | Change-Id: I7134e635316c2a118498d23521248016b73d6496 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Change ducati camera internal buffers to 5Sarthak Aggarwal2011-09-221-1/+1
| | | | | | | | | | | | | | Fixes b/5342251 This creats more space in ducati heap to accomodate a decoder and camera in ZSL mode. Also, 5 buffers are sufficient to give a -ve 110ms delay required by ZSL. Change-Id: If779c91a82441ea100fc1182fab7a2a17f986544 Signed-off-by: Sarthak Aggarwal <sarthak@ti.com> Signed-Off-by: Vladislav Hristov <vhristov@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* H264 enc: Dont encode buffer with filled len zero.Sarthak Aggarwal2011-09-221-2/+5
| | | | | | | | | | | | Fixes b/5332812 Even in case filled len sent by client was 0, proxy was overriding it with a non-zero value leading ducati side to encode it. this patch rectifies that. Change-Id: Ia1125fad0fe61ccb4375192f962a2da60202a275 Signed-off-by: Sarthak Aggarwal <sarthak@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* CameraHal: Changes to 3A lock implementationTyler Luu2011-09-223-42/+42
| | | | | | | | | | | | | | | | 1) Only take user set values for AE and AWB locks. Decouple interaction between AE/AWB locks and AF/takePicture/stopPreview 2) When in CAF mode, if we query AF and see that focus is already locked, we do not have to call SetConfig for OMX_IndexConfigFocusControl. Just return the status to upper layers instead. 3) If user doesn't call cancelAutoFocus after a doAutoFocus call, we need to forcefully unlock AF to ensure we do a scan. This would also essentially render CAF as normal auto AF. bug:5356404 Change-Id: I5bb840ca0122d8a9387f72290d2b421703dba23d Signed-off-by: Tyler Luu <tluu@ti.com>
* OMXCameraAdapter: Update timstamp calculation and commentDevaraj Rangasamy2011-09-212-7/+10
| | | | | | | | | | | | 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>
* CameraHAL: CTS fixes related to #testMeteringAreasSundar Raman2011-09-214-20/+19
| | | | | | | | | | | | | | | | | | - The status of "parseAreas()" should always be checked in order to return proper error code in case of invalid input arguments. - If the input metering areas are more than the supported ones, then always return an error. - 'parseAreas()' expects the buffer size, not the string length. - Refactors "parseFocusAreas()' to the more general 'parseAreas()'. Change-Id: I4c70bcaa3c676f525b721916cc39c66db5e0fc17 Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Sundar Raman <sunds@ti.com>
* CameraHa: Reset mDynamicPreviewSwitch after startPreviewTyler Luu2011-09-211-0/+1
| | | | | | | | | | mDynamicPreviewSwitch was not being reset after the first startPreview() call. This is causing the preview to be unecessarily restarted for the first capture and causing some hit in performance time. Change-Id: I47e8840414c6da523c40ad04eaad05e841907acb Signed-off-by: Tyler Luu <tluu@ti.com>
* CameraHAL CTS: Update the fps range passed by the appSundar Raman2011-09-211-0/+1
| | | | | | | | mParameters was not updated based on the setParameter from the app. Change-Id: I24a4cdec9355ea677c7e09f9060989d2c6f40ac3 Signed-off-by: Sundar Raman <sunds@ti.com>
* Merge "CameraHal: Add filter to smooth faces from OMXCamera" into ics-factoryromIliyan Malchev2011-09-213-20/+83
|\
| * CameraHal: Add filter to smooth faces from OMXCameraTyler Luu2011-09-213-20/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge "CameraHAL: Allow cancelAutoFocus during zoom" into ics-factoryromIliyan Malchev2011-09-211-0/+6
|\ \ | |/
| * CameraHAL: Allow cancelAutoFocus during zoomSundar Raman2011-09-211-0/+6
| | | | | | | | | | | | | | | | | | When user does tap to metering followed by zoom, the app calls cancelAF. So we need to allow this in the state machine. Change-Id: I0fd0faaa136768e8bae8504cf58b5e9f247f3dc1 Signed-off-by: Sundar Raman <sunds@ti.com>
* | Merge "Grallock lock and unlock fixes" into ics-factoryromIliyan Malchev2011-09-217-34/+111
|\ \ | |/
| * Grallock lock and unlock fixesAkwasi Boateng2011-09-217-34/+111
| | | | | | | | | | | | | | | | | | | | | | 1. Get and store Y and UV pointers from all gralloc handles to be used for preview callback and video frames. 2. Ensure gralloc lock is successfull before frame return to OMXCameraAdapter Change-Id: Ibeea6d00f2c1a1c45bcd2eafb22b90a795516e5c Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
* | hwc: keep video pixel ratio in docking modeLajos Molnar2011-09-211-14/+20
| | | | | | | | | | | | | | Use the displayFrame size to determine pixel ratio for layer to be externally displayed Change-Id: I5eff81b2d91c4b1e5cd76a623eb73dd37e8684db
* | hwc: fix issue if external display dimensions are zeroLajos Molnar2011-09-211-0/+9
| | | | | | | | | | | | | | | | | | Assume 1:1 pixel ratio if any of the physical dimensions of the external display is 0. This fixes a division by zero error. Change-Id: I54d257e7fdcdd2daf49212b358d3ff2cf5d76ffc
* | hwc: set hdmi resolution in docking mode based on layer dimensionsLajos Molnar2011-09-211-102/+130
| | | | | | | | | | | | This allows e.g. playing 1080p video in 1080p mode. Change-Id: Ie0063baeb5d09325ab36a10b73050d9eb3fbbbe0
* | hwc: unify HDMI docking and cloningLajos Molnar2011-09-211-20/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a surface with external display usage marked, switch to docking (clone only that surface to HDMI). Once the surface goes away, switch back to cloning. Also change docking mode support: Select dockable surface based on the usage bit instead of the color format. For multiple such surfaces, pick the one with the largest display area. Change meaning of hwc_dev->ext transform bits for docking mode. These are applied purely to the surface buffer, instead of as an additional transform on the surface displayed on LCD. In other words, the surface displayed on HDMI is independent of the UI orientation. Change-Id: Ic6895ba0ff275ca374eb72d0fa7d93a634111d1a
* | Merge "hwc: blank and unblank screen on open" into ics-factoryromErik Gilling2011-09-211-0/+11
|\ \
| * | hwc: blank and unblank screen on openErik Gilling2011-09-191-0/+11
| | | | | | | | | | | | | | | Change-Id: Ib6c1ce8183a2dcd4aef3bf03e075766efafd1435 Signed-off-by: Erik Gilling <konkers@android.com>
* | | CameraHAL: Fixes an issue with constant frame rate selectionSundar Raman2011-09-201-2/+4
| |/ |/| | | | | | | Change-Id: I2ca38e60f7a47d149aa5696ff8d8ca3246d2d479 Signed-off-by: Sundar Raman <sunds@ti.com>
* | CameraHal: Do not restart preview if already recordingTyler Luu2011-09-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Slight fix to the KEY_RECORDING_HINT logic. If we are already recording then we can just ignore the recording hint logic. Also, if recording has already started then we would already be in video mode anyways. b/5332829 Change-Id: I372f43dd961f137c204ce60f20de3bdd793f02ed Signed-off-by: Tyler Luu <tluu@ti.com>
* | CameraHal: Use gmtime for ExifTyler Luu2011-09-191-4/+4
| | | | | | | | | | | | | | | | | | | | Previously, we were using localtime instead of gmtime for exif timestamps and datestamps. b/5314200 Change-Id: I3e83b05a3fb5dacce0b29a5b4f99bb27a14ad2c3 Signed-off-by: Tyler Luu <tluu@ti.com>
* | CameraHal: Debug prints from "CameraHal: Error handling before sending frames"Tyler Luu2011-09-192-3/+3
| | | | | | | | | | | | | | | | Fix debug macro mismatch and some levels from "CameraHal: Error handling before sending frames" Change-Id: Ib8b4a7b09b32246aa9d972b91a72f53a139e5773 Signed-off-by: Tyler Luu <tluu@ti.com>
* | CameraHal: Lock focus after AF completionTyler Luu2011-09-196-13/+67
| | | | | | | | | | | | | | | | | | 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
* | CameraHal: Stop video snapshot before trying to stop recordingTyler Luu2011-09-191-0/+9
| | | | | | | | | | | | | | | | If stopRecording comes before OMXCameraApdater can signal for endImageCapture...go ahead and end image capture from stopRecording Change-Id: I7c8142ba95475d823c9569cf9e72338d2da53f14 Signed-off-by: Tyler Luu <tluu@ti.com>
* | Camera: Disable GBCE by defaultDevaraj Rangasamy2011-09-191-1/+1
| | | | | | | | | | | | | | Dont enable GBCE for image capture Change-Id: Ic9536e1cb008aae1e96108a6fbdef7e3f2583c90 Signed-off-by: Devaraj Rangasamy <dev@ti.com>