Commit graph

571 commits

Author SHA1 Message Date
Fang Hui
f097c4d9bc Camera: Fix processCaptureRequestBurstISO
android_convertGralloc1To0Usage() is used to convert gralloc1_usage(uint64_t) to gralloc_usage (int32_t),
then passed as a para in allocateGraphicBuffer(). But definition of allocateGraphicBuffer() is as
void CameraAidlTest::allocateGraphicBuffer(uint32_t width, uint32_t height, uint64_t usage, PixelFormat format, buffer_handle_t* buffer_handle).
The type of "usage" is uint64_t. So the convert (uint64_t -> int32_t -> uint64_t) will change usages(31 bit is 1)
such as 0x0000000080020b00 to 0xffffffff80020b00. It's unexpected.

Use ANDROID_NATIVE_UNSIGNED_CAST to fix the issue.

Bug: https://issuetracker.google.com/issues/330051542

Change-Id: I23dfd603be0da6864d1021a57c3c3ce76cb78bda
Signed-off-by: Fang Hui <hui.fang@nxp.com>
2024-05-07 16:49:45 +00:00
Treehugger Robot
74dc4cc5d7 Merge "[DON'T BLOCK] Test ownership migration rules" into main am: 27e97308c4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2950589

Change-Id: Ie4f36b193820490e606e7f5100ca29200f832fa2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-07 01:45:21 +00:00
Treehugger Robot
27e97308c4 Merge "[DON'T BLOCK] Test ownership migration rules" into main 2024-02-07 00:55:34 +00:00
Jayant Chowdhary
d5fb309d31 Merge "Camera VTS: Test only CROPPED_RAW use case for RAW_SENSOR streams" into android14-tests-dev am: e51dca227c am: 02cb71bd4d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2944865

Change-Id: Ib74ae9c579d503933012c28080a87312122fa45e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 19:12:23 +00:00
Jayant Chowdhary
02cb71bd4d Merge "Camera VTS: Test only CROPPED_RAW use case for RAW_SENSOR streams" into android14-tests-dev am: e51dca227c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2944865

Change-Id: I7e8bd1591f4520c63f3fe7449353a55961014334
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 18:30:10 +00:00
Jayant Chowdhary
e51dca227c Merge "Camera VTS: Test only CROPPED_RAW use case for RAW_SENSOR streams" into android14-tests-dev 2024-02-05 17:45:14 +00:00
Aditya Choudhary
ad2ba1b851 [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
go/new-android-ownership-model

Bug: 304529413
Test: N/A
Change-Id: Ic8c4bd6ac246e7efa98bbdaf822d12ae8e1230a5
2024-02-05 15:45:22 +00:00
Jayant Chowdhary
7a9ee22a51 Camera VTS: Test only CROPPED_RAW use case for RAW_SENSOR streams
There are no mandatory stream combinations for RAW_SENSOR streams that
do not involve the CROPPED_RAW stream use case. So we don't need to test
stream non CROPPED_RAW stream use cases with the RAW_SENSOR format,
since we don't have a definite answer to whether they will be supported or not.

Bug: 317773720

Test: Camera VTS on cf
Test: Vendor testing

Merged-In: I0870e90ae68a5e35196f0ba0afaa6b8bf7fbfbd8
Change-Id: I0870e90ae68a5e35196f0ba0afaa6b8bf7fbfbd8
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit 6847115a00)
2024-02-01 18:51:13 +00:00
Xin Li
763c473c3d Merge Android 24Q1 Release (ab/11220357)
Bug: 319669529
Merged-In: I976f80006aeb88bde2ae34ca4f9be72cea727d9e
Change-Id: Id94b25af52bd2e2847b6858697ab21cc6ce27aa3
2024-01-30 10:36:50 -08:00
Jayant Chowdhary
df5baff289 camera vts: Remove redundant capabilities fetch am: 23f338bac4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2912754

Change-Id: I13e49647cc7f340fa18265dac415c83a2850d025
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-17 22:31:52 +00:00
Jayant Chowdhary
331ac42624 Check for stream use case capability before stream use case test am: 5554de2fa8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2913463

Change-Id: I41668e65f44bebddc4b82ac2e030a0a5d8cf75d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-17 22:31:33 +00:00
Jayant Chowdhary
23f338bac4 camera vts: Remove redundant capabilities fetch
Bug: 299202800

Test: build

Merged-In: Ia6ca1ee0fb65e357398ba62c6a787c6530b989e4
Change-Id: Ia6ca1ee0fb65e357398ba62c6a787c6530b989e4
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit 571cbf1b4c)
2024-01-17 18:48:49 +00:00
Jayant Chowdhary
5554de2fa8 Check for stream use case capability before stream use case test
Bug: 299202800

Test: Vendor testing

Merged-In: If30ead47072dc1f950b8fb6384072cc38cd51c58
Change-Id: If30ead47072dc1f950b8fb6384072cc38cd51c58
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit da59822642)
2024-01-17 18:33:57 +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
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
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
Xin Li
11ee4fea87 Merge android14-tests-dev
Bug: 263910020
Merged-In: I770dc5620648df2eab608e030c5e76cf190f315d
Change-Id: If4fe726d538386d70061e8051299d8fb393ef5df
2023-10-10 16:17:14 -07: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
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
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
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
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
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
Avichal Rakesh
b8863f6a03 camera: Fix prefix length path for External Camera HAL
The default External Camera HAL accidentally used `sizeof` on a `char *`
to get the length of the string. This "worked" because the string in
question "/dev/" has length of 5, while on a 32-bit system `char *`
has a size of 4. This difference of 1 was handled a few lines later.

However on 64-bit system `sizeof(char *)` returns 8 which breaks the
logic later in code.

As `sizeof` was being used as a proxy for strlen, this CL converts the
uses C++'s std::char_traits::length to determine the string lengths
at compile time.

Bug: 265168485
Test: Manually tested that the calculated length is correct after the
      fix.
Change-Id: I92481a2bcb74fdbbb483ef552168debf07b2d68a
2023-06-08 17:00:35 -07:00
Steven Moreland
503ed3ae2f Merge "Camera Provider VTS: auto-gen" am: 433f0ac41d am: 7967c1a9e4 am: 576f0a3f05
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2611867

Change-Id: Iefa1bb1752e0ca033350af12af5d1e909e402db0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-07 20:07:30 +00:00
Steven Moreland
a405bae2d1 Camera Provider VTS: auto-gen
Upload for stashing. I need to redownload/rebuild Android to test
the new feature.

Bug: N/A
Test: atest VtsAidlHalCameraProvider_TargetTest
Change-Id: Ic9aa621b6d3e1297c83add88283559915e36311e
2023-06-05 19:55: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
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
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
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
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