Commit graph

919 commits

Author SHA1 Message Date
Shuzhen Wang
b5c503783e Camera: VTS: Fix fence fd double close am: 3ad137edbb am: 053503888b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2539830

Change-Id: Ic92221f48ef4df9bffb3441a53bb5181ab174eb3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-18 01:52:00 +00:00
Shuzhen Wang
3ad137edbb Camera: VTS: Fix fence fd double close
Fence fd is closed when processCaptureResult returns. In order to
wait for the release fence *after* processCaptureResult returns,
the fence fd needs to be duped.

Test: Vendor testing
Bug: 241281568
Change-Id: Ib74f9bb141802713b476a2ef48a2252125a7915d
2023-04-17 05:02:05 +00:00
Treehugger Robot
9d21620c42 Merge "Camera: VTS: Wait for release fence before consuming buffers" into android13-tests-dev am: 1c8377c24c am: c3b6c6c691
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2520900

Change-Id: Id293d3565aa4faecb4b7975c1a93520ff2b21eba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-05 18:20:24 +00:00
Treehugger Robot
1c8377c24c Merge "Camera: VTS: Wait for release fence before consuming buffers" into android13-tests-dev 2023-04-05 17:10:33 +00:00
Shuzhen Wang
d7e13ac229 Camera: Fix VTS failure for depth only camera am: 72f97643fb am: e5489ab299
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2523160

Change-Id: Ie7635f706dd8b9d13997700532f286ec56d32958
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-05 02:52:08 +00:00
Shuzhen Wang
72f97643fb Camera: Fix VTS failure for depth only camera
If the device is depth-only, use threshold with Y16 format rather than
IMPLEMENTATION_DEFINED.

This fixes the regression introduced by the fix for b/265984260.

Bug: 276957901
Test: atest VtsAidlHalCameraProvider_TargetTest
Change-Id: If9023f1ed17bb761abbb9be36e567264f8bf0689
2023-04-04 20:57:27 +00:00
Shuzhen Wang
0f56c56709 Camera: VTS: Wait for release fence before consuming buffers
The camera HAL may signal release fence after processCaptureResult.
If the VTS test waits for the release fence in the context of the
capture result, there is possibility of deadlock.

Rather, we should wait for the releaseFence in a different thread
context to really emulate the real application behavior.

Test: atest VtsAidlHalCameraProvider_TargetTest
Bug: 241281568
Change-Id: Id1d92e901aae1cab084846d252ef090fcda182d7
2023-04-04 16:45:28 +00:00
Shuzhen Wang
8423196e10 Merge "Camera VTS: Override RotateAndCrop metadata" into android13-tests-dev am: 74a4696d56 am: f5dbd4869e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2450127

Change-Id: I994c585029b0847ba42892ec69efe5a9d9e910ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 21:35:51 +00:00
Michelle Ho
388d4ffb3b Camera VTS: Override RotateAndCrop metadata
Per camera metadata definition, ROTATE_AND_CROP_AUTO will never be sent
to the HAL, as camera service takes reponsibility of translating AUTO to
specific rotation value. So for VTS tests, we should always override
the metadata in CaptureRequest.

Bug: 270052579
Test: Run VtsAidlHalCameraProvider_TargetTest
Change-Id: I96f4992e145da25c463b0b406aa2a371af30f41f
2023-02-22 10:19:13 +00:00
Treehugger Robot
5630ea6fa8 Merge "Camera VTS: Remove unnecessary test of Y16 depth format" into android13-tests-dev am: ca60e0b71f am: 6f48e8b475
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2402628

Change-Id: Ia767966a92ef88ee59fcd1813ee15df89f90de63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-09 02:13:07 +00:00
Treehugger Robot
ca60e0b71f Merge "Camera VTS: Remove unnecessary test of Y16 depth format" into android13-tests-dev 2023-02-09 00:44:15 +00:00
Shuzhen Wang
cd3c483ab0 Camera VTS: Remove unnecessary test of Y16 depth format
getAvailableOutputStreams() shouldn't unconditionally add Y16 stream
configurations. Instead, if the threshold being passed in is valid,
getAvailableOutputStreams() should use the threshold's format
instead.

Test: Run VTS on pixel; vendor testing.
Bug: 265984260
Change-Id: I3c8119c6032141bb6e2f95f060f014a13340d16b
2023-02-08 21:56:51 +00:00
Treehugger Robot
aab602a1cf Merge "Camera VTS: Keep buffer ids and frame numbers consistent" into android13-tests-dev am: ceeef2d2bf am: d1798b790d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2393593

