Commit graph

1009 commits

Author SHA1 Message Date
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
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
Shuzhen Wang
38ddb278b3 Camera: Adjust VTS tests for zoom override latency
Now that the zoom override latency requirement is reduced to 1 frame,
adjust the VTS test accordingly.

Test: Run VtsAidlHalCameraProvider_TargetTest on Pixel
Bug: 283196724
Change-Id: Ie05106cd79549de6b91f94b5c25ffae768982a1b
2023-05-22 09:42:38 -07:00
Austin Borger
8e9ac0249a Camera VTS: Close the session at the end of stream configuration validation
Not calling mSession->close means that there will be multiple concurrent
sessions open, which may not be supported by the device.

Bug: 280559094
Test: Ran on cuttlefish
Change-Id: Ie622fabd4d0be2f8442e90d1c781bbf905172270
2023-05-04 22:57:49 +00:00
Shuzhen Wang
e1dcc40ec3 Camera: VTS: Fix fence fd double close am: 3ad137edbb am: 2603479470 am: 7c4bb95a18 am: 36f18e9327
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2539830

Change-Id: Ifa023065ee2380dd87c898275fcd0d1cf261fcf5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-18 01:43:17 +00:00
Shuzhen Wang
36f18e9327 Camera: VTS: Fix fence fd double close am: 3ad137edbb am: 2603479470 am: 7c4bb95a18
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2539830

Change-Id: I3fe1f8c5da5fcc4c18ffe9ef19099145c4b5f3b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-18 01:24:09 +00:00
Shuzhen Wang
2603479470 Camera: VTS: Fix fence fd double close am: 3ad137edbb
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2539830

Change-Id: I6f75051e3ac3bf9d3976969ead45da306d2ff10a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-18 00:49:20 +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
Alex Buynytskyy
ec1198d941 UpsideDownCake is now 34
Ignore-AOSP-First: UpsideDownCake Finalization
Bug: 275409981
Test: build
Change-Id: I832ab7a8b5445ba85e27bbcf5be64906bfa0e5be
2023-04-07 23:41:20 +00:00
Treehugger Robot
41e0286ba5 Merge "Camera: VTS: Wait for release fence before consuming buffers" into android13-tests-dev am: 1c8377c24c am: 13f7e14af3 am: 741506640a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2520900

Change-Id: Idaefcf5c650012829792b5db1760b90045dd653a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-05 18:47:40 +00:00
Treehugger Robot
8c242dcfac Merge "Camera: VTS: Wait for release fence before consuming buffers" into android13-tests-dev am: 1c8377c24c am: c3b6c6c691 am: 35bd55b0d7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2520900

Change-Id: I5a993cbe326db709d496cdadfabf18b774353c5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-05 18:46:48 +00:00
Austin Borger
7d601ebfb6 Camera: Update documentation for dataSpace/colorSpace in Stream.aidl.
Bug: 271350569
Test: N/A
Change-Id: I3f853cece53d102c231a8de1cfcab5ed1fdb0dc0
2023-04-05 11:13:30 -07:00
Treehugger Robot
13f7e14af3 Merge "Camera: VTS: Wait for release fence before consuming buffers" into android13-tests-dev am: 1c8377c24c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2520900

Change-Id: I02490da662338296bd76de6c9e39b8f590aae0c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-05 17:34:13 +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
d1c14328fd Camera: Fix VTS failure for depth only camera am: 72f97643fb am: e5489ab299 am: 1dc71caa85
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2523160

Change-Id: I325c9fe2fdd0423bd7d5f219406521df8e208c60
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-05 03:19:56 +00:00
Shuzhen Wang
b53e6ec5d2 Camera: Fix VTS failure for depth only camera am: 72f97643fb am: 3d44601e7f am: 86e38ac68e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2523160

Change-Id: I8177f8733c67615d347cad582380952250ced839
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-05 03:19:43 +00:00
Shuzhen Wang
3d44601e7f Camera: Fix VTS failure for depth only camera am: 72f97643fb
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2523160

