Commit graph

1063 commits

Author SHA1 Message Date
Shuzhen Wang
0aa6542a42 Merge "Camera: Fix mandatory stream combination links" into udc-dev am: 8afead698e am: 54aff2d536
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/25548794

Change-Id: I26b5881ce4d7d9e723696e327e777907f6a826a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-09 04:06:55 +00:00
Shuzhen Wang
8afead698e Merge "Camera: Fix mandatory stream combination links" into udc-dev 2023-12-09 03:05:02 +00:00
Jag Saund
b8a3f97884 Merge "Camera: Low Light Boost AE Mode" into main 2023-12-08 00:45:00 +00:00
Jag Saund
41498278a3 Camera: Low Light Boost AE Mode
Auto-generated file from changes in metadata_definitions.xml

Bug: 312803148
Test: Build Successful
Change-Id: I7e29a6a9351da9fa03cbaea21286ca7fe1aa910f
2023-12-07 17:20:13 +00:00
Bharatt Kukreja
ac1e3152ca Camera: Add getSessionCharacteristics API
Add API to fetch characteristics for a given session configuration.

Test: Build
Bug: 303645857
Change-Id: I07cb6eb3b0d63454899b2df1497ba120aa762142
2023-12-05 18:21:23 +00:00
Shuzhen Wang
df89cb9c21 Camera: Add new function to query for SessionConfiguration
- The new isStreamCombinationSupported takes into consideration
  the session parameters.
- In order to create CaptureRequest in ICameraDevice, a
  createDefaultRequestSettings function is needed.

Test: Run camera VTS with session_configuration_with_parameters_query flag enabled
Bug: 309627704
Change-Id: Ib344e6991484b834aa8483ed8637ce5cd02ede87
2023-12-05 03:48:51 +00:00
Shuzhen Wang
ee06de115e Camera: Fix mandatory stream combination links
Some recent change in doclava resulted in broken link for {@link...}
with href's that are not class/method.

Use direct href instead.

Test: read docs
Bug: 303582215
Change-Id: I57ee60d73fe70fc2e0cd5cbf7ea73c59af398c72
2023-12-04 15:01:55 -08:00
Jayant Chowdhary
0215d98751 Merge "camera: Add support for toggling HAL buffer manager as a result of session configuration" into main 2023-12-04 20:55:07 +00:00
Emilian Peev
9e21e0f74a Camera: Add physical camera crop metadata tag
Allow CameraHal implementations to report the physical
camera source crop.
Additionally extend the capture results with
intra-frame lens intrinsics samples.

Bug: 297083874
Test: atest VtsAidlHalCameraProvider_TargetTest
Change-Id: Ib2ad0a3b8f51813dc1aaa52f110a2946ab8787ce
2023-12-01 02:46:08 +00:00
Jayant Chowdhary
644676a583 camera: Add support for toggling HAL buffer manager as a result of session configuration
Currently, whether the HAL buffer manager is used or not is decided
based on the presence of a static camera characteristics key -
ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION. This behavior cannot
be toggled depending on stream configuration / session parameters.

The HAL buffer manager does reduce memory consumption at the cost of
extra IPC calls, which may not be always desirable.

Therefore, a new API - 'configureStreamsV2()' is introduced to give the
camera HAL the ability to inform the camera framework whether it must
use the HAL buffer manager for the particular session configured.

Bug: 311263114

Test: VtsAidlHalCameraProvider_TargetTest on cuttlefish
Test: builds

Change-Id: Ibce6d64c3c9cc8e0ebc40522369291d03053cce2
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2023-12-01 00:59:01 +00:00
Avichal Rakesh
56d9580dcf Merge "ExternalCameraHAL: Fix memory leak when copying buffer fence" into main am: 634ecd5da0 am: aba897e523 am: a11d57f607
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2817883

Change-Id: I168257bac3466f67fdb90da573402c0775a20f28
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 23:47:47 +00:00
Rucha Katakwar
ed9d677454 Merge "Camera: Vts test for manual flash control." into main 2023-11-14 20:56:50 +00:00
Shuzhen Wang
8ba70cc275 Camera: Update API docs
run metadata-generate to keep docs updae to date