Change-Id: I266f02d1abd8e15d3c325cd731934549ec7701fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-26 01:56:27 +00:00
Treehugger Robot
ceeef2d2bf Merge "Camera VTS: Keep buffer ids and frame numbers consistent" into android13-tests-dev 2023-01-25 22:25:06 +00:00
Treehugger Robot
2597109327 Merge "Camera VTS: Fix AIDL status typo" into android13-tests-dev am: 1c4170754f am: 5b1233def1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2397737

Change-Id: I5fcf1413d9c3f068c02ef71f76753667d4c4ef4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 19:39:37 +00:00
Emilian Peev
470d138062 Camera VTS: Keep buffer ids and frame numbers consistent
In case we have a camera device that doesn't support the
Hal buffer management mode, services are required to use
the frame number and stream id to deduce the specific
buffer id and Hals are not mandated to return valid
buffer ids as part of the capture result.

Bug: 265092659
Test:adb shell
/data/nativetest64/VtsAidlHalCameraProvider_TargetTest/VtsAidlHalCameraProvider_TargetTest
--gtest_filter=PerInstance/CameraAidlTest.process10BitDynamicRangeRequest/0_android_hardware_camera_provider_ICameraProvider_internal_0

Change-Id: I3b10e91d38a13afcca45f26712cc5d5c241c2a32
2023-01-25 11:07:37 -08:00
Emilian Peev
7195938fe2 Camera VTS: Fix AIDL status typo
"physicalCameraDeviceStatusChange" returns a default
ScopedAStatus that will not include a valid AStatus instance.
This will result in binder instabilities once the status
is being parceled.
Return "ScopedAStatus::ok" instead.

Bug: 253993253
Test: adb shell VtsAidlHalCameraProvider_TargetTest
Change-Id: I219f608a04aaec0631e3de58a7e0d47a30294e52
2023-01-20 13:57:17 -08:00
Samip Garg
a9e748a594 Merge "Snap tm-dev to android13-tests-dev" into tm-dev am: 5a1bde04ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/20513348

Change-Id: Ib8616d11f816f908fd14bc718eebb2413a002ee7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-11 15:14:44 +00:00
kongchenrui
7549241c15 Fix the problem that the data field of Entry in the verifyLogicalOrUltraHighResCameraMetadata function is empty
The reason for this problem is: local variables are used when saving
PhysicalCameraCharacteristics. When its life cycle ends, physChars will
be released. Since Entry uses a pointer, data will be null. So physChars
should be defined outside else to ensure that physChars is not released
during use

Bug: 248221707
Test: VtsHalCameraProviderV2_4TargetTest
Test: VtsAidlHalCameraProvider_TargetTest
Signed-off-by: kongchenrui <kongchenrui@xiaomi.com>
Change-Id: I4c05e695d255f210f310f8ce78ec2fa71a42cee9
2022-09-28 20:35:55 +00:00
TreeHugger Robot
2d5d3855ed Merge "Camera: Import gralloc buffers before metadata queries" into stage-aosp-tm-ts-dev am: f9daf08b7b am: ee100afbbd
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/19125050

Change-Id: Ib81bd2c22beb4c1ae50f90bf0ffe6d00252e2a41
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-11 19:12:49 +00:00
Emilian Peev
dda1eb771c Camera: Import gralloc buffers before metadata queries
Raw buffer handles do not support metadata queries and need
to be imported first.
Additionally map the result buffer ids to the inflight
buffers and queue the maximum amount of inflight buffers
as advertised by Hal. Since we will be streaming a set
of buffers, use an appropriate preview size.

Bug: 237576060
Test: adb shell
/data/nativetest64/VtsAidlHalCameraProvider_TargetTest/VtsAidlHalCameraProvider_TargetTest
--gtest_filter=PerInstance/CameraAidlTest.process10BitDynamicRangeRequest/0_android_hardware_camera_provider_ICameraProvider_internal_0

Change-Id: Id854c2a8d1588a151240d1b32197dbace7e1a057
2022-07-28 16:40:35 -07:00
Rucha Katakwar
87a2e092ae Update the HAL side about torch max level safety.
Bug: 239492786
Change-Id: I59dc2acc89c617be4551a4d92494a47b782d5e13
2022-07-19 15:42:35 -07:00
Jayant Chowdhary
e8919888ad Merge "Delete HIDL 3.8" into tm-dev 2022-05-26 05:16:33 +00:00
Avichal Rakesh
c607536abc Merge "Camera VTS: remove duplicate function in anonymous namespace" into tm-dev am: 7fdc10af19
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/18565634

