summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/device3
Commit message (Collapse)AuthorAgeFilesLines
* Camera3Device: Validate template IDChien-Yu Chen2016-03-251-0/+8
| | | | | | | | Validate template ID before creating a default request. Bug: 26866110 Bug: 27568958 Change-Id: Ifda457024f1d5c2b1382f189c1a8d5fda852d30d
* Camera3Device: Change HFR request thread priority to 1Chien-Yu Chen2015-10-011-1/+1
| | | | | | | | | Based on periods of the request thread and audio threads with SCHED_FIFO policy, 1 is a more reasonable priority for HFR request thread. Bug: 24427480 Change-Id: I91f0066a0e114fc83abcc6a604ecbaa72c6a34e8
* Camera3Device: Bookkeeping reprocess shutters separatelyChien-Yu Chen2015-09-302-12/+27
| | | | | | | | Bookkeeping reprocess shutters separately so regular and reprocess shutters together don't need to come in order. Bug: 24497512 Change-Id: I4aaf22045131e9e2e26bf163f7df9ff4c5cd6259
* CameraService: Use SCHED_FIFO for request queue thread in HFREino-Ville Talvala2015-09-262-0/+18
| | | | | | | | | | - Move SchedulingPolicyService from audioservice to mediautils - When starting up a high speed stream config, set request queue thread to SCHED_FIFO using SchedulingPolicyService Bug: 24227252 Change-Id: I224b59142bd111caf563779f55cddd62385b9bac
* Camera3Device: Signal buffer returned after it failedChien-Yu Chen2015-09-111-1/+4
| | | | | | | | Signal buffer returned even after it failed so the thread waiting for it can wake up sooner. Bug: 23981045 Change-Id: Iccbcc7ece2e0f6204da9c54f2bdd96ff6843a8f5
* Camera3Device: Clean up next request batch variableChien-Yu Chen2015-09-042-52/+41
| | | | | | | | Make the Vector of next requests a RequestThread member variable to avoid memory allocation in every threadloop. Bug: 23360060 Change-Id: I4f33e5c49f0f4deb1f9f45bada0909da748849e4
* 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
* 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
* Merge "Add experimental camera session prepare API." into mnc-dr-devRuben Brunk2015-08-175-13/+50
|\
| * Add experimental camera session prepare API.Ruben Brunk2015-08-145-13/+50
| | | | | | | | | | Bug: 18949148 Change-Id: I8f73e68ea2e3acc60d98954106f364d13f439a82
* | 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
* Camera: Add hidden experimental tearDown method.Eino-Ville Talvala2015-07-165-0/+116
| | | | | Bug: 18949148 Change-Id: Ie86ec7d1ec3db54e1154563b2339a208a935f849
* 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
* | 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
* CameraService: Add consumer name to output stream dumpsysEino-Ville Talvala2015-06-095-9/+17
| | | | | | | | | | 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-083-3/+6
| | | | | | | | | | | | - 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
* Camera2: implement high speed video APIsZhijun He2015-06-032-3/+11
| | | | | Bug: 21442271 Change-Id: Ia0ae5bbd3e8c81bad293c29987301a2457817d12
* 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
* 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
* Camera: Cleanup to prepare() implementationEino-Ville Talvala2015-05-131-4/+4
| | | | | | | | | - Mutexes _might_ be a good idea - Don't be surprised by behavior that's expected - Use the existing logging macros Bug: 20537148 Change-Id: Ie62985a786d7e6645b4e4fe019dd98b02891a1f7
* Camera2: allow mixing regular/reprocess requestsChien-Yu Chen2015-05-051-0/+2
| | | | | | | | Allow mixing regular and reprocess requests in a capture burst. Also call abandon() when deleting an input stream. Bug: 20537735 Change-Id: If8c7781038173ab21c73f5ddc32f53793cf86fd9
* Merge "Camera3: allow reconfiguring the input stream"Chien-Yu Chen2015-04-151-5/+1
|\
| * Camera3: allow reconfiguring the input streamChien-Yu Chen2015-04-151-5/+1
| | | | | | | | Change-Id: Ia9d0db1f3378264fc9173bfc8706c8f955b79182
* | Merge "Camera: allow non-supported template"Yin-Chia Yeh2015-04-151-3/+3
|\ \
| * | Camera: allow non-supported templateYin-Chia Yeh2015-04-141-3/+3
| | | | | | | | | | | | | | | Bug: 19395059 Change-Id: I42bbd99fef6055173062266c1a490311105c6814
* | | Camera2: Add prepare for output streamsEino-Ville Talvala2015-04-1513-36/+568
| |/ |/| | | | | | | | | | | | | | | The prepare call asynchronously pre-allocates buffers for a given output stream, and then fires the onPrepared callback. Not implemented for Camera2Device or used in Camera2Client. Change-Id: I1cccdfff846dd6985133c591dbdceed823929ade
* | camera2: add reprocess supportChien-Yu Chen2015-04-138-19/+147
|/ | | | | | | Add support to create input stream, submit reprocess capture requests, and receive reprocess capture results. Change-Id: Iee2d4313f3d52616a484eaea7a28f5ef9d8a674b
* Camera: fix release fence logicYin-Chia Yeh2015-03-241-26/+9
| | | | | | | | | According to spec, HAL will set release_fence to acquire_fence when error happened (usually during flush call). Camera service should not refer to the acquireFence anyhow since per spec HAL needs to set it to -1 if acquireFence has been waited on. Change-Id: I809355d0c8c71f78f657e37d19221fd1f5bdc90b
* Merge "Camera: plumbing rotation field through"Yin-Chia Yeh2015-03-1912-24/+27
|\
| * Camera: plumbing rotation field throughYin-Chia Yeh2015-03-1812-24/+27
| | | | | | | | Change-Id: I0f4343a0bfa7bf09ba887c78a1da1c08daa35333
* | libcameraservice: Stop using IGBC::BufferItemDan Stoza2015-03-122-2/+1
|/ | | | | | | | Switches all uses of IGraphicBufferConsumer::BufferItem (and BufferQueue::BufferItem) to the BufferItem in libgui. Depends on frameworks/native I699ed0a6837076867ca756b28d1ffb2238f7a0d9. Change-Id: I187b3a7d05196b6289596afac8fb9a9d4aebff76
* Camera: Wire up dataSpace, clean up ICameraDeviceUserEino-Ville Talvala2015-03-0612-26/+54
| | | | | | | - Remove unused arguments from ICameraDeviceUser::createStream - Add dataSpace as a stream parameter, plumb it through everything Change-Id: I608cafe694785d1c512276e71b2016f8ac3b0ccb
* camera: implement flashlight for HAL v1 devicesChien-Yu Chen2015-03-031-2/+2
| | | | | | | | | Implement flashlight for HAL v1 devices and remove CameraHardwareInterface's dependency on CameraService to avoid circular dependency. Bug: 2682206 Change-Id: Id5bbccef085b607a6189763fd7fbe2e3f26868c8
* CameraService: intercept Camera moduleYin-Chia Yeh2015-02-032-6/+5
| | | | | | | | Wrap camera module returned from HAL so get_camera_info returns static_camera_characteristics processed by framework, which generates keys added after HAL3.2 is released. Change-Id: Ief423a1571cf06c7ef80b98b403a33969baf95f6
* Camera: make sure jpeg buffer size isn't too smallYin-Chia Yeh2015-01-201-4/+3
| | | | | | | | Assuming the jpeg header can take up to 256KB, make sure we always allocate enough size for the image data. Bug: 18962703 Change-Id: I08eb3d198d12f71f3ab7266324e80fe7410bdc89
* Camera3Device: support shutter after resultChien-Yu Chen2014-12-092-141/+234
| | | | | | | | | | | | | Move the code to remove in-flight requests from processCaptureResult to a separate function so it can be called when the framework receives a result or a shutter event. An in-flight request will only be removed when both results and the shutter event arrive in the case of a successful request. Also send out results only after the shutter event receives. Bug: 18135776 Change-Id: I340db1a495c711b0913784d43fd0f144871e4420
* camera: fix frame deletion logic in mInFlightMapRuchit Sharma2014-11-251-2/+6
| | | | | | | | | | | For per-frame error notifications, camera3.h requirements state that all the buffer handles for a failed frame capture must be returned via process_capture_result() call(s). Hence, Camera3Device needs to ensure that the frame entry is not deleted from mInFlightMap until all buffers for that frame have been returned by HAL. Bug: 17757940 Change-Id: I2579ca7980d2fd67d53abc530e2706538f7d3d3a
* camera: add traces for KPI measurementRuchit Sharma2014-09-252-2/+16
| | | | | Bug: 17658101 Change-Id: I1d8035c4a8fba7b88a87f205ce57c13d812e9df5
* Merge "Camera3Device: Treat failure to idle as an error" into lmp-devEino-Ville Talvala2014-09-151-0/+4
|\
| * Camera3Device: Treat failure to idle as an errorEino-Ville Talvala2014-09-141-0/+4
| | | | | | | | | | Bug: 16899526 Change-Id: Ia995aac6360c9c41ed654af5a7052480f23903d8
* | Camera3: Update ZSL post-processing tagsZhijun He2014-09-142-0/+8
|/ | | | | | | | | Update ZSL processing tags according the still capture template Also cache the request template to avoid extra cost of querying into HAL every time. Bug: 17463102 Change-Id: I2eeffefb0a4131c99a85dd3e4484cc6f0f025efa
* camera2: skip capture result after clearZslQueueYin-Chia Yeh2014-09-112-6/+12
| | | | | | | | After ZSL queue is cleared, don't add capture result to ZSL queue if its corresponding buffer has been cleared. Bug: 17185356 Change-Id: Iddac39ab09b2560e2ce9390895927217c1736d5a