Bug: N/A
Test: Build and read docs
Change-Id: I278de69618cfbba3a6fcd65defb2e3e28c373b31
2023-11-10 19:12:43 +00:00
Rucha Katakwar
d08a015239 Camera: Vts test for manual flash control.
Test to verify configurations for manual flash strength level
control feature.

Test: Tested on an emulator with flag enabled/disabled.

Bug: 238348881

Change-Id: Iba492fe626c2fb74aa2107cec3969a04ea52eac0
2023-11-08 14:50:35 -08:00
Avichal Rakesh
1fa4142e1a ExternalCameraHAL: Fix memory leak when copying buffer fence
Pointer to native_handle_t created using native_handle_create should
be cleaned up using native_handle_delete even if the fds in the
native_handle is no longer managed by it. ExternalCameraDeviceSession
creates native_handle_t as an intermediate to convert to AIDL
NativeHandle but doesn't call native_handle_delete on the
intermediate object which led to memory leaks.

This CL removes the intermediate object and copies the fence fd
directly.

Bug: 305638723
Test: No functional change. Compilation successful.
Change-Id: Ie3c558ee1ae6d2e84053b65eed7db179118395bb
2023-11-03 16:16:57 -07:00
Treehugger Robot
ecf3a1503a Merge "ExternalCameraHAL: Check for empty native handle instead of null." into main am: 7e4037cf01 am: b6452b7ad8 am: a75bf4a77a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2787022

Change-Id: I8cc9bec724e89264483b8f2754af83e06e38dc0e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-03 02:50:33 +00:00
Treehugger Robot
7e4037cf01 Merge "ExternalCameraHAL: Check for empty native handle instead of null." into main 2023-11-03 01:10:16 +00:00
Avichal Rakesh
e6a88a8119 ExternalCameraHAL: Check for empty native handle instead of null.
AIDL cannot send nullptr when parceling NativeHandles. Instead, it
sends an empty  handle. Logic which previously relied on null
checks should now rely on checking if the native_handle is
empty or not.

This CL updates ExternalCameraUtils to check for empty handles
instead.

Bug: 299170474
Test: CameraAidlTest#processCaptureRequestInvalidBuffer passes
Change-Id: Id4ba928defaa061708a3c1cd68aa510b376f6cb3
2023-11-02 17:27:43 -07:00
Xin Li
11ee4fea87 Merge android14-tests-dev
Bug: 263910020
Merged-In: I770dc5620648df2eab608e030c5e76cf190f315d
Change-Id: If4fe726d538386d70061e8051299d8fb393ef5df
2023-10-10 16:17:14 -07:00
Sergiu Ferentz
31b637fd90 Merge "Bump android.hardware.graphics.common V4->V5" into main 2023-10-09 08:27:26 +00:00
Treehugger Robot
b6863cf979 Merge "Revert "Revert "Convert from HIDL mapper to libui GraphicBufferM..."" into main 2023-10-04 01:56:09 +00:00
sergiuferentz
7d7a24d5f6 Bump android.hardware.graphics.common V4->V5
Test: Build
Bug: 291142745
Change-Id: Ib0002feb982ffcc37fa7b69493c644b7a835cf4f
2023-10-03 16:14:03 +00:00
Tang Lee
cc29bdd2d3 Merge "Return ILLEGAL_ARGUMENT for setting null callback" into main 2023-10-03 03:14:52 +00:00
Devin Moore
523660cd87 Revert "Revert "Convert from HIDL mapper to libui GraphicBufferM..."
Revert submission 24913374-revert-24747509-camera_fail2-OVHUVTAXRP

Reason for revert: 32-bit TV build is fixed with `%zu` instead of `%lu` for size_t argument.

Reverted changes: /q/submissionid:24913374-revert-24747509-camera_fail2-OVHUVTAXRP

Change-Id: I16287ce2dbea034db41450a3a5e9c3f729e76335
2023-10-02 15:55:11 +00:00
Michael Stokes
f9fcfe3794 Merge "Revert "Convert from HIDL mapper to libui GraphicBufferMapper"" into main 2023-10-02 10:21:06 +00:00
Michael Stokes
49ba82ce11 Revert "Convert from HIDL mapper to libui GraphicBufferMapper"
Revert submission 24747509-camera_fail2

Reason for revert: DroidMonitor-triggered revert due to breakage
b/302990858.