Change-Id: I849cf4e48e18cc88ec6e62eb4066f2ff05887fa4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-05 02:07:10 +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
TreeHugger Robot
90c8cd9a3b Merge "Camera: VTS: Fail test if availableSettingsOverride is empty" into udc-dev 2023-04-04 04:57:36 +00:00
Shuzhen Wang
49cb038af1 Camera: VTS: Fail test if availableSettingsOverride is empty
If availableSettingsOverride key is in CameraCharacteristics, it must
contains at least OFF.

Test: atest VtsAidlHalCameraProvider_TargetTest
Bug: 272546819
Change-Id: If6fb7275fc1191947dc120c9873274f4a1883720
2023-03-31 15:44:40 -07:00
Austin Borger
5e80374926 Camera VTS: Fix processColorSpaceRequests.
Changes were made to process10BitDynamicRangeRequest and the way frames
are numbered. This needs to be carried over to
processColorSpaceRequests.

Bug: 275007341
Test: Ran process10BitColorSpaceRequest / process8BitColorSpaceRequest
Change-Id: Ia0eb2fd71aff1bfc8398c85c68e1b9575a1cc058
2023-03-24 18:29:39 -07:00
Austin Borger
7dd74a94c2 Merge "Camera VTS: Updated ColorSpaceNamed and color space tests." into udc-dev 2023-03-22 20:04:15 +00:00
Austin Borger
54b2236b22 Camera VTS: Updated ColorSpaceNamed and color space tests.
BT2020_HLG and BT2020_PQ were adding since the ColorSpaceProfiles tests
were checked in. Add those to the ColorSpaceNamed enum.

Also remove unsupported color spaces from the list of 8-bit color spaces
to test, and change BT2020 to BT2020_HLG.

Test: Ran on Pixel 7.
Bug: 274789672
Change-Id: I9625a1f05017ccdcb383cdf8fd13084688acc79f
2023-03-22 11:30:11 -07:00
Austin Borger
0918fc865a Camera VTS: Add test validating stream configuration metadata
Vendor static metadata entries related to the stream configuration tags
like min frame duration, stall duration could include duplicate or
invalid data. Check that this is not the case.

Initially, this test only has impact for 10-bit HDR devices. More checks
will be added in the future.

