summaryrefslogtreecommitdiffstats
path: root/services/camera
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | Camera3Device: Support batch requestsChien-Yu Chen2015-09-038-199/+387
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor request threadLoop to three parts: waiting for next batch of requests, preparing HAL requests and output buffers for next batch of requests, and submitting the batch of requests to HAL. Set the batch size to the size of the request list if it's a video recording request in a high speed video configuration. Add a flush lock so that HAL's flush() won't be called while submitting a batch of requests. Bug: 23360060 Change-Id: Icd395b1f955a9b336eec6fa5aff6b17741ce08c7
| * | | | CameraService: Treat TOP_SLEEPING same as TOP for priority.Eino-Ville Talvala2015-09-032-0/+7
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When arbitrating between camera clients, treat processes in the TOP_SLEEPING state with the same high priority as processes in the TOP state. This resolves race conditions during lock screen handoffs between clients such as face unlock (a bound foreground process) and a secure camera app (the topmost activity, but transitioning from TOP_SLEEPING to TOP asynchronously from the activity lifecycle callbacks). Bug: 23731720 Change-Id: I92c3f8f561c7725627826c0ba3dc926e99af746c
| * | | am fe751bea: Camera: Fix flashlight deadlockChien-Yu Chen2015-09-022-3/+5
| |\ \ \ | | | |/ | | |/| | | | | | | | | * commit 'fe751bea0d3eedd6e817aebf4e457425b82e7117': Camera: Fix flashlight deadlock
| | * | Camera: Fix flashlight deadlockChien-Yu Chen2015-09-012-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a dedicated mutex for torch UID map so it won't cause a deadlock after flashlight app gets killed while the torch is on. Bug: 23722318 Change-Id: I228377aa0412052d56b6b948361d9abaecbbc686
| * | | Camera3Device: Don't hold mutex during HAL device close.Eino-Ville Talvala2015-08-281-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HAL device shutdown will likely need to wait on various events and queues to drain, and holding the mutex will prevent, for example, error notifications from being processed. This can lead to deadlocks. Bug: 23501571 Change-Id: I873ac23ef30545adf533e7839445448573ab5048
| * | | CameraService: Notify camera service proxy of device statusEino-Ville Talvala2015-08-218-6/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send the camera proxy service in system server updates to camera device state: opened/closed/active/idle. Bug: 23393557 Change-Id: Id7c70f134821efa34af8f6e7b4caa4c2ab128ebc
| * | | Merge "Add experimental camera session prepare API." into mnc-dr-devRuben Brunk2015-08-1710-13/+103
| |\ \ \ | | |/ / | |/| |
| | * | Add experimental camera session prepare API.Ruben Brunk2015-08-1410-13/+103
| | | | | | | | | | | | | | | | | | | | Bug: 18949148 Change-Id: I8f73e68ea2e3acc60d98954106f364d13f439a82
* | | | cameraservice: Resolve message vs start/stop preview racesRicardo Cerqueira2015-10-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the mutex in start/stopPreview to include the metadata message management. Fast start/stop sequences could (and would) eventually cause the messages to be enabled/disabled out of sequence (or while the camera wasn't ready for it) This is a port of I367bc45729ce2e858fea972f35e881a755c6021a from cm-11 Change-Id: I9a065f951f628d1c550acbac18493b9ad3853d03
* | | | camera: add ability for a device to specify MAX_CAMERASDan Pasanen2015-10-302-0/+8
| | | | | | | | | | | | | | | | Change-Id: I3db99ea4eff63aab3448efe7b2eb51366c658c03
* | | | Camera: Added null check for memory referenceSuman Mukherjee2015-10-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Null memory reference in releaseRecordingFrame will cause crash in cfuzz tool. Added Null check for memory reference Change-Id: Id15fc55cc89b6039a36c1c3c7e4b55c0ae5aa296
* | | | Camera: Support obtaining camera memory from MemoryHeapIonEthan Chen2015-10-302-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | * Exynos 5 devices want the ION file descriptor from MemoryHeapIon Change-Id: I9e445cf24c15713f713181667e7b7caa1a96592e
* | | | camera: Allow hardware/camera.h header to be overriddenEthan Chen2015-10-302-2/+2
| | | | | | | | | | | | | | | | Change-Id: I715ba261de0b01e61cbfe7cacd567a9f511fb8cb
* | | | Camera: frameworks: Add NULL check for callbackSusmitha Gummalla2015-10-291-1/+5
| |_|/ |/| | | | | | | | | | | | | | --Added NULL check for mRemoteCallback Change-Id: Ib88a128a52e81b8ec1052e3222b6d8b9e494afcc
* | | Camera: Add extensions to CameraClientShuzhen Wang2015-10-062-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change includes the following gerrits: # This is a combination of 4 commits. # The first commit's message is: Camera: Enable Histogram feature. Link the histogram enable/disable commands from application to the HAL layer. Change-Id: I510c4e1798285ed1315bfb0d234fa76090659ba2 # This is the 2nd commit message: Camera: Add support for ZSL burst mode. Added ability to set number of snapshots in burst mode. Change-Id: Ie0e7c8c0117b7adc985cfc92df79747ee6a5ea51 # This is the 3rd commit message: CameraService: Adds support for longshot mode - This change introduces additional functionality inside CameraClient for supporting continuous compressed data callbacks. This is needed for 'Burst/Long shot' mode where we could have indefinite number of callbacks after capture is triggered. (cherrypicked from commit e4f502aa7cbe8875e8a1589024cdcf227c228a2b) Change-Id: Ia18ca9bdda7736c679db557e510870115089537a # This is the 4th commit message: CameraClient: Enables meta data notifications. Adds the needed functionality for enabling/disabling metadata messages depending on the camera client commands. Change-Id: I39d632b4742e83df5db5f86b12742aefc2480dfc Cherrypicked from 25bd97f5ec30e7942c3b1fdc96115da6028736f0 Change-Id: Ie930d20c962593e40a0767f9cf7d4385df8e2561
* | | Camera: Fix flashlight deadlockChien-Yu Chen2015-09-022-3/+5
|/ / | | | | | | | | | | | | | | Use a dedicated mutex for torch UID map so it won't cause a deadlock after flashlight app gets killed while the torch is on. Bug: 23722318 Change-Id: I228377aa0412052d56b6b948361d9abaecbbc686
* | Camera: Add camera type to ICameraService.getNumberOfCameras.Eino-Ville Talvala2015-08-142-14/+96
| | | | | | | | | | | | | | | | | | Also determine the number of 'normal' cameras present on camera service startup, and ensure that all normal cameras have IDs lower than the 'strange' cameras. Bug: 23194168 Change-Id: I1f7b14825cb52707de698a955f85da1eaa932663
* | Merge "Fix deadlock conditions in Camera3Device." into mnc-devRuben Brunk2015-08-132-20/+54
|\ \ | |/ |/|
| * Fix deadlock conditions in Camera3Device.Ruben Brunk2015-08-122-20/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | Potential deadlock conditions this addresses, include: - Not waking up waiting threads for several situations where the status had been updated. - Not waking up all waiting thread when status had been updated (only one thread was awoken due to use of signal). - Threads clear status transitions before other waiting threads have a chance to examine them. Bug: 22448586 Change-Id: I53ba669d333a83d2bfa1ca3170d34acc6d8fe6e3
* | Merge "Camera3Device: Relax InFlightMap size check" into mnc-devChien-Yu Chen2015-08-132-2/+8
|\ \ | |/ |/|
| * Camera3Device: Relax InFlightMap size checkChien-Yu Chen2015-08-122-2/+8
| | | | | | | | | | | | | | | | Relax InFlightMap size check for high speed configurations to allow more pending capture requests. Bug: 23162274 Change-Id: I955fe9a0754f0daed001f4a2b34ccb50f2465a11
* | Camera: Allocate correctly-sized buffers for DEPTH_POINT_CLOUDEino-Ville Talvala2015-08-112-7/+31
|/ | | | | Bug: 20537722 Change-Id: I9fa2fcdcfd41cd3370732c70414914993d3dc94e
* Merge "Fix UAF error in CameraModule." into mnc-devRuben Brunk2015-07-181-2/+3
|\
| * Fix UAF error in CameraModule.Ruben Brunk2015-07-171-2/+3
| | | | | | | | | | Bug: 22542551 Change-Id: I2fe5791a6554a8e2f7fd94593d552d8af18257db
* | Merge "Camera2Client: handle slower jpeg stream sensor" into mnc-devYin-Chia Yeh2015-07-175-18/+154
|\ \
| * | Camera2Client: handle slower jpeg stream sensorYin-Chia Yeh2015-07-165-18/+154
| |/ | | | | | | | | | | | | | | | | | | | | If largest jpeg stream cannot sustain 30 FPS, don't create jpeg stream until takePicture is called and remove it after still capture is done. Also, disable video snapshot for such sensors so video snapshot won't slow down video recording. Bug: 22231605 Change-Id: I2b34d2537c224694ae10f2006b5a46be45a1b1a6
* | Camera: Add hidden experimental tearDown method.Eino-Ville Talvala2015-07-1610-1/+164
|/ | | | | Bug: 18949148 Change-Id: Ie86ec7d1ec3db54e1154563b2339a208a935f849
* Merge "camera2: Fix native binder interface and add tests." into mnc-devRuben Brunk2015-07-071-1/+1
|\
| * camera2: Fix native binder interface and add tests.Ruben Brunk2015-07-061-1/+1
| | | | | | | | | | | | | | | | | | - Add CameraBinderTests for limited coverage of native camera2 binder interfaces for the camera service. - Fix several bugs in the native binder interfaces. Bug: 18468810 Change-Id: Iab2d81a5cacd20daf7454aeeed033cc13d88452c
* | CameraModule: fix getCameraInfo()Chien-Yu Chen2015-07-062-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove mCameraCharacteristicsMap. CameraModule kept a CameraMetadata in mCameraCharacteristicsMap and kept its camera_metadata in mCameraInfoMap. When CameraMetadata gets moved in mCameraCharacteristicsMap, it may clone a new camera_metadata and free the old one. So the original camera_metadata stored in mCameraCharacteristicsMap becomes invalid. Bug: 22171288 Change-Id: Ia8e99fe42989946bc952ad23abb296aeac60da83
* | Camera3-Device: Fix AE lock availableChien-Yu Chen2015-06-302-16/+16
| | | | | | | | | | | | | | | | | | Pass whether AE lock is available when creating the request thread because when the request thread was created, its parent's info was not set yet. Bug: 20494782 Change-Id: I11ed3f99c473955c437e81f3e1d704c15a9ca1a4
* | Merge "Camera3: Support AE precapture trigger CANCEL" into mnc-devChien-Yu Chen2015-06-242-31/+124
|\ \ | |/ |/|
| * Camera3: Support AE precapture trigger CANCELChien-Yu Chen2015-06-242-31/+124
| | | | | | | | | | | | | | | | Support AE precapture trigger CANCEL for devices <= API version 3.2. Bug: 20494782 Change-Id: I6003ba8057ca4ec9e8dfda47b8411ae6be913d22
* | Add default for pre-distortion active array.Ruben Brunk2015-06-221-0/+9
| | | | | | | | | | Bug: 20491394 Change-Id: I53b0539b37cc7a042e6765c97775b8c2bbba7159
* | Camera3Device: Fix high speed configurationChien-Yu Chen2015-06-181-1/+5
|/ | | | | | | | If high speed mode changed, HAL needs to reconfigure the streams even when the stream configurations don't change. Bug: 21900311 Change-Id: I76aee456b3b6d8c8f599a1638dcd38d75553a235
* Merge "Fix rounding width." into mnc-devRuben Brunk2015-06-121-3/+2
|\
| * Fix rounding width.Ruben Brunk2015-06-121-3/+2
| | | | | | | | | | Bug: 19930700 Change-Id: I9d5685bd98a049fcb01f6ecc649f15f3b4498e6d
* | CameraService: Add consumer name to output stream dumpsysEino-Ville Talvala2015-06-0921-47/+56
|/ | | | | | | | | | Also switch use of ANativeWindow to Surface, to get to the getConsumerName() method where necessary. Surface can always be cast to ANativeWindow, but not the other way around, so it's a better option anyway. Change-Id: Ie5c2d30821c1a754f9e382699ff50b4b328288b3
* Camera3Device: Default-initialize operating mode.Eino-Ville Talvala2015-06-091-1/+2
| | | | | | | | Since configureStreams is only called by CameraDeviceClient, the operation mode could default-initialize to CONSTRAINED_HIGH_SPEED for API1 operation. Change-Id: Ide71af07ca3925db8e450d00def1daeb44d8046a
* Camera1 API: Support SW encoders for new camera HALsEino-Ville Talvala2015-06-0815-50/+141
| | | | | | | | | | | | - Support new set video format/dataspace command in camera service - HALv3: Select gralloc usage flags based on format - HALv1: Pass format command directly to HAL layer - Use format/dataspace command in CameraSource - Switch all API1 recording to use metadata mode - Switch all >= HALv2 API1 recording to use kMetadataBufferTypeANWBuffer Bug: 13222807 Change-Id: I2e609b92c65792611bb1dab09e0c41c363ebbc42
* Camera: Change error for app ops reject, propagate binder errorsEino-Ville Talvala2015-06-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | INVALID_OPERATION surfaces as an non-specific device-level error to applications in the onError callback. This is not a condition apps targeting camera2 in L will generally have to deal with. Instead, return -EACCESS which maps to throwing CameraAccessException.CAMERA_DISABLED, same as disabling camera access with DevicePolicyManager. The old camera API converts any error code to -EACCESS at the JNI layer, so this doesn't change anything for the older API. Also update the various native ICameraService binder connect calls to check for the transact error code, and return it if it is not OK. Without this, PERMISSION_DENIED transact errors from the camera service cannot be distinguished from CAMERA_DISABLED errors in some codepaths. Bug: 21604925 Change-Id: Ifccc8989b8c20653429e2d3e51dba7abb2be9c35
* Camera2: implement high speed video APIsZhijun He2015-06-038-10/+53
| | | | | Bug: 21442271 Change-Id: Ia0ae5bbd3e8c81bad293c29987301a2457817d12
* Merge "Track camera and flashlight usage in battery stats." into mnc-devRuben Brunk2015-06-024-51/+205
|\
| * Track camera and flashlight usage in battery stats.Ruben Brunk2015-06-014-51/+205
| | | | | | | | | | | | Bug: 15986092 Change-Id: I9dc6828332e4091fd93bf2d82839e8e3862a2fc2
* | Camera3: fix aborting reprocess requestsChien-Yu Chen2015-06-012-24/+39
| | | | | | | | | | | | | | | | | | | | | | | | Get an input buffer right after camera service takes one reprocess capture request from the request queue to prevent the input buffers getting out of order. When aborting pending reprocess requests in the request queue, also abort the same amount of input buffers. Bug: 21028914 Change-Id: I7cfacecb4c24509f59c983abd587db5a403237bd
* | Merge "Camera: derive LSC characteristics keys" into mnc-devYin-Chia Yeh2015-05-281-2/+28
|\ \
| * | Camera: derive LSC characteristics keysYin-Chia Yeh2015-05-281-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | Also fix a typo in AWB lock available key. Bug: 21403373 Bug: 20883751 Change-Id: I5156f4fafcf4ae86f680fb618966c7cc58900120
* | | Camera3Device: Do not call cleanUpFailedRequest with mutex heldEino-Ville Talvala2015-05-281-10/+14
| | | | | | | | | | | | | | | | | | | | | Double-acquiring a non-recursive mutex tends to work poorly. Bug: 21498811 Change-Id: I1d59959fca69c97684522195808019797f7a6a7d
* | | Camera3Device: Close hole in prepare in-use stream checkEino-Ville Talvala2015-05-272-0/+22
|/ / | | | | | | | | | | | | | | | | | | | | | | | | There's a narrow window in which a capture request is neither in the request queue or handed off to the HAL, which can be expanded to some size if buffers have to be allocated. During this window, the prepare() method will not correctly notice that a stream should be considered in use. Add a member to contain the current request being processed, and check against it in prepare as well. Change-Id: I3a198d617f5feee0a3332af4b4439f24eda28ea3
* | Merge "camera: Add AIDL interface for CameraServiceProxy." into mnc-devRuben Brunk2015-05-202-0/+15
|\ \