This may cause CtsAppOpsTestCases b/300115646 to fail again,
unfortunately (b/300115646).

Bug: 302990858
Reverted changes: /q/submissionid:24747509-camera_fail2

Change-Id: I0191b3ee88846f5b2c6e37ebd6be6d1369d9dba9
2023-10-02 09:56:59 +00:00
Tang Lee
4be4471d46 Return ILLEGAL_ARGUMENT for setting null callback
Bug: 299182872
Test: Run VTS with external USB camera
vts-tradefed
> run vts -m VtsAidlHalCameraProvider_TargetTest -t \
    PerInstance/CameraAidlTest#setCallback/0_android_hardware_camera_provider_ICameraProvider_external_0 \
    --logcat-on-failure --logcat-on-failure-size 8192000 \
    --bugreport-on-failure --screenshot-on-failure

Change-Id: I013e3770ddbdcf6475e0927449af6183dcc37a8e
2023-10-02 07:18:16 +00:00
Devin Moore
b22961072f Merge "Convert from HIDL mapper to libui GraphicBufferMapper" into main 2023-09-29 14:57:02 +00:00
Rucha Katakwar
5d0f9d16e3 Camera: Flash strength control during camera use.
Auto-generated file from changes in metadata_definitions.xml

Bug: 238348881
Test: Build Successful
Change-Id: Ic6aec9b2135b0b2a2d24d8204900b8bad52d6725
2023-09-20 11:43:03 -07:00
Devin Moore
5e154097aa Convert from HIDL mapper to libui GraphicBufferMapper
HIDL mapper HAL is deprecated and instead of adding more support for the
new replacement explicitly, we can move the GraphicBufferMapper which
handles all of the backwards compatbility with the HIDL HALs for us.

Test: atest CtsCameraTestCases CtsAppOpsTestCases
Bug: 285605852
Bug: 300115646

Change-Id: Ib97e429a0f3dd1c66ec008fbf3860c9c5667bddd
2023-09-19 21:56:38 +00:00
Treehugger Robot
0d4bf3b76c Merge "Camera VTS: Verify high speed video configurations" into main am: 607f7e7ff7 am: 68d44aa5e2 am: 8125e862c3 am: fc56ae19a8 am: 460f902f7d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2585399

Change-Id: I5dfbe1db392c9a64a8653b220c6a8fc3dcaf3982
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-18 11:43:24 +00:00
Treehugger Robot
8125e862c3 Merge "Camera VTS: Verify high speed video configurations" into main am: 607f7e7ff7 am: 68d44aa5e2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2585399

Change-Id: Ia6aa1f2395bbcf7778ea5c6820cf778168df1296
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-18 09:03:03 +00:00
Treehugger Robot
68d44aa5e2 Merge "Camera VTS: Verify high speed video configurations" into main am: 607f7e7ff7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2585399

Change-Id: Ib20ae0eb0bc7466acb39e7eb0409fde8641f6070
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-18 08:04:22 +00:00
Kwangkyu Park
4b7fd45612 Camera VTS: Verify high speed video configurations
Verify high speed video configurations based on the tag definition.

Bug: 274392420
Test: Ran on cuttlefish
Change-Id: Ie64415cc8694d8f4da59a01f6051bc847ae30fa7
2023-09-15 14:10:09 +09:00
Emilian Peev
190fff1c6a Camera VTS: Wait for camera provider to become active am: bd4cdc6a9a am: 9610556686 am: a4a1654db2
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/24665985

Change-Id: I99ac896c3192ef4a62e25bccbab92159c8e3bb78
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-05 22:45:22 +00:00
Emilian Peev
16ce2fc577 Camera VTS: Wait for camera provider to become active am: bd4cdc6a9a am: 9610556686
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/24665985

Change-Id: Iefca832a6c244f0df88cf9e3898da282612a95d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-05 21:50:25 +00:00
Emilian Peev
bd4cdc6a9a Camera VTS: Wait for camera provider to become active
Use "AServiceManager_waitForService" instead of
"AServiceManager_getService" to wait for any camera
providers that might be using the lazy mechanism and
are not running all the time.

Bug: 297965980
Test: atest VtsAidlHalCameraProvider_TargetTest

