Commit graph

1083 commits

Author SHA1 Message Date
Jayant Chowdhary
8fca9cd84d Merge "camera vts: Remove redundant capabilities fetch" into main 2024-01-17 18:48:17 +00:00
Jayant Chowdhary
571cbf1b4c camera vts: Remove redundant capabilities fetch
Bug: 299202800

Test: build

Change-Id: Ia6ca1ee0fb65e357398ba62c6a787c6530b989e4
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2024-01-16 18:40:05 +00:00
Shuzhen Wang
84bc4a190d Merge "Camera: Allow non-session parameters in SessionConfiguration" into main 2024-01-16 16:38:31 +00:00
Avichal Rakesh
aca04275d9 Merge changes from topic "309543399-ext-hal" into main
* changes:
  ExternalCameraHAL: Add ANDROID_SENSOR_READOUT_TIMESTAMP key.
  camera: Make readoutTimestamp visible to HALs
2024-01-13 00:33:57 +00:00
Jayant Chowdhary
1748677f02 Merge "Check for stream use case capability before stream use case test" into main 2024-01-12 21:47:30 +00:00
Jayant Chowdhary
da59822642 Check for stream use case capability before stream use case test
Bug: 299202800

Test: Vendor testing

Change-Id: If30ead47072dc1f950b8fb6384072cc38cd51c58
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2024-01-11 21:02:08 +00:00
Avichal Rakesh
1fb9ba494c ExternalCameraHAL: Add ANDROID_SENSOR_READOUT_TIMESTAMP key.
As ExternalCameraHAL does not support sensor readout timestamp,
it should set ANDROID_SENSOR_READOUT_TIMESTAMP to
ANDROID_SENSOR_READOUT_TIMESTAMP_NOT_SUPPORTED in CameraDevice
characteristics.

This CL adds the CameraMetadata entry to ExternalCameraDevice.

Bug: 309543399
Test: ReadoutTimestampTest#testReadoutTimestamp passes for
      ExternalCameraHAL
Change-Id: I12203f0832416b4ca325380e671675ddc1d788d4
2024-01-10 12:47:07 -08:00
Avichal Rakesh
468341e677 camera: Make readoutTimestamp visible to HALs
`readoutTimestamp` metadata key was previously only visible to
SDK and the framework, and the camera framework force set the values
based on if the HAL implemented the AIDL or the HIDL interface.

This CL makes readoutTimestamp available to HALs and lets AIDL
HALs choose if they can support sensor readout timestamp or not.

Bug: 309543399
Test: External Camera HAL now sets this value and passes VTS
Change-Id: Ifee2b4020b7630383dc32ef7590f8a9ccdaf49d2
2024-01-10 12:46:57 -08:00
Jayant Chowdhary
2d51f59db5 Merge "camera: Add boolean to HalStream for stream specific HAL buffer manager" into main 2024-01-06 07:15:44 +00:00
Shuzhen Wang
918ecd17aa Camera: Allow non-session parameters in SessionConfiguration
Also remove a workaround in VTS test

Test: Build
Bug: 309627704
Change-Id: I0ed266e837f5d0bec6197ff9f725a897048038ae
2024-01-05 23:22:56 +00:00
Jayant Chowdhary
4869ae7838 camera: Add boolean to HalStream for stream specific HAL buffer manager
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, HalStream.aidl - the parcelable returned by the camera HAL
for each stream configured now holds a boolean value, specifying
whether output buffers must be managed by the HAL or the camera
framework for the particular session configured.

Bug: 311263114

Test: builds

Test: Run Camera CTS on HAL supporting
      ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION_SESSION_CONFIGURABLE

Test: VTS

Change-Id: Id6bda31eab3d66361991e2f883231a5a55a2ef82
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2024-01-04 18:32:19 +00:00
Treehugger Robot
15cafadf28 Merge "Camera: Add missing characteristics for using buffermanager in ExternalCamera" into main am: 4103ef0c5a am: 5151c1f477 am: 36af76605f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2884368

Change-Id: I3523501e297d5b4c61ae6760b3f25782c8654bec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-03 20:29:11 +00:00
Treehugger Robot
36af76605f Merge "Camera: Add missing characteristics for using buffermanager in ExternalCamera" into main am: 4103ef0c5a am: 5151c1f477
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2884368

Change-Id: I78b8342906cea80ed61c59d69ae2e2dc2f395a0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-03 19:48:41 +00:00
Shuzhen Wang
a6bac13c93 Merge "Revert "Revert "Camera: VTS: Require ConstructDefaultSettings fo..."" into main 2023-12-21 21:59:55 +00:00
Shuzhen Wang
dba6eaa0ba Revert "Revert "Camera: VTS: Require ConstructDefaultSettings fo..."
Revert submission 25718441-revert-25658204-EnableFeatureCombination-KTSPSCPBVP

Reason for revert: Re-land HAL implementation of feature combination query

Reverted changes: /q/submissionid:25718441-revert-25658204-EnableFeatureCombination-KTSPSCPBVP

Bug: 309627704
Change-Id: Iaec3f2ea4d028216a381f6c2ef5f2f019adabc46
2023-12-21 21:57:43 +00:00
Bharatt Kukreja
48c35ba72a Add VTS test for getSessionCharacteristics
Test: atest VtsAidlHalCameraProvider_TargetTest
Bug: 314386872
Change-Id: I3f838fd041e6aca4b12fad512f57287a94149c6e
2023-12-21 18:59:48 +00:00
Shuzhen Wang
7a237d1545 Revert "Camera: VTS: Require ConstructDefaultSettings for new HAL"
Revert submission 25658204-EnableFeatureCombination

Reason for revert: b/317270728

Reverted changes: /q/submissionid:25658204-EnableFeatureCombination

Change-Id: Id048e9bd5ba08f7856ccf88fd7bfdca06ce0727c
2023-12-20 22:22:12 +00:00
Sangheum
aa9d8dce11 Camera: Add missing characteristics for using buffermanager in ExternalCamera
Buffer manager is used in the external camera, but the key is not included in the aidl.
Add a buffermanger key according to the key definition.

Test: Test with USB Camera
Change-Id: I8c8c35d933fecb14dcf39996c709b643db3ee3e3
2023-12-20 17:37:47 +09:00
Shuzhen Wang
d7f0d0ab4a Camera: VTS: Require ConstructDefaultSettings for new HAL
Test: Run VTS test on Cuttlefish and Pixel
Bug: 309627704
Change-Id: Ic65ffef691c6b2e9fefbdcbd27598b3666062a9a
2023-12-20 00:27:12 +00:00
Shuzhen Wang
c441fd509d Merge "Camera: Fix mandatory stream combination links" into udc-dev am: 8afead698e am: 7de4f696b0 am: 6282a9846b
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/25548794

Change-Id: I0a4486fa4688b7f14163ad444f2621f997729231
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-09 04:42:46 +00:00
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