summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice
Commit message (Collapse)AuthorAgeFilesLines
* Camera2: Improve quirks focusing behavior.Eino-Ville Talvala2012-10-162-2/+9
| | | | | | | | | | | - When scene mode is set and the AF quirk is in use, don't change AF mode and then cancel when AF cancel is received. Just change mode since that also implies a cancel. - Only trigger quirks switch when a focusing area is set. Bug: 7318812 Change-Id: I28d8755553bd78052e774701210cb94d84ee2046
* Camera2: Don't touch frame counter on output frames.Eino-Ville Talvala2012-10-161-1/+1
| | | | | Bug: 7357069 Change-Id: I9cd0cdcc23959bfecced5f47bb9e8c59c997dade
* Camera2: When focus is already locked in CAF mode, do not trigger HAL.Eino-Ville Talvala2012-10-163-4/+41
| | | | | | | | | | | | In HAL2 CAF modes, once focus is locked by an AF trigger, additional triggers will not cause AF notifications, since the state will not change again until a cancelAutofocus call. Since the old API still expects to see a notification, short-circuit this at the service and send an immediate success notification. Bug: 7318298 Change-Id: Ib209a24eaf2a35a247d06aea671efe80a33d751e
* Camera2: Don't error out of startPreview when already recording.Eino-Ville Talvala2012-10-101-4/+7
| | | | | Bug: 7327474 Change-Id: I603da5b8bd58e5a700d7ae0b3d34bd89bbcb1d53
* Camera2: Don't let unlocks happen during recording.Eino-Ville Talvala2012-10-101-2/+6
| | | | | Bug: 7309020 Change-Id: I6e66809b868d2e8f47f71e6f8752b44ec06dfb17
* Camera2: Do not set auto-white-balance regions from metering regions.Eino-Ville Talvala2012-10-101-3/+0
| | | | | | | Per API documentation, metering regions are only for AE, not also for AWB. Bug: 7312720 Change-Id: I39bcf33e4c81e80022f45e8fca77ea6cf9ba115e
* Camera: Limit valid caller PIDs for camera clients.Eino-Ville Talvala2012-10-102-20/+11
| | | | | | | | | Narrow down on PID checks to avoid cases where service can access the camera even though it shouldn't be able to, per API semantics. Bug: 6970469 Change-Id: Ic468a31949c28ef978b6ed48a70e4601c7ced684
* Merge "Camera: Clear Hardware device pointer when initialization fails" into ↵Eino-Ville Talvala2012-10-091-0/+1
|\ | | | | | | jb-mr1-dev
| * Camera: Clear Hardware device pointer when initialization failsIgor Murashkin2012-10-091-0/+1
| | | | | | | | | | | | | | | | When disconnecting, don't try to call device functions if the initialization fails since this can lead to internal HAL segfaults. Bug: 7317107 Change-Id: Ib65db7eb6556ee10d844959934b1bfd7bb08d0ff
* | Merge "Camera2: Fix uninitialized parameters." into jb-mr1-devEino-Ville Talvala2012-10-091-0/+8
|\ \ | |/ |/|
| * Camera2: Fix uninitialized parameters.Eino-Ville Talvala2012-10-091-0/+8
| | | | | | | | | | | | | | | | | | Some parameters were not being set to default values, causing strange flakiness in any app that wasn't calling setParameters. This includes many CTS tests. Bug: 6970468 Change-Id: If91635afc000e23862e7b039292a55349274c5ee
* | Merge "Camera2: Call onAutoFocus immediately for fixed-focus cameras" into ↵Igor Murashkin2012-10-091-0/+15
|\ \ | | | | | | | | | jb-mr1-dev
| * | Camera2: Call onAutoFocus immediately for fixed-focus camerasIgor Murashkin2012-10-091-0/+15
| |/ | | | | | | | | Bug: 7311578 Change-Id: Ib8a8ea1f5fc269abdd24ed1e0370dc9b87b284ee
* | Merge "Camera2: Move non-ZSL shutter sound firing to be later." into jb-mr1-devEino-Ville Talvala2012-10-092-5/+12
|\ \ | |/ |/|
| * Camera2: Move non-ZSL shutter sound firing to be later.Eino-Ville Talvala2012-10-082-5/+12
| | | | | | | | | | | | | | | | | | | | Instead of firing shutter sound when capture request is submitted for non-ZSL captures, fire it when the metadata frame is received. This guarantees that the shutter sound fires after picture capture is completed by the sensor. Bug: 7259900 Change-Id: I4a1eeed89ed0400bf80b0f0cc2d5799c3d9bb9e3
* | Merge "Camera2: Always disconnect in the client destructor" into jb-mr1-devEino-Ville Talvala2012-10-081-0/+4
|\ \ | |/ |/|
| * Camera2: Always disconnect in the client destructorIgor Murashkin2012-10-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | If Camera2Client failed to initialize, it would skip disconnect step, and thus the camera would be forever marked as busy. By always calling disconnect it will always call free. It also adds a new guarantee that Client::disconnect is idempotent Bug: 7298182 Change-Id: Ic9876f1665b7d9b3c0da692880f63f165e3f4fa5
* | Camera2: isSmoothZoomSupported should return FALSEIgor Murashkin2012-10-081-1/+1
|/ | | | | Bug: 7308024 Change-Id: Ib757bef8f6dc203f8dfa6ea6d11191e3c7cfcc6d
* Camera2: Set default flash mode to FLASH_OFFAlex Ray2012-10-081-2/+2
| | | | | Bug: 6970090 Change-Id: I904b1be2ee0710e82e8e647753a705184c10b46c
* Merge "Camera2: Fix Parameters#setZoom off by 1 validation error" into ↵Igor Murashkin2012-10-081-1/+2
|\ | | | | | | jb-mr1-dev
| * Camera2: Fix Parameters#setZoom off by 1 validation errorIgor Murashkin2012-10-081-1/+2
| | | | | | | | | | Bug: 7298683 Change-Id: If79ac6396379593eb852f041ca7d5a20ad2f9e6d
* | Merge "Camera2: On stopping preview, wait until captures are completed." ↵Eino-Ville Talvala2012-10-084-44/+57
|\ \ | |/ |/| | | into jb-mr1-dev
| * Camera2: On stopping preview, wait until captures are completed.Eino-Ville Talvala2012-10-074-44/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If preview is stopped while a still capture or a video snapshot is underway, wait until the capture completes before stopping preview. Also use the same behavior for disconnect - do not shut down the camera device until captures are complete. This works around HAL implementations which report to be done (get_in_progress_count returns 0) even when a capture is still outstanding. Bug: 7276954 Change-Id: I66290acf1740cc330eadecbcded0c59fa9c5d2fd
* | Merge "Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras" into ↵Igor Murashkin2012-10-082-7/+25
|\ \ | |/ |/| | | jb-mr1-dev
| * Camera2: Report getMaxNumFocusAreas 0 for fixed focus camerasIgor Murashkin2012-10-052-7/+25
| | | | | | | | | | Bug: 7298805 Change-Id: I7499b80a9416bf454c8ea80c31ea4fdd3c4ee2d7
* | Camera2: Fix off-by-one error in ZSL selection.Eino-Ville Talvala2012-10-061-3/+6
| | | | | | | | | | Bug: 7258126 Change-Id: Ie6da4645c46a7bb0dbd11d7c6183e904f41f74fd
* | Camera2: Unconditionally shut down streams on disconnect.Eino-Ville Talvala2012-10-051-1/+10
|/ | | | | | | | | | stopPreviewL may do nothing in certain states. Stop streams directly to avoid those failures, so that we always maintain the HAL interface invariant that streams referenced by in-flight requests are never deleted. Bug: 7276954 Change-Id: Ic4cffc43036f4944684d941981a43d6dd1dce7af
* Camera2: Fix metering regions to take into account the current zoom/crop regionIgor Murashkin2012-10-053-10/+150
| | | | | | | Also adds a quirk to disable this fix to work around for incompliant HALs Bug: 7246065 Change-Id: I80bad25e56ba59149270238e5639bb33cae495ae
* Camera2: Change policy for calculating previewFpsRange from previewFpsIgor Murashkin2012-10-052-15/+105
| | | | | Bug: 7259959 Change-Id: I759a559d7115201264f88db1f23edc2d6aef6c43
* Merge "Camera2: Don't promote weak IBinder ptrs to strong ones" into jb-mr1-devIgor Murashkin2012-10-052-12/+14
|\
| * Camera2: Don't promote weak IBinder ptrs to strong onesIgor Murashkin2012-10-052-12/+14
| | | | | | | | | | | | | | | | | | The Binder driver does not support promoting weak pointers into strong pointers. Occassionally the system would lock up when trying to do this (when closing the camera app). Bug: 7289040 Change-Id: I8bc0b5c48616bf0b7f4eed1878ad4994ee635871
* | Camera2: Use the triggerAfWithAuto quirkEino-Ville Talvala2012-10-043-0/+26
| | | | | | | | | | | | | | | | When this quirk is set, and a scene mode is enabled, do AF calls with AF mode AUTO instead of whatever the scene more override AF mode is. Bug: 7159577 Change-Id: I3ea6b8386abc0968047fc9bba3a35c5db5bdcfd3
* | Camera2: Synchronize mode changes and triggersEino-Ville Talvala2012-10-0412-66/+259
|/ | | | | | | | | Make sure that changes to various parameters have reached the HAL before triggering asynchronous events like autofocus or precapture metering. Bug: 7107220 Change-Id: I3c50038de1671968eb32004ce538435121934e7e
* Camera2: Include JPEG settings in ZSL requests.Eino-Ville Talvala2012-10-045-34/+75
| | | | | Bug: 7287743 Change-Id: I1aba81b228451c3df712ce1f42b7aab79cac575f
* Merge "Camera2: Fix deadlock while zooming during record" into jb-mr1-devIgor Murashkin2012-10-041-11/+11
|\
| * Camera2: Fix deadlock while zooming during recordIgor Murashkin2012-10-031-11/+11
| | | | | | | | | | | | | | | | | | Acquired SharedParameters before mMutex in StreamingProcessor, this avoids any potential deadlocks since Camera2Client code would always acquire SharedParameters first before invoking StreamingProcessor. Bug: 7275259 Change-Id: Ia741162c455300378bee049f063590ece5328b95
* | Merge "Camera2: Properly update FPS range when FPS is set." into jb-mr1-devEino-Ville Talvala2012-10-031-0/+4
|\ \ | |/ |/|
| * Camera2: Properly update FPS range when FPS is set.Eino-Ville Talvala2012-10-031-0/+4
| | | | | | | | | | | | | | | | Otherwise a getParameters followed by setParameters will trigger an incorrect reversion in FPS parameters. Bug: 7279267 Change-Id: I7426860f05497dbdf4245c34cef1b38f2f5a1832
* | Camera2: Fix prematurely clearing stream requestAlex Ray2012-10-032-7/+8
|/ | | | | | | | | Zsl handling was clearing the stream request before a capture request was ready to be sent to the HAL, which would cause capture delays and timeouts in certain conditions. Bug: 7259520 Change-Id: Idde8bc4fc58b8b426c6985feac87759740e338ea
* Camera2: Fix trying to release HAL stream twiceIgor Murashkin2012-10-031-3/+11
| | | | | | | | | | | | | When we fail to disconnect the native window, StreamAdapter::release would fail and remain in the old (ALLOCATED) state, thus it thinks that we haven't released the HAL stream yet. With this change, ignore DEAD_OBJECT native window disconnect failures, so the state transitions to RELEASED and we don't double release HAL streams. Bug: 7258314 Change-Id: I524893e4b4d6463d7b0a7ce32fb6f658afba8e11
* Camera2: Handle client processes dying by closing camera resourcesIgor Murashkin2012-10-0311-28/+121
| | | | | | | | | CameraService now subscribes to binder death notifications for each client, and disconnects the client if the death happened without cleanly shutting down the client first. Bug: 7258314 Change-Id: I7803836b589fd8f0dfe00f6c28a707b82012e751
* Camera2: Don't change state when reconnect is calledIgor Murashkin2012-10-032-3/+10
| | | | | Bug: 7252802 Change-Id: Ibed4f59a96bef75bf84b1aaf1235fb87e94102ef
* Camera2: Use ZSL format quirk.Eino-Ville Talvala2012-10-024-2/+40
| | | | | | | | | | Switch service to using HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, unless ZSL quirk is set. This is important for compatibility across multiple implementations. Bug: 6243944 Change-Id: Iea74671cbb44890a07e4f99cd757b0a5423d447a
* Camera2: Use scene mode override parameterEino-Ville Talvala2012-10-024-47/+260
| | | | | | | | | | | | | | - Read in SCENE_MODE_OVERRIDES static parameter if available. Use it to select AF/AE/AWB modes when a scene mode is set. - Add quirks structure to parameters; not yet used - Fix desynchronization between range and single FPS value. Still need to sort out best way to convert from one to another. Bug: 7259959 Bug: 7159577 Bug: 7172543 Change-Id: I0d07c31d5f21fbc4b0ec2fa23f7f778073d2d6e0
* Camera2: Refactor preview/recording management to separate class.Eino-Ville Talvala2012-09-287-533/+794
| | | | | | | | | | | Untangle preview/recording management from main class to simplify callpaths; in preparation for fixing several HAL/app interactions bugs. Bug: 7172543 Bug: 7159577 Bug: 7107220 Change-Id: Iab5503f66b35d88a1524111536a484c9e33fd934
* DO NOT MERGE: Remove experimental parameters for burst modeJames Painter2012-09-282-17/+0
| | | | | Bug: 7248756 Change-Id: I3aaf2da4791b2a13e1e788b2914e4c51c529a75d
* Merge "Camera2: Use new JPEG transport header" into jb-mr1-devAlex Ray2012-09-282-38/+15
|\
| * Camera2: Use new JPEG transport headerAlex Ray2012-09-272-38/+15
| | | | | | | | | | | | | | | | Check for new JPEG transport header at the end of the stream buffer instead of at the beginning. Bug: 7108816 Change-Id: I26c52267cb406dae50c9d0ee01e6c26359ba84aa
* | Merge "Camera2: Re-entering preview state on v2 Device" into jb-mr1-devAlex Ray2012-09-281-1/+7
|\ \ | |/ |/|
| * Camera2: Re-entering preview state on v2 DeviceAlex Ray2012-09-261-1/+7
| | | | | | | | | | Bug: 7240891 Change-Id: I6a01b27197b4ee89a68f06f4375d315a716b67ae