summaryrefslogtreecommitdiff
path: root/camera
Commit message (Collapse)AuthorAgeFilesLines
* marlin/sailfish: QCamera2: don't build mm-camera-testmydongistiny2019-08-181-1/+0
| | | | | | | It builds mm-qcamera-app which we don't want and we don't need it anyways Change-Id: I4088d642ca9de7eee41d1b92add0ff5d5949a5ec Signed-off-by: mydongistiny <jaysonedson@gmail.com>
* QCamera3: Don't enable EIS in default templatesEmilian Peev2018-05-251-21/+0
| | | | | | | | | | | | | When enabled video stabilization will affect the way streams are mapped in the ISP and some of the supported stream configurations will start failing. Unless explicitly requested by client EIS should be disabled by default. Bug: 80227606 Test: Manual using application, Camera CTS Change-Id: If14281bda6b543949988c243dedfcb12f0e8e1af
* Make QCamera2 modules build with VNDKJiyong Park2018-01-269-2/+10
| | | | | | | | | | | | | - unistd.h added for close, write, etc. - libsystem_headers, libhardware_headers added because global include path isn't provided when building with vndk - test modules are marked as LOCAL_PROPRIETARY_MODULE := true since they are using other proprietary modules Bug: 69526027 Test: mma -j under QCamera2 Change-Id: Id3b59c12a89120cc7e378e873bb663926d3bd45e
* Remove dependency from QCamera2 to libguiJiyong Park2018-01-263-2/+7
| | | | | | | | | | | This is basically a cherry-pick of QCOM's change 73e915617b67d794a7c4b8b9c180229a2226ab3a from hardware/qcom/camera/msm8998/QCamera2 Bug: 69526027 Test: mma with BOARD_VNDK_VERSION=current Test: camera (still image, recording) works Change-Id: I8e41ce2c4822bc4c84482bb27a7a8fecf8e79d12
* Make mm-image-codec build with the VNDK.Steven Moreland2018-01-251-1/+1
| | | | | | | | | | | | When the vndk is enabled (BOARD_VNDK_VERSION=current), vendor libraries must only link against vendor variants in the build system. This also means that they receive restricted sets of headers and that automatic global headers are restricted. Test: build mm-image-codec with BOARD_VNDK_VERSION=current Bug: 69526027 Change-Id: I4ef73cd39c1731c85fb2653eb4d5c74037407f88
* Merge "QCamera3HWI: Support public AF scene change key"TreeHugger Robot2018-01-231-1/+2
|\
| * QCamera3HWI: Support public AF scene change keyChien-Yu Chen2018-01-221-1/+2
| | | | | | | | | | | | | | | | Populate the public AF scene change key as well as the vendor key. Test: CTS Bug: 64847201 Change-Id: I912f48566d4e1020188b0f2321277ccb743506ae
* | Merge "QCamera3: Add session parameter support, set device version to 3.5"TreeHugger Robot2018-01-221-260/+262
|\ \
| * | QCamera3: Add session parameter support, set device version to 3.5Emilian Peev2017-12-281-260/+262
| |/ | | | | | | | | | | | | | | | | | | Advertise all session based parameters accordingly. Check the incoming session settings during stream configuration and initialize the respective streams. Bug: 70560715 Test: Manual, Camera CTS Change-Id: I2d7b1f5dc381609273a62d7c7fda9e4f40a3e9fd
* / Camera: Add shading mode to templates, fix hot pixel modeEino-Ville Talvala2018-01-191-9/+22
|/ | | | | | | | | | | | | | | | | Shading mode is required by spec to be present, but wasn't covered in CTS. Default to FAST for everything but STILL_CAPTURE. Hot pixel mode was also not covered, and needs to be HIGH_QUALITY if that is supported, for STILL_CAPTURE. Also clean up a little bit of oddness in static metadata with regards to hot pixel mode. Test: Shading mode and hot pixel mode appear in 'dumpsys media.camera -t' output, new CTS tests pass Bug: 70162745 Change-Id: I9087f0f37125eb2074788e983f7e68086b76f0b2
* QCamera3: Set the gralloc usage of dummy batch stream correctlyEmilian Peev2017-12-182-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | A dummy batch video stream is used internally in case clients are working in constrained operating mode without an actual video stream. The dummy stream is using exactly the same stream parameters as the preview which includes the gralloc usage and this will eventually override the dummy stream type from video to preview. Trying to link two preview streams with batching enabled in camera backend will result in failures. Additionally fix a possible double free of the batched buffer definitions inside the dummy batched stream. The stream will never start and as a result stop will not be called as well. However batched buffer definition will get allocated and en-queued inside the free batched queue. If we avoid stopping, we also skip flushing any of the free buffers inside the queue. They will remain in the queue until the stream object gets destroyed. The queue flush implementation will try to release the queue node data which at this point is already freed by the camera interface layer. Bug: 70631003 Test: Camera CTS Change-Id: I9e0c222397a42e51a1343ab17a7285dbc9e1b76d
* QCamera2: HAL3: Link EIS module if video stabilization tag is setEmilian Peev2017-10-241-18/+20
| | | | | | | | This reverts commit 277412e7bd9e2ad75e931f1768a3ccacc6fcc809. Bug: 67821724 Test: Camera CTS Change-Id: I0da586a671c74247c1974cf8b6da1d8d44cd291e
* Merge "Revert "QCamera2: HAL3: Link EIS module if video stabilization tag is ↵Eino-Ville Talvala2017-10-231-20/+18
|\ | | | | | | | | | | | | | | set"" into oc-mr1-dev am: 6a37587a71 Change-Id: Id228e12c1032fe4a274b4dee5af607a1843296bb
| * Revert "QCamera2: HAL3: Link EIS module if video stabilization tag is set"Emilian Peev2017-10-231-20/+18
| | | | | | | | | | | | | | | | This reverts commit 29d643327b94a5f6884b312246927f7afe835724. Bug: 67821724 Test: Camera CTS Change-Id: Iabec9e0afdf31a1988d8c34810219d14e74bda3e
* | Merge "QCamera2: HAL3: Extend available request/result/charact. keys" into ↵Eino-Ville Talvala2017-10-042-11/+24
|\| | | | | | | | | | | | | | | oc-mr1-dev am: 6bb70203f7 Change-Id: Idff91afeff0cfde0809f835876c6b613114374a2
| * Merge "QCamera2: HAL3: Extend available request/result/charact. keys" into ↵Eino-Ville Talvala2017-10-042-11/+24
| |\ | | | | | | | | | oc-mr1-dev
| | * QCamera2: HAL3: Extend available request/result/charact. keysEmilian Peev2017-09-192-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All vendor supported tags should be advertised in the respective available lists. Remove initial capability optimization. The vendor tag ops are not initialized at this point which will lead to errors when trying to append vendor tags. Bug: 63817523 Test: Camera CTS Change-Id: I417963660815b8cfe5678e8e017981f462037f0d
* | | QCamera2: HAL3: Link EIS module if video stabilization tag is setShuzhen Wang2017-09-301-18/+20
|\| | | | | | | | | | | | | | | | | am: 29d643327b Change-Id: If916ebf52a1bc17d9b32562999c30d896f9ca002
| * | QCamera2: HAL3: Link EIS module if video stabilization tag is setShuzhen Wang2017-09-281-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend current EIS logic such that even if there is no video stream configured, link EIS module if the VIDEO_STABILIZATION control is on. This fixes the API1 shim video recording issue where there is a sudden FOV change at the start of recording when video stream is created. Test: Use TestingCamera Bug: 67001070 Change-Id: If0348569866729310f2d01665d8892bfb32ebfd3
* | | QCamera2: HAL3: Avoid race condition during HFR video stopEmilian Peev2017-09-221-1/+1
|\| | | | | | | | | | | | | | | | | am: 6f2972c45f Change-Id: Ic59cc208bda8a2a22c3e160a3694e6ea6b86f574
| * | QCamera2: HAL3: Avoid race condition during HFR video stopEmilian Peev2017-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The video stream stop sequence can encounter a race conidtion in case pending buffers arrive during the same time frame. Any incoming stream callbacks that manage to execute during the window between 'mDataQ' flush and 'flushFreeBatchBufQ' will modify the 'mBufsStaged' counter without the knowledge of the top 'QCamera3HardwareInterface' instance. This makes subsequent calls 'aggregateBufToBatch' prone to batch overflow errors. To resolve this, call 'flushFreeBatchBufQ' before flushing 'mDataQ'. This way calls to 'aggregateBufToBatch' from failing stream callbacks should not be successfull in modifiying 'mBufsStaged'. Bug: 65549208 Test: Camera CTS Change-Id: Idd2ec4992d6a979d4308dbd2175897107bdffbe0
* | | QCamera2: HAL3: Trigger ERROR_RESULT if partial result is droppedShuzhen Wang2017-09-212-18/+19
|\| | | | | | | | | | | | | | | | | am: a5a4b4d961 Change-Id: I152a1c0904c703b659732d6387ab052b5745dcce
| * | QCamera2: HAL3: Trigger ERROR_RESULT if partial result is droppedShuzhen Wang2017-09-202-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If partial result of a particular frame number is dropped, HAL needs to trigger notify(RESULT_ERROR) per API contract. This means that for each dropped HAL metadata, there will be 2 RESULT_ERROR. Test: Camera CTS Bug: 65245828 Change-Id: Ieab9449af4f1c49e546f1431edfb7809df9db4cf
* | | Merge "Camera: fix LSB 2 bits fetching bug" into oc-mr1-devYin-Chia Yeh2017-09-201-1/+9
|\| | | | | | | | | | | | | | | | | am: 8c77ac200d Change-Id: I04cbe5f29ca3710358110cc6e27313ad41277852
| * | Camera: fix LSB 2 bits fetching bugYin-Chia Yeh2017-09-181-1/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | Test: compare with RAW10 output Bug: 65552901 Change-Id: I5104571fd18ec6df2ecebb0433db4aaaec6e4be8 QCamera2: HAL3: Fix wrong conversion for first 2 pixels Test: Camera CTS Bug: 65552901 Change-Id: I3ee00beb9ebef811e74e95134ead886e3da6d476
| * QCamera2/HAL3: correct mutex lock/unlock sequence am: 78ad69467eShuzhen Wang2017-08-231-0/+5
| |\ | | | | | | | | | | | | | | | am: 2634d2f9fc Change-Id: Idd55d20e2503c562138cd94d066eee2e017b4e44
* | \ Merge "Fix clang static analyzer warnings." am: 83de65b605 am: 8e1fcf2a79Manoj Gupta2017-08-301-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | am: 0e05e0e2e1 Change-Id: Ie59c8939613eb1e9f988f7a4c9f3b8e9052ee092
| * \ \ Merge "Fix clang static analyzer warnings."Manoj Gupta2017-08-301-0/+1
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | am: 83de65b605 Change-Id: I2cdd5c6a8ee180c901095af4214b963a67c7f0ce
| | * | Fix clang static analyzer warnings.Manoj Gupta2017-08-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following warning: device/google/marlin/camera/QCamera2/HAL3/QCamera3PostProc.cpp:2365:9: warning: Potential leak of memory pointed to by 'exif' [clang-analyzer-cplusplus.NewDeleteLeaks] Bug: b/27101951 Test:Warning is gone. Change-Id: Ifc7f5f538ed303ccb1e309d8664b23c49e916b0d
* | | | QCamera2/HAL3: correct mutex lock/unlock sequence am: 78ad69467e am: 2634d2f9fcShuzhen Wang2017-08-231-0/+5
|\| | | | |_|/ |/| | | | | | | | | | | am: 0be03dfda5 Change-Id: I302e047883a55b5deb2b1ada1be42a29a94889c3
| * | QCamera2/HAL3: correct mutex lock/unlock sequenceShuzhen Wang2017-08-231-0/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | am: 78ad69467e Change-Id: I826c3de488bdde0949f80836266746f670dbe8cc
| | * | QCamera2/HAL3: correct mutex lock/unlock sequenceShuzhen Wang2017-08-221-0/+5
| | |/ | | | | | | | | | | | | | | | | | | Bug: 36716469 CRs-Fixed: 2053027 Change-Id: I6699c3682eec419fb6efb0583e9909e5739476a0 (cherry picked from commit aa3b55c1b278c52d8e93853c9f89e8a475d59026)
* | | Merge "camera: Fix powerHAL usage" into oc-mr1-devWei Wang2017-08-155-26/+31
|\ \ \
| * | | camera: Fix powerHAL usageWei Wang2017-08-095-26/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer have legacy powerhal module but IPower instance. Bug: 63039461 Test: Got powerhint from powerhal service Change-Id: I5bc76646662efd3bcffc1ce3e374cbec68b90287
* | | | QCamera2: HAL3: Use property_get_int32 for mobicat propertyShuzhen Wang2017-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | property_get_bool only returns true/false. If the property is set to 2, property_get_bool returns 0. Test: Manually test GoogleCamera with 3A debug turned on Bug: 64614329 Change-Id: Ic5597cd9683f4d0fc5383bf4963e186822d7e0eb
* | | | QCamera2: HAL3: Avoid per-frame property_getShuzhen Wang2017-08-142-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | Test: Manually run camera Bug: 64614329 Change-Id: I82188719e26d596601fbfb200b8bfa3bb99adb66
* | | | QCamera2: HAL3: Avoid blindly invalidating buffersShuzhen Wang2017-08-111-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ImageReader buffers are invalidated when calling lock when buffer is consumed, and it's not necessary to unconditionally invalidating them when they return to HAL. For HAL internal buffers, if they are consumed by reprocessing, they are invalidated with postproc. Test: Camera CTS Bug: 64605640 Change-Id: I80e4a992e29a314dae444db958f8307c8a54fdb6
* | | | QCamera2: HAL3: Remove unnecessary cache ops for raw streamShuzhen Wang2017-08-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cache clean (write-back) is only necessary if actual CPU-write is performed to generate RAW16 format. Test: Camera CTS Bug: 64605640 Change-Id: I6b98851fc4abdfe8f53195e4928b3e528bbfd020
* | | | QCamera2: Add cache flags to frame bufferSusmitha Gummalla2017-08-1118-21/+429
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store the flags recevied from v4l2 buffers and pass them to reprocess channel through param. CRs-Fixed: 1035387 Change-Id: Ic52824c036ba5f849f1feedbe0424238575ee502 mm-jpeg-interface: Jpeg cache ops cmd interface to HAL Add Jpeg cache ops command interface to HAL. CRs-Fixed: 1035387 Change-Id: Iebf5920675583db32da01e64142093a7400a52d9 QCamera2: Cache Op changes for stream buffers Do not invalidate/clean invalidate by default on the stream buffers. Assume buffers coming from kernel are clean and do required cache invalidate, clean if HAL touches the buffers in CPU. Test: Camera CTS Bug: 64605640 CRs-Fixed: 1035387 Change-Id: Ic39a73f1a759ed726002aa413df202387c1ee370
* | | Merge changes I6bda97cb,I968ca06d into oc-mr1-devTreeHugger Robot2017-08-024-68/+90
|\ \ \ | | | | | | | | | | | | | | | | | | | | * changes: QCamera2: HAL3: Initialize variables in PendingRequestInfo QCamera2: HAL3: Support AF_STATE in both partial result and final result
| * | | QCamera2: HAL3: Initialize variables in PendingRequestInfoShuzhen Wang2017-07-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure the AF_STATE variables have sane values. Test: Camera CTS Bug: 63766738 Change-Id: I6bda97cbac0c865b140c9a59035742aada0a2345
| * | | QCamera2: HAL3: Support AF_STATE in both partial result and final resultShuzhen Wang2017-07-264-68/+90
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently AF_STATE during AF_TRIGGER is sent 3 frames early (apply_delay 2, and report_delay 1). Without AF_TRIGGER, the AF_STATE is reported at the right time: after AF stats for the current readout frame are analyzed. In the case where AF_TRIGGER results in a state transition, send the new state in partial result, and use last know AF state for all preceding results. This shift applies to both TRIGGER_START and TRIGGER_CANCEL. Also move af_mode back to partial result. Test: Camera CTS, and AF_STATE during HDR+ burst. Bug: 63766738 Change-Id: I968ca06d6909996a0b77d3b247ed0722ab92bb6a
* / / QCamera2: HAL3: Synchronize access to offline buffersEmilian Peev2017-08-012-0/+4
|/ / | | | | | | | | | | | | | | | | | | "mOfflineMetaBuffers" and "mOfflineBuffers" can be modified by two threads at the same leading to crashes. To avoid this serialize the access by using an additional mutex. Bug: 64194071 Test: Camera CTS Change-Id: I358a1412e944084d4a54f3cdd9aa4a7eb08e8a95
* | QCamera3: Avoid possible deadlock when reporting failed buffersEmilian Peev2017-06-301-40/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | "QCamera3YUVChannel::streamCbRoutine" will acquire "mOfflinePpLock" before calling the channel error callback. The current callback implementation will also try to acquire "mMutex". This could trigger a deadlock in case a request for the YUV channel is also currently executing. The request will acquire "mMutex" first and then try to lock "mOfflinePpLock". Bug: 63002361 Test: Complete Camera/Camera2 CTS. Change-Id: I2877aebf94c5a15b6742548bcbd1d1c4adc5e9d2
* | QCamera2: HAL3: Unmap reprocess input buffers earlyShuzhen Wang2017-06-232-1/+3
|\| | | | | | | | | | | am: 9d4d50f881 Change-Id: Ia235a598326de8b7ea8511b29f4b2ce028adfdff
| * QCamera2: HAL3: Unmap reprocess input buffers earlyShuzhen Wang2017-06-222-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently reprocess input buffers are unmapped upon JPEG encode completion. This is problematic because after HAL returns input buffer after CPP processing, it doesn't own the buffer any more. The sequence of events leading to the issue: 1) Reprocess request 1 enters, input buffer FD is N 2) HAL caches the input buffer 3) CPP runs on input buffer, returns buffer to framework. Cache entry remains. JPEG encoding starts 4) Framework frees buffer; FD N is now reusable 5) Reprocess request 2 enters, new buffer also gets FD N 6) HAL finds buffer in cache 7) CPP tries to run, but uses stale cache entry, crashes 8) (if no crash) JPEG encoding completes, cache cleaned up Bug: 62721870 Test: Camera CTS Change-Id: I22a06fad9ead03af917e547a9ee4d49d8db2e2d0
* | Merge "Replace libcamera_client to ↵TreeHugger Robot2017-06-204-4/+10
|\ \ | |/ |/| | | android.hardware.camera.common@1.0-helper" into oc-dr1-dev
| * Replace libcamera_client to android.hardware.camera.common@1.0-helperJiyong Park2017-06-124-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | libcamera_client is not a VNDK library and thus not available to vendors. These vendor libs were using the library due to CameraMetadata and CameraParamters classes. The classes are now available via .common@1.0-helper library which is available to vendors. Thus switching to the lib. Bug: 62523241 Test: 2016 pixel devices builds and boots. Camera functionalities work. Change-Id: Idc25ce56ee5175aea4243fbce770f240ff0b62ca
* | QCamera2: HAL3: handle out of order buffers correctlyGaoxiang Chen2017-06-161-1/+20
|/ | | | | | | | | Sometimes, the stream buffers come in disorder, treat the disordered frames as error frames. Test: Camera CTS Bug: 37657585 Change-Id: I910153e9216ed7a83648663176c58d3696b27107
* Revert "QCamera3: Try to recover from failure during buffer cancellation"Emilian Peev2017-06-081-35/+1
| | | | | | | | This reverts commit 900ac10969a9aff966f7c9cf06178b4ed2b84320. Bug: 62188950 Test: Complete Camera/Camera2 CTS Change-Id: Ia207dc26b6450185d49f828fcdabc4ea49e01471