summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* CameraHal: Handle dynamic switch in setParametersTyler Luu2011-10-151-20/+13
| | | | | | | | | | | | | | | | | Instead of stopping preview in start preview for a dynamic switch. Go ahead and stop preview in setParameters. Need to force stop preview so all the buffers will be unlocked in case application captures an image and switches to camcorder mode before it restarts preview. Otherwise, camera service will disconnect the window while we are still holding locks for the buffers. Error log: "gralloc_unregister_buffer: Cannot unregister a locked buffer" Change-Id: Ic252609e5fbcfde569e1dbd8614572df6392bade Signed-off-by: Tyler Luu <tluu@ti.com>
* CameraHal: Fixes for #testVideoSnapshotTyler Luu2011-10-157-70/+131
| | | | | | | | | | | | | 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>
* CameraHal: Remove some unused code from SensorListnerTyler Luu2011-10-151-6/+0
| | | | | Change-Id: I37e332efb9e8de99e1eac5be6fc8c7c9c376c7fa Signed-off-by: Tyler Luu <tluu@ti.com>
* CameraHAL: Re-enable Face prioritized AE in startFaceDetectionSundar Raman2011-10-151-4/+1
| | | | | Change-Id: Id3639656e4856019221a35d2fc308626e45cb405 Signed-off-by: Sundar Raman <sunds@ti.com>
* CameraHal: Allow EV compensation w/ preset sceneTyler Luu2011-10-152-12/+16
| | | | | | | | CameraHal was previously ignoring EV compensation when a scene mode was set. Change-Id: I15023a5c6019ca333a4ce40f178a8e4ef53be387 Signed-off-by: Tyler Luu <tluu@ti.com>
* CameraHal: Enable 3A feedback for scene modesTyler Luu2011-10-154-139/+275
| | | | | | | | | 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>
* DOMX: Do not maintain the secure state info at the userspace.Sarthak Aggarwal2011-10-140-0/+0
| | | | | | | | | Rely on the kernel to maintain the secure state. Query the misc driver for the state whenever need be. Also whenever misc driver setting of secure mode fails, cleanup properly. Change-Id: I460138f4751fa729ed06a0e507035a2da2492daf Signed-off-by: Sarthak Aggarwal <sarthak@ti.com>
* CameraHal: Adapt to new framework vstab paramTyler Luu2011-10-1410-77/+69
| | | | | | | | 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>
* omap4xxx: camera: not an error when callback threads are already runningIliyan Malchev2011-10-131-1/+5
| | | | | | | | | | | | Potential fix for b/5431225 (if not, it will point in the right direction) -- When CallbackThread or OMXCallbackThread is already running during initialization(), do not treat this as an error. -- Print an error on logcat when the OMX component state is not as expected during intialization Change-Id: Icf7312e609a7a17ccaf412d3c3fe6a5075de00f7 Signed-off-by: Iliyan Malchev <malchev@google.com>
* hwc: fallback on GL after idle for power savingsErik Gilling2011-10-121-5/+70
| | | | | | | | If no frame has been posted for 250ms, rerender using GL to take load off the overlay engine. Change-Id: I1790f7b7b43fd0d60b7392b9aec01339234aa915 Signed-off-by: Erik Gilling <konkers@android.com>
* hwc: fix docking mode orientation and croppingLajos Molnar2011-10-121-33/+41
| | | | | | | | | | | | | | | | | | | We cannot reset orientation to 0 when docking, as video layer may be encoded in non-0 orientation. hwc.hdmi.docking.transform is now applied (as an add-on) to the UI orientation, but only if mirroring is not enabled. Otherwise, mirroring transform is used. This is because UI is already oriented into "mirroring/landscape mode". To simplify the pixel ratio preservation, introduced a float xpy instead of integer xratio/yratio. xpy should be same as xratio / yratio, and is the x:y pixel ratio. Also docked layers do not need to be cropped to the mirroring region. Change-Id: If01d2ae698f4fb896db65417c0bc218b294f966f
* hwc: make clone region property persistentLajos Molnar2011-10-121-1/+1
| | | | Change-Id: Ibf36295966522f03104a77cd6842559f6607fc5d
* CameraHAL: Switch default focus mode back to autoSundar Raman2011-10-121-1/+1
| | | | | | | | | | | Since Barcode scanner app doesnt support continuous auto focus and the locking semantics around autoFocus api. Fixes b/5434919 Change-Id: Ie45f1553e468f2d25fee256dab2492713add2744 Signed-off-by: Sundar Raman <sunds@ti.com>
* CameraHAL: Restore zoom stages back to 60Sundar Raman2011-10-123-16/+46
| | | | | | | | | | This provides for a smooth zoom experience with immediate zoom This reverts commit a38ea5631d139c3d5ffd4e181df2216dbce1b10c. Fixes b/5251916 Change-Id: If1724ec2ad5d3106e10ee5c2e691f99c19675eaf
* CameraHAL: Pass zoom values smoothlySundar Raman2011-10-123-10/+29
| | | | | | | | | | | | | 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>
* hwc: allow specifying clone regionLajos Molnar2011-10-111-11/+117
| | | | | | | | | Added android property ro.display.clone.region to set the clone region in case we do not want to clone the full framebuffer to HDMI. (E.g. status bar may not need to be cloned.) Change-Id: I35f2207c49b3a56ff61309efebe61b9dee6cfb8c Signed-off-by: Lajos Molnar <molnar@ti.com>
* hwc: cleanup: consolidate cloning state and configuration variablesLajos Molnar2011-10-111-115/+145
| | | | | | | | consolidate variables used to select cloning configuration and state. Signed-off-by: Erik Gilling <konkers@android.com> Change-Id: I49af8efdefef6dcb784bfed1da58f704cdb76dba
* hwc: simplify: use macros for getting width and height of hwc_rectLajos Molnar2011-10-111-12/+14
| | | | | Change-Id: I5fbccdb3b9504d1fe3480da59578909e1c233d83 Signed-off-by: Lajos Molnar <molnar@ti.com>
* hwc: simplify: use swap() macroLajos Molnar2011-10-111-21/+9
| | | | | Change-Id: I3c4a83a64bee10d8810fd292bb53dfff7be8d664 Signed-off-by: Lajos Molnar <molnar@ti.com>
* hwc: assume possible TILER2D layers when deciding HDMI modeLajos Molnar2011-10-111-4/+5
| | | | | | | | | TILER2D layers have stricter scaling limitations, so assume possibility of TILER2D layers when deciding if they will be able to be cloned for the HDMI mode. Change-Id: I7b6c89cb4216ae27a793ea3b1b4f8e8e40b654cc Signed-off-by: Lajos Molnar <molnar@ti.com>
* hwc: shorten persist property names DO NOT MERGEErik Gilling2011-10-111-4/+4
| | | | | | | The old ones were too long and could not be set. Change-Id: Ic0519025dcb0df223e4f87b4af67c12e94f5f486 Signed-off-by: Erik Gilling <konkers@android.com>
* Enable Secure-component call into Misc driverSarthak Aggarwal2011-10-071-0/+1
| | | | | Change-Id: If2cb2f7744967df6632dd097bd5a9576cf4f9718 Signed-off-by: Sarthak Aggarwal <sarthak@ti.com>
* omap4xxx: camera: various fixesSundar Raman2011-10-074-43/+31
| | | | | | | | | | | | | | | | | | | clean up resources properly on exit: - Frees all resources in case of error during preview buffer allocation in ANativeDisplayAdadapter. - Fixes a couple of typos in BaseCameraAdapter. - Removes a possible memory leak during temporal bracketing. 'stopBracketing()' will never get properly executed when 'startImageCapture()' disables 'mBracketingEnabled'. - Stops temporal bracketing properly inside 'signalEndImageCapture()'. Change-Id: Ic122058c835e30f12f335a288164475b8f6d1c6d Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Sundar Raman <sunds@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: remove a couple of error messagesSundar Raman2011-10-071-12/+15
| | | | | | | | | | | | | | Logspam reduction: - VFR shouldn't be configured when the port framerate is smaller than the maximum framerate. - Debug information for the capture mode should not be tagged as an error. Change-Id: I0b3ad926a0ff1e0bd2ee405893d8730b9e79a599 Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Sundar Raman <sunds@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: remove DOMX logspamSarthak Aggarwal2011-10-070-0/+0
| | | | | | | | | | | Fixes b/5367387 Remove the error trace in case ducati gives ErrorNoMore, which is not an actual error. Change-Id: Ifeb56527f1d5cdb3fb2366a324e5bb6f2ea0a8c7 Signed-off-by: Sarthak Aggarwal <sarthak@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: re-enable postview callbackTyler Luu2011-10-072-18/+8
| | | | | | | | Fixes b/5370657... again Change-Id: I998d2292d25b76b67b1fbd2ff6bd65e854c176c8 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* CameraHal: Fix issue with not setting 3A settingsTyler Luu2011-10-071-3/+3
| | | | | | | | 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>
* GRALLOC_USAGE_EXTERNAL_DISP should not be used for CameraJames Dong2011-10-071-1/+0
| | | | | Change-Id: I0702a4b5fc35ef8435b1914b8e81f39b3e7ea0b4 related-to-bug: 5382682
* omap4xxx: camera: apply 3A settings after auto scene mode changeAkwasi Boateng2011-10-071-17/+17
| | | | | | | | | Apply pending 3A settings when user switches from any scene mode to auto scene mode. Change-Id: I8f53cbede51c175b88321c59418792dae801216d Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: set capture settings only if changedTyler Luu2011-10-073-39/+78
| | | | | | | | | | | 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>
* omap4xxx: camera: set GLBCE/GBCE only if changedTyler Luu2011-10-071-2/+2
| | | | | | | | | | | | Partial fix for b/5371242 When GLBCE/GBCE was not set, we were always calling SetConfig for the default value for every SetParameters. Add some logic to only set them if they have changed. Change-Id: I30229556b55260f572bee56054422f7edb07df42 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: only set CameraAreas if changedTyler Luu2011-10-074-9/+43
| | | | | | | | | | | | Partial fix for b/5371242 Add logic to compare areas for metering and focus before calling SetConfig for the respective indices so we only set the areas if the areas have changed Change-Id: Id6b55e3d8e78557f45b92a5afefdb8298450da61 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: set face priority for algos when starting face detectionMilen Mitkov2011-10-071-0/+9
| | | | | | | | | | Sometimes (rarely) startFaceDetection() may be called after setFocusMode() and this causes the face priority for algos to not be set. This patch sets the face priority in startFaceDetection(). Change-Id: I0805c0a0c86b4a2b122d294e9a73374e83dd3330 Signed-off-by: Milen Mitkov <mmitkov@mm-sol.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: update Focus areas in setParameters, not in setFocusModeAtanas Stefov2011-10-072-11/+16
| | | | | | | | | | | | | | | | Fixes b/5429270 When you touch to focus, the camera app calls setParameters to pass the focus areas to the Ducati, followed by a call to autoFocus to start AF. Because the focus areas were not getting updated instantly in the camera HAL before AF began, on the one hand, and because the Ducati locks the focus regions after AF begins, the AF region settings were being ignored. This patch allows focus areas to be set immediately. Region priority is set in doAutoFocus() when non-zero area is set in FOCUS_REGION. Change-Id: I90c86f9de0d090f24b8595b325dbf06f1f718630 Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: timing issue with autoFocus/cancelAutoFocusTyler Luu2011-10-072-2/+21
| | | | | | | | | | | | | | | | | | | | | | Fixes b/5332895 If cancelAutoFocus comes when Ducati is already sending focus callback, CameraHal will go ahead and send focus callback to the application. This can cause the subsequent autoFocus call to be acked almost immediately with the previous autoFocus call's notification. Application will think autoFocus is done while CamearHal is still focusing, takePicture from the application will return an error. To fix this issue, do not always send focus notification. We are going to internally enable/disable auto focus message. Enable focus message when autoFocus call comes and disable focus message after notification or if cancelAutoFocus call comes. This will prevent us from sending notify message if application calls cancelAutoFocus. Change-Id: I8c8892f14894e23a9d73fa1c2b058389d196eefa Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: switch to executing state when surface is nullAkwasi Boateng2011-10-076-36/+183
| | | | | | | | | | 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>
* omap4xxx: camera: cancel and flush for SW JPEG encoderTyler Luu2011-10-073-9/+46
| | | | | | | | | | | | | | | | Fixes b/5378650 1. Add method to externally cancel Encoder class while in the middle of encoding. 2. Add queue in AppCallbackNotifier to track all the encoding sessions. When stopping AppCallbackNotifier if any encoding sessions are still ongoing, cancel and wait for the threads to return. Previously, it was possible for Encoder threads to still be running when the preview and images buffers were freed. Change-Id: Ib123d1644dfa7058a6f50f0001b4d05359853827 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: EXIF thumbnail for video snapshotTyler Luu2011-10-078-101/+308
| | | | | | | | | | | | | | | | | Fixes b/5370657 1) Extend NV12 resizer to take stride insteadof hardcoding stride 2) Change Encoder class interface to support encoding a thumbnail and main jpeg image. Encoder will resize/encodethumbnail in parallel while encoding the main jpeg. Only NV21/NV12 resizing is supported. Thumbnail is created withpost view frame. 3) Add interface in Encoder class to replace thumbnail with jhead. 4) Height and width fields of EXIF are not proper. Fixed. Change-Id: I5d0063357e4e9e327d22805c2dddf8f630d22e7b 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>
* omap4xxx: camera: send different preview and video buffers for MMS modeAkwasi Boateng2011-10-0711-15/+767
| | | | | | | | | | | | | | | | | | 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>
* 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>