summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice
Commit message (Collapse)AuthorAgeFilesLines
* libcameraservice: Don't pass NULL args on setCallbacks callirii2016-09-111-1/+13
| | | | | | | | | | | *This fixes the torch light for cameras with hal 1 *This fix works on the htc m7ul *Fixed line length *Fixed unused parameter names Change-Id: I89c6112546e36dbcca099f4d5cd70371b2c5340a
* Merge tag 'android-6.0.1_r61' into HEADJessica Wagantall2016-08-021-0/+8
|\ | | | | | | | | | | Android 6.0.1 Release 61 (MOB30Z) Change-Id: Ic86e42d5fb8f81fe5c4f58d2e76852829c609760
| * DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleakEino-Ville Talvala2016-06-231-0/+8
| | | | | | | | | | | | | | | | Subtract address of a random static object from pointers being routed through app process. Bug: 28466701 Change-Id: Idcbfe81e9507433769672f3dc6d67db5eeed4e04
* | Revert "cameraservice: Run HAL3 in Non ZSL mode".Sanjeev Garg2016-05-061-1/+1
| | | | | | | | | | | | | | Reverting the Temp change. This reverts commit f300e17bf3451bf821ccc48c45b243c84ebaff7f. Change-Id: Ib11e38eb8edd7523cb6cdb21caa511152ee62e45
* | Merge tag 'android-6.0.1_r43' into HEADJessica Wagantall2016-05-031-0/+8
|\ \ | |/ | | | | | | | | | | Ticket: CYNGNOS-2373 Android 6.0.1 release 43 (MOB30J) Change-Id: Ie0ab546349bd8a7eed51c839fba28b809e433fd4
| * 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
* | cameraservice: Run HAL3 in Non ZSL modeAbhishek Kondaveeti2016-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | ZSL mode is not working on HAL3 due to camera backend failures. Run HAL3 forcefully in Non zsl mode till the problem in camera backend fixed. This change will be reverted once the backend issue is fixed. CRs-Fixed: 956182 Change-Id: I1dfcda8eb0fe5cd2d9be6cb2e103f5fd84955ecb
* | CameraClient: MTK SupportRicardo Cerqueira2016-04-111-0/+3
| | | | | | | | | | | | | | Return on MTK hardware, the HAL does this internally and duplicating it here causes an infinite loop. Change-Id: I5bdb925ddb49980747b58dfae4543f812cef4c7d
* | CameraService: Fix cameraId type of onDeviceStatusChangedBin Chen2016-03-222-3/+3
| | | | | | | | | | | | | | The cameraId should be of type int, instead of camera_device_status_t. Change-Id: I26d587bb74f7100028f09928984c2e8dad6eebef Signed-off-by: Bin Chen <chen_bin@projectara.com>
* | libcameraservice: Allow media server to disconnect camera even unlockedWang, Jianfeng XA2016-03-221-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The camera service may fail to release the camera hardware instance in some use cases. When an application unlocked the camera before disconnect, disconnect from the application will not be accepted. And disconnect from media server will not be accepted also. Then, the camera hardware instance will not be released and a resource leak will be caused. Allow media server to disconnect the camera at all times even if the camera is unlocked. Change-Id: Icd5ed81bed242fa5947aa40ca85e4ca7fa7286e7
* | Merge tag 'android-6.0.1_r22' of ↵Steve Kondik2016-03-101-0/+1
|\ \ | | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/av into cm-13.0 Android 6.0.1 release 22
| * \ Camera: Disallow dumping clients directly am: c400396525Eino-Ville Talvala2016-01-1410-6/+37
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | am: 795243686f * commit '795243686fe2e1c352732b47bcdb6ea9e9e7e39e': Camera: Disallow dumping clients directly
| | * \ Camera: Disallow dumping clients directlyEino-Ville Talvala2016-01-1410-6/+37
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: c400396525 * commit 'c4003965258404a19b99280ac0f475e2f290bf27': Camera: Disallow dumping clients directly
| | | * | Camera: Disallow dumping clients directlyEino-Ville Talvala2016-01-1310-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Camera service dumps should only be initiated through ICameraService::dump. Bug: 26265403 Change-Id: If3ca4718ed74bf33ad8a416192689203029e2803
| * | | | Camera: set mNumberOfNormalCameras correctlyYin-Chia Yeh2016-01-121-0/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Need to set the number correctly when a camera HAL is not present. Bug: 25951590 Change-Id: I666acf7a2a523c51f2c2ae88ff690ca9dccda08c
* | | | Merge tag 'android-6.0.1_r17' into HEADJessica Wagantall2016-03-0710-6/+37
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | Android 6.0.1 release 17 Ticket: CYNGNOS-1854
| * | | Camera: Disallow dumping clients directlyEino-Ville Talvala2016-01-2210-6/+37
| |/ / | | | | | | | | | | | | | | | | | | | | | Camera service dumps should only be initiated through ICameraService::dump. Bug: 26265403 Change-Id: If3ca4718ed74bf33ad8a416192689203029e2803
* | | cameraservice: Change the error mapping for ERROR_CAMERA_DEVICE.Sai Kumar Sanagavarapu2016-01-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of API1-HAL3, if HAL reports CAMERA3_MSG_ERROR_DEVICE, it is getting mapped to CAMERA_ERROR_UNKNOWN in the service layer. But this particular error code is not handled properly even in applications like GoogleCamera (Android default camera app). For example if camera deamon gets killed when GoogleCamera is previewing, since its not handling the error properly, preview freeze is seen for long time followed by mediaserver crash if any user interaction happens meanwhile. Ideally, app should close gracefully based on the error received. So, map CAMERA3_MSG_ERROR_DEVICE to CAMERA_ERROR_SERVER_DIED, so that app and mediaserver gets closed gracefully. Change-Id: Idad9d23262e28e85b020b5bacdaad7c77fe16372
* | | Merge tag 'android-6.0.1_r3' of ↵Steve Kondik2015-12-074-14/+17
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/av into cm-13.0 Android 6.0.1 release 3 Change-Id: I2f2a1fe1b58c828e8341556996211562d6e195ab
| * | DO NOT MERGE: libcameraservice: Fix nullptr crash when no client.Tom Keel2015-10-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change prevents a crash in the camera service when the camera HAL notifies the service about the absence of a removable camera and there happens to be no client connected to the service. It checks that the pointer returned from clientToDisconnect.get() is non-null before trying to dereference it (as is done in existing code immediately below this change). Bug: 25165323 Change-Id: I8055654bac980542e63ea7f52bf897eaafbc09bc Signed-off-by: Tom Keel <thomas.keel@intel.com>
| * | libcameraservice: Fix ALOG prints in FlashLight.Ranjith Kagathi Ananda2015-10-161-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing __FUNCTION__ arguments into log statements. Ack by: Dilip Gopalakrishna Bug: 25023187 Change-Id: I0256bad626d490fb9360a73c104afaad7a012a97
| * | Camera: frameworks: Add NULL check for callbackRanjith Kagathi Ananda2015-10-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | --Added NULL check for mRemoteCallback Ack by: Susmitha Gummalla Bug: 25023187 Change-Id: Ib88a128a52e81b8ec1052e3222b6d8b9e494afcc
| * | Merge "Camera: setup vendor tags before get_camera_info" into mnc-dr-devYin-Chia Yeh2015-10-151-6/+7
| |\ \
| | * | Camera: setup vendor tags before get_camera_infoYin-Chia Yeh2015-10-141-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | So HAL can use vendor tags on first get_camera_info call. Bug: 24913201 Change-Id: I73f17de87e3712a27f9cee366995df27a740f5cb
| * | | Merge "Camera: Add video recording stop sound" into mnc-dr-devChien-Yu Chen2015-10-144-8/+10
| |\ \ \
| | * | | Camera: Add video recording stop soundChien-Yu Chen2015-10-144-8/+10
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | Add video recording stop sound to match MediaActionSound. Bug: 24745252 Change-Id: I84b69757c7e0a98abfaafcce5f41dd45fd41cf74
| * | | DO NOT MERGE: Fix setTorchMode support for the old HAL versionOleksiy Avramchenko2015-10-141-0/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | CameraHardwareInterfaceFlashControl class calls disconnectCameraDevice when torch is disabled. This closes connection to the camera module, but mDevice instance is kept and variable is non-NULL which will prevent connection next time torch is going to be enabled. Bug: 24909924 Change-Id: Icb1ffb07f05256afd92821f0f4908cda5332c05b
* | | Fix setTorchMode support for the old HAL versionOleksiy Avramchenko2015-11-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | CameraHardwareInterfaceFlashControl class calls disconnectCameraDevice when torch is disabled. This closes connection to the camera module, but mDevice instance is kept and variable is non-NULL which will prevent connection next time torch is going to be enabled. Change-Id: Icb1ffb07f05256afd92821f0f4908cda5332c05b
* | | Merge branch 'LA.BF64.1.2.2_rb4.7' of ↵Steve Kondik2015-11-161-4/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | git://codeaurora.org/platform/frameworks/av into cm-13.0 Change-Id: Ia41df61c3ccfeb809572b63a4b1a8ca6bd85dfb2
| * \ \ Merge "Camera: frameworks: Add NULL check for callback"Linux Build Service Account2015-11-041-1/+5
| |\ \ \
| | * | | Camera: frameworks: Add NULL check for callbackSusmitha Gummalla2015-10-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --Added NULL check for mRemoteCallback Change-Id: Ib88a128a52e81b8ec1052e3222b6d8b9e494afcc
| * | | | Merge "DO NOT MERGE: CameraService: Link to client binder death at end of ↵Linux Build Service Account2015-11-022-8/+11
| |\ \ \ \ | | |/ / / | |/| | | | | | | | connect"
| | * | | DO NOT MERGE: CameraService: Link to client binder death at end of connectEino-Ville Talvala2015-10-292-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If, within a binder Looper thread, a Binder object death notifier is registered, and then a nested Binder transaction is begun, that transaction may process a death notification callback for the just-registered object, if it was dead at the time of registration. This can lead to an unexpected nested call into the service, and cause deadlock. To avoid this, move the death notifier registration to the end of handling the connect transaction. Also remove one extra bit of disconnect logging. Bug: 23525545 Change-Id: If01cbaf42704f55134118afefc9a8f7bdb014e09
| * | | | libcameraservice: Fix ALOG prints in FlashLight.Dilip Gopalakrishna2015-10-251-4/+8
| |/ / / | | | | | | | | | | | | | | | | | | | | Add missing __FUNCTION__ arguments into log statements. Change-Id: I0256bad626d490fb9360a73c104afaad7a012a97
* | | | libcameraservice: Fix nullptr crash when no client.Tom Keel2015-11-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change prevents a crash in the camera service when the camera HAL notifies the service about the absence of a removable camera and there happens to be no client connected to the service. It checks that the pointer returned from clientToDisconnect.get() is non-null before trying to dereference it (as is done in existing code immediately below this change). Change-Id: I8055654bac980542e63ea7f52bf897eaafbc09bc Signed-off-by: Tom Keel <thomas.keel@intel.com>
* | | | Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-0524-266/+725
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | Android 6.0.0 release 26 Change-Id: I8a57007bf6efcd8b95c3cebf5e0444345bdd4cda
| * | | 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-263-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
| * | | Merge "Camera: API1 shim: select better default FPS range" into mnc-dr-devYin-Chia Yeh2015-09-151-2/+2
| |\ \ \
| | * | | Camera: API1 shim: select better default FPS rangeYin-Chia Yeh2015-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: 23992350 Change-Id: Ie86b24d9e5ea753c6dfc2e5526d371b339be96a1
| * | | | Merge "Camera3Device: Signal buffer returned after it failed" into mnc-dr-devChien-Yu Chen2015-09-121-1/+4
| |\ \ \ \
| | * | | | 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
| * | | | Reduce DUMP permission denial output to one line.dcashman2015-09-111-1/+1
| |/ / / | | | | | | | | | | | | | | | | Bug: 23940813 Change-Id: I0060dbaff5cd0c3d028ac5cd7aba7da3f0371150
| * | | CameraService: Add more systracing, fix module init orderEino-Ville Talvala2015-09-092-14/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve debugging of performance of concurrent calls to the service. - Add ATRACE calls to camera service entry points - Add ATRACE calls for camera HAL module calls - Ensure that camera module init method is called before all others Bug: 23718257 Bug: 23933447 Change-Id: I2a025866ab39eda3962877120cab13a063c7727e
| * | | Merge "CameraService: Link to client binder death at end of connect" into ↵Eino-Ville Talvala2015-09-052-8/+11
| |\ \ \ | | | | | | | | | | | | | | | mnc-dr-dev
| | * | | CameraService: Link to client binder death at end of connectEino-Ville Talvala2015-09-042-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If, within a binder Looper thread, a Binder object death notifier is registered, and then a nested Binder transaction is begun, that transaction may process a death notification callback for the just-registered object, if it was dead at the time of registration. This can lead to an unexpected nested call into the service, and cause deadlock. To avoid this, move the death notifier registration to the end of handling the connect transaction. Also remove one extra bit of disconnect logging. Bug: 23525545 Change-Id: If01cbaf42704f55134118afefc9a8f7bdb014e09
| * | | | Merge "Camera3Device: Clean up next request batch variable" into mnc-dr-devChien-Yu Chen2015-09-052-52/+41
| |\ \ \ \ | | |/ / / | |/| | |
| | * | | 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
| * | | | Merge "Camera3Device: Support batch requests" into mnc-dr-devChien-Yu Chen2015-09-048-199/+387
| |\ \ \ \ | | |/ / /