Change-Id: I02d300ccbac6da6238924a840cd6b9af736e0953
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 02:12:07 +00:00
Jayant Chowdhary
9ab187f118 Delete HIDL 3.8
- HIDL camera device@3.8, metadata@3.8 were temporary interfaces

Bug: 221108824

Test: GCA
Test: Camera CTS

Merged-In: I44cd1ac0e2f6647e3e9d5c60a535faf716d5ed93
Change-Id: I44cd1ac0e2f6647e3e9d5c60a535faf716d5ed93
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit 406da44909)
2022-05-25 23:43:33 +00:00
Avichal Rakesh
9a66549f5c Merge "Camera VTS: Fix incorrect return value check" into tm-dev am: 7ab50a866a
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/18565633

Change-Id: I06a72c76a21d34f16a64e20b06f2e959db72a078
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 20:59:52 +00:00
Jayant Chowdhary
406da44909 Delete HIDL 3.8
- HIDL camera device@3.8, metadata@3.8 were temporary interfaces

Bug: 221108824

Test: GCA
Test: Camera CTS

Change-Id: I44cd1ac0e2f6647e3e9d5c60a535faf716d5ed93
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2022-05-25 04:15:23 +00:00
Avichal Rakesh
9f352766a9 Camera VTS: remove duplicate function in anonymous namespace
The anonymous namespace in camera_aidl_test.cpp contained a buggy
implementation of `matchDeviceName` can was being called into by a few
tests. This CL removes the buggy implementation and fixes the faulty
calls to call into the correct function.

Bug: 233252432
Bug: 233221359
Test: atest VtsAidlHalCameraProvider_TargetTest
Change-Id: Icfe9bbc75e38d4d23bdcf64a048120708045b639
2022-05-24 21:07:53 +00:00
Avichal Rakesh
4bf91c7e38 Camera VTS: Fix incorrect return value check
The AIDL interface specificies that ICameraProvider::setCallback should
return Status::ILLEGAL_ARGUMENT if the provided callback is null. The
setCallback test incorrectly checked for the return value to be OK
instead.

This CL fixes the test to check for ILLEGAL_ARGUMENT and removes setting
callback to null from setTorchMode test. In addition it fixes
`setCallback` test to use Bn* variant of ICameraProviderCallback to
ensure that the object makes it through the binder.

Bug: 233221359
Test: atest VtsAidlHalCameraProvider_TargetTest
Change-Id: Ia33226b15efd9628bf8e1b53ec2a3012b08eaaac
2022-05-24 21:06:41 +00:00
Shuzhen Wang
5c036af317 Camera: Fix broken link in doc
Test: Build
Bug: 231252657
Change-Id: I4118369e0f387128dcbba746cb2be18627da7f36
2022-05-03 12:40:58 -07:00
TreeHugger Robot
e279de9421 Merge "Camera: Correct request settings R&C override" into tm-dev 2022-04-20 22:48:58 +00:00
Emilian Peev
3d919f9f6c Camera: Correct request settings R&C override
Assign the R&C overriden 'settingsMetadata' in the capture request.

Bug: 222648486
Test: adb shell VtsAidlHalCameraProvider_TargetTest
--gtest_filter=PerInstance/CameraAidlTest.processMultiCaptureRequestPreview/0_android_hardware_camera_provider_ICameraProvider_internal_0

Change-Id: I5825ebae59e8d3c05e5c301825b0ab8e6c1f50dc
2022-04-20 13:53:00 -07:00
Jiyong Park
70f5837e1f Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: I61eb51c0334eb99489c6f1570110d7e18c350c99
2022-04-16 07:03:24 +09:00
Jiyong Park
703e97920e Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: Ie41cc0797710f813f92c65c387f247c7806d8394
2022-03-31 12:01:39 +09:00
Avichal Rakesh
e1685a735e Camera: Fix test to use 64 bit pointer in stream use cases
I23a4324602 updated stream use cases to use 64 bit integers. The
`configureStreamUseCases` test was still using a pointer to 32 bit
integer to determine supported use cases. This CL updates how supported
use cases are populated to use a pointer to 64 bit integers instead.

Bug: 226171215
Test: `configureStreamUseCases` which was failing on cuttlefish is  now
      passing
Change-Id: I5b1ef4e8e344e43b10ea5c992afaace03608660d
2022-03-22 16:07:25 -07:00
Austin Borger
64f39ae2d8 Merge "Update AIDL files accidentally diverged from HIDL / libcamera_metadata." into tm-dev 2022-03-19 00:41:11 +00:00
Austin Borger
c31af39ecb Update AIDL files accidentally diverged from HIDL / libcamera_metadata.
Bug: 222124945
Test: Built android.
Change-Id: Iadec82bdb792f00ba475e07b5b62b363c5f56586
2022-03-18 19:11:29 +00:00
Austin Borger
1b7ebd2928 [AIDL] Add L to TagBoundaryId::VENDOR to indicate that it is a long
integer literal.

Bug: 225049648
Test: Ran m android.hardware.camera.common and observed output files
Change-Id: I098c8d537a9a9809ff3bd594c69b30c69b3b2ed9
2022-03-18 17:11:47 +00:00
Shuzhen Wang
f68d60d4af Merge "Camera: Increase bit depth of stream use case to 64" into tm-dev 2022-03-14 22:16:36 +00:00
TreeHugger Robot
5bf813a93e Merge "Camera: Misc VTS test fixes" into tm-dev 2022-03-10 00:24:55 +00:00
Shuzhen Wang
36efa7161a Camera: Increase bit depth of stream use case to 64
Test: Camera CTS
Bug: 223387965
Change-Id: I23a4324602ed37cf38c7a1a34dade615c4adb72b
2022-03-09 22:57:40 +00:00
Avichal Rakesh
fbcf7ea514 Camera: Misc VTS test fixes
This CL fixes two tests:
* `systemCameraTest`: Fix incorrect vector initialization. The test was
  accidentally using the size constructor instead of initialization list
  constructor.
* `processMultiCaptureRequestPreview`: Allow unsupported stream configs.
  The test assumed that all stream combinations from physical cameras
  that back a LogicalMultiCamera were supported. This led to false
  test failures. This CL allows the test to exit early if the HAL
  reports that a stream combination is not supported.

Bug: 222648486
Test: `test VtsAidlHalCameraProvider_TargetTest` pass on failing devices
Change-Id: I009cc2f4b8b94a26b813883cdc1403ae0eb5c477
2022-03-09 21:55:24 +00:00
Jayant Chowdhary
111ba0c821 Merge "Add automotive related keys to AIDL." into tm-dev 2022-03-09 00:50:44 +00:00
Jayant Chowdhary
54d7fb5029 Add automotive related keys to AIDL.
This CL adds a new automotive metadata section with below fields:
- AUTOMOTIVE_LOCATION describes where the camera exists.
- AUTOMOTIVE_LENS_FACING tells where the camera's lens is facing toward.

These were added to the temporary HIDL interface but not AIDL.

Bug: 223262543

Test: build

Change-Id: Id074c6878690767c89792f867a7754ae8193405d
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2022-03-08 21:51:55 +00:00
TreeHugger Robot
49175a3732 Merge "Added annotations to prevent misapply of this interface by OEM partners" into tm-dev 2022-03-02 05:08:52 +00:00
Avichal Rakesh
d3503a349f camera: Fix AIDL VTS test
The default value of a Stream's `dynamicRangeProfile` field is invalid,
which means the caller needs to set it to a sensible default with each
call. This CL updates the Stream creation in VTS test to use
`ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD`
wherever a Stream object was being created with implicit default.

Bug: 210912368
Test: Existing VTS tests now pass on Cuttlefish
Change-Id: Iaae2f6dfde852fc9c076a6029854ccdf8f68d39a
2022-02-25 06:30:27 +00:00
Cliff Wu
ba362a8c19 Added annotations to prevent misapply of this interface by OEM partners
- This interface is only suitable for special camera injection hal,
  general camera hal does not need to implement it.

Test: Camera VTS
Bug: 219684073
Change-Id: I9b70e4640dff205008f3d6270f402b720b6b4434
2022-02-24 15:39:36 +08:00
Avichal Rakesh
51aa86c095 camera: Fix build errors due to CLs interleaving.
ag/16982347 and ag/16988237 were submitted around the same time, but
can cause build failure when put together. This CL fixes the
compilation issues and a few other other warnings.

Fix: 221154052
Test: Existing
Change-Id: Ia865e3bfc6cd77e7eff1efa5729d6db0d58c279d
2022-02-24 05:48:14 +00:00
Avichal Rakesh
442bb38258 Merge "Camera: Migrate VTS tests to AIDL" into tm-dev 2022-02-24 03:28:33 +00:00
Chih-hung Hsieh
34593d4e2a Merge "Add timed out test files to tidy_timeout_srcs" am: ff54f73b4f am: fa83970b3a am: 581616e658
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1992232

Change-Id: I2eac13fe3b5ab0b4f15d6ceadf376e5e74124a81
2022-02-24 01:32:09 +00:00