Bug: 269165407
Test: Ran test on Pixel 7.
Change-Id: I2ad820c1ba4753508fa1f61b31b51739358099ea
2023-03-22 11:05:14 -07:00
Austin Borger
d76db8d1a9 Merge "Camera AIDL: Remove unsupported color space enums." into udc-dev 2023-03-17 19:20:16 +00:00
Austin Borger
cf9118c283 Camera AIDL: Remove unsupported color space enums.
Bug: 273961103
Test: Presubmit
Change-Id: I349db6968b33024e34facf204b4638c73f4d242d
2023-03-16 10:35:20 -07:00
Avichal Rakesh
8f4111ca7d camera: Add logId to StreamConfiguration
For data analysis from HAL logs, it is helpful to get some higher level
information of the camera usage (such as the client's package name).
HALs are denied access to this higher level information at runtime.

To help data with data analysis, cameraservice will now pass a session
identifier when configuring streams. This identifier can be used to
correlate HAL logs with cameraservice logs at the time of log
consumption. However this correlation cannot be made at runtime. This
identifier is randomly generated and has no functional purpose and can
be safely disregarded by HAL implementations that don't want to
correlate their logs to cameraservice logs.

Bug: 271171714
Test: Manually verified that cameraservice sends correct logId to the
      HAL.
Change-Id: Ib0823a9de8f573233a6e037c178a4398eb26e7ef
2023-03-14 14:45:53 -07:00
Shuzhen Wang
80e67aedf2 Camera: Document limitation on private reprocessing
For private reprocessing, the ImageReader used to produce images into
the ImageWriter isn't aware of the overridden format. If the HAL decides
to override the input IMPLEMENTATION_DEFINED format, reprocessing will
fail.

Document this limitation in the HAL interface.

Test: Build
Bug: 266954992
Change-Id: I9bd05e9682e4d11870bf9bd25763f28291faef75
2023-02-23 22:24:09 +00:00
Shuzhen Wang
22bee670eb Merge "Camera VTS: Override RotateAndCrop metadata" into android13-tests-dev am: 74a4696d56 am: db5e0c9852 am: fbf372d99e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2450127

Change-Id: I89b2790bb764fb3d76f99d10e77de31d5eb399d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 22:12:09 +00:00
Shuzhen Wang
3b3183fd79 Merge "Camera VTS: Override RotateAndCrop metadata" into android13-tests-dev am: 74a4696d56 am: f5dbd4869e am: 1d07d585e9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2450127

Change-Id: I0caccb6f505b9c914e01fa95a063fe6990eebb6e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 22:10:30 +00:00
Shuzhen Wang
db5e0c9852 Merge "Camera VTS: Override RotateAndCrop metadata" into android13-tests-dev am: 74a4696d56
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2450127

Change-Id: I6d4545e2567ac8a3650c98dcc0f4079cc011c52a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 20:53:20 +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
626c697e3d Merge changes from topic "fmq_rust_no"
* changes:
  Remove rust backend from camera AIDL interface
  Disable Rust backend for FMQ type
2023-02-16 00:20:17 +00:00
Devin Moore
e1ffa0ca4e Remove rust backend from camera AIDL interface
FMQ is not supported in rust yet.

Test: m
Bug: na
Change-Id: Icfd804f9b30a6c9feffc839dac80ff1cdbe688d2
2023-02-15 21:24:57 +00:00
Treehugger Robot
36b6fd6600 Merge "Camera VTS: Remove unnecessary test of Y16 depth format" into android13-tests-dev am: ca60e0b71f am: 6f48e8b475 am: da32855363
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2402628

Change-Id: I5095b3a4d6bfd5e4105faff7656d90a81c4a82e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-09 02:49:40 +00:00
Treehugger Robot
0dd6f62f61 Merge "Camera VTS: Remove unnecessary test of Y16 depth format" into android13-tests-dev am: ca60e0b71f am: 915fde07bd am: f862766f37
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2402628

Change-Id: I7acb9527ae60468dcdf502aec8241a67c7992150
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-09 02:49:08 +00:00
Treehugger Robot
915fde07bd Merge "Camera VTS: Remove unnecessary test of Y16 depth format" into android13-tests-dev am: ca60e0b71f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2402628

Change-Id: I33e7a4a8a099026cf91910af33f3be0bd7dfe6f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-09 01:16:47 +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
0e7ece2b4e Merge "Camera VTS: Keep buffer ids and frame numbers consistent" into android13-tests-dev am: ceeef2d2bf am: d1798b790d am: a9f5ace3b6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2393593

Change-Id: Iacb7cde297b338e105da36daa0d72a2baa5c76b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-26 02:37:40 +00:00
Treehugger Robot
dff7304e4a Merge "Camera VTS: Keep buffer ids and frame numbers consistent" into android13-tests-dev am: ceeef2d2bf am: d627f61ecc am: d565a1b987
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2393593

Change-Id: Idf8f23a6a164a53dfa55fc50b1803f599be0691d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-26 01:54:19 +00:00
Treehugger Robot
d627f61ecc Merge "Camera VTS: Keep buffer ids and frame numbers consistent" into android13-tests-dev am: ceeef2d2bf
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2393593

Change-Id: Iab70382aa05ec5812520cb60f79b689184ffb413
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 23:05:52 +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
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
Treehugger Robot
6d6cda075b Merge "Camera VTS: Fix AIDL status typo" into android13-tests-dev am: 1c4170754f am: 98a65f23f0 am: 4761bc032e am: 8c763402a9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2397737

Change-Id: If5172b4f0158995e349163049369b2fa065690bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 04:55:54 +00:00
Treehugger Robot
8c763402a9 Merge "Camera VTS: Fix AIDL status typo" into android13-tests-dev am: 1c4170754f am: 98a65f23f0 am: 4761bc032e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2397737

Change-Id: I118189986d36de10f8ec55aec3dee8c2099d000d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 04:08:12 +00:00
Treehugger Robot
98a65f23f0 Merge "Camera VTS: Fix AIDL status typo" into android13-tests-dev am: 1c4170754f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2397737

Change-Id: I41ac1e6f5f871ca24aace3a1086dd5b24fbd3c7e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 02:36:52 +00:00
Treehugger Robot
2e55ef7ef5 Merge "cleanup camera OWNERS" am: 5a412d3e11 am: 48b05132ec
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2393024

Change-Id: Ie6bcb1e5b2374d273b0672086c6e40db6208eef2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-20 22:10:17 +00: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