Change-Id: I6374dc768cd1068885668f927f902dcee44a7a42
2023-09-05 18:18:49 +00:00
Xin Li
879960bdce Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: I7b6fffac2ada0e039f79bad8cc9b4d954e9c3460
Change-Id: I9466127d8d0fa38df36ca99f704853b2db871e67
2023-08-25 13:29:30 -07:00
Treehugger Robot
b58bdcc974 Merge "Use String8/16 c_str [camera]" into udc-dev-plus-aosp am: f9da01134b am: b2e932d474 am: a2c25cfbec
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/24528988

Change-Id: I6e83c13f0f0b6b89931bdcac81e79326d3841aa8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 18:05:29 +00:00
Tomasz Wasilczyk
353d4c5c75 Use String8/16 c_str [camera]
Bug: 295394788
Test: make checkbuild
Change-Id: I7ca371112e891f4f40673b5c34e3b8ccc41841bf
Merged-In: I7ca371112e891f4f40673b5c34e3b8ccc41841bf
2023-08-24 17:07:46 +00:00
Tomasz Wasilczyk
dbec48bbd2 Use String8/16 c_str [camera]
Bug: 295394788
Test: make checkbuild
Change-Id: I7ca371112e891f4f40673b5c34e3b8ccc41841bf
2023-08-23 19:47:07 +00:00
Tang Lee
65382f6a50 Fix external camera HAL crashes
External USB camera hal service crashes when disconnecting the camera.
ExternalCameraDeviceSession's desctructor is called and deletes mLock,
but mBufferRequestThread is still running and waiting on the same
mLock, which causes the "pthread_mutex_lock called on a destroyed
mutex" error.

Fix the issue by stopping the thread in destructor. Also refactors the
functions and remove unused conditions.

Bug: 289741662
Test: Test with USB camera
Change-Id: I06b1ff6e192a4bca16822785d65d68a6aae53414
2023-08-01 10:32:46 +00:00
Sally Qi
3def856602 Use android.hardware.graphics.common wrap.
Bug: 291745893
Test: builds
Change-Id: I4de7ecf4593957d4ef76ff3d66b1b7daa0d3f11a
2023-07-20 16:56:07 +08:00
Austin Borger
0a01e96a73 Camera VTS: Properly initialize Stream in various places am: 263e362091 am: 45063e6c9f am: 32b90a4a29
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/23850975

Change-Id: I6f7f697d044d47b3c5c8e15457a6f06202bc4bf3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29 21:29:01 +00:00
Austin Borger
0475dfe328 Camera VTS: Properly initialize Stream in various places am: 263e362091 am: 45063e6c9f
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/23850975

Change-Id: I4450a41690668dcf2377cca07c48e258ec046b28
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29 20:41:12 +00:00
Austin Borger
263e362091 Camera VTS: Properly initialize Stream in various places
useCase and colorSpace are not explicitly initialized. colorSpace must
be explicitly initialized to UNSPECIFIED, as its default value is not
zero. Without initialization, the HAL will receive incorrect Stream
data.

Bug: 287305593
Test: Ran full VTS test on Cuttlefish / OEM testing.
Change-Id: I6a29600b5dc06ebdc61b38e0585204fe52d590c2
2023-06-29 00:49:17 +00:00
Bharatt Kukreja
043fdd018b Merge "Camera: Add links to mandatory stream combination tables" into udc-dev am: b082ae031f am: 9d81679aa5
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/23680404

Change-Id: Ia7fc47c6d205e171f64c75474a914ffa74d2526a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-19 20:53:13 +00:00
Bharatt Kukreja
864d021f33 Merge "Camera: Add links to mandatory stream combination tables" into udc-dev am: b082ae031f
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/23680404

Change-Id: Ie8b6336f9f0e03e013ce2b23a42d0a9d071b4319
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-19 20:10:18 +00:00
Bharatt Kukreja
3e4fbc9a22 Camera: Add links to mandatory stream combination tables
Bug: 271143048
Test: Documentation change

Change-Id: I570994c084e730750aa5205b7f97c7546d75b58d
2023-06-14 21:49:32 +00:00
Avichal Rakesh
4a675fbfd1 camera: Fix prefix length path for External Camera HAL am: b8863f6a03 am: e1390f059f am: f617111ca5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2386907

Change-Id: I0d1a4f3fcb4747dfac1d3f98e967d0b2bd8e6646
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-09 02:46:14 +00:00