Commit graph

439 commits

Author SHA1 Message Date
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
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
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
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
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
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
Steven Moreland
2533048e88 cleanup camera OWNERS
I wrote a script for this, see my email
"introducing: ownersfix.py - basic cleaning script for simple OWNERS files"

Bug: 265168485
Test: N/A
Merged-In: I47ab60785b193764a96d7b63820c87ec4fa81f7f
Change-Id: I47ab60785b193764a96d7b63820c87ec4fa81f7f
2023-01-18 21:06:05 +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
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
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
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
Chih-hung Hsieh
fa83970b3a Merge "Add timed out test files to tidy_timeout_srcs" am: ff54f73b4f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1992232

Change-Id: Ic6072a539d185abc0bcce2ef1dd4a96ddf70e3b8
2022-02-24 00:40:48 +00:00
Avichal Rakesh
362242f73c Camera: Migrate VTS tests to AIDL
This CL migrates the existing camera VTS tests to AIDL

Bug: 210912368
Test: Migrated all HIDL tests to AIDL
Change-Id: I4da6d38105d96908684a754da73699486295da8b
2022-02-23 23:44:01 +00:00
Emilian Peev
4ce76d242c Camera: Use 64bit integers for dynamic range profile values
Additionally extend the dynamic range profile map to include
hints about extra lookahead latency.

Bug: 215396395
Test: Camera CTS
Change-Id: I600a3147d94a9aad1a312b92aacee014c05db16f
2022-02-23 00:26:22 +00:00
Chih-Hung Hsieh
ad1bf31b78 Add timed out test files to tidy_timeout_srcs
* Timed out runs do not show any warning messages.
* These test files cannot finish clang-tidy runs with
  the following settings:
    TIDY_TIMEOUT=90
    WITH_TIDY=1
    CLANG_ANALYZER_CHECKS=1
* When TIDY_TIMEOUT is set, in Android continuous builds,
  tidy_timeout_srcs files will not be compiled by clang-tidy.
  When developers build locally without TIDY_TIMEOUT,
  tidy_timeout_srcs files will be compiled.
* Some of these test modules may be split into smaller ones,
  or disable some time consuming checks, and then
  enable clang-tidy to run within limited time.

Bug: 201099167
Test: make droid tidy-hardware-interfaces_subset
Change-Id: I1de28f1572fff368f67eab512fffec9f2e5c2a9b
2022-02-18 17:25:41 -08:00
Rucha Katakwar
18aa2d952b Camera: Update constrained HFR VTS test.
Added a check that HAL does not advertise multiple preview rates for
the same recording rate and size.

Bug: 200310682

Change-Id: Ia213f152ad00c846a533577e552b668efdde6f3d
2022-02-15 16:38:25 -08:00
Xin Li
0bf8f21279 Merge sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: Id9e06f88539b59480d5cf57a4ba67cef4676c1d5
Change-Id: Id6b1ea4f8700446b044255e80f21c137aeb7acf1
2022-02-11 07:27:13 +00:00
Shuzhen Wang
7267abff25 Camera: Add stream use case API
- Add availableStreamUseCase static metadata tag
- Add STREAM_USE_CASE camera capability
- Add useCase flag in camera stream interface

Test: atest VtsHalCameraProviderV2_4TargetTest
Bug: 200307880
Change-Id: I4e473edcb52a97fa0e1b27cf94603cf9f9984f82
2022-02-03 17:46:44 -08:00
Shuzhen Wang
1320f88af2 Camera: VTS: Remove GRF MultiCamera for Android 12
Certain OEMs' new S launches with vendor freeze cannot implement
multi-camera API.

Bug: 189053514
Bug: 211709637
Change-Id: I71b46f1e8343a5848cbe3fa55bbcd427c87b05dd
Merged-In: I71b46f1e8343a5848cbe3fa55bbcd427c87b05dd
(cherry picked from commit 30a198ded0)
2022-01-20 05:50:37 +00:00
TreeHugger Robot
714f9596c3 Merge "Camera: VTS: Remove GRF MultiCamera for Android 12" 2022-01-20 05:49:39 +00:00
Shuzhen Wang
ea3ab4f3f3 Camera: VTS: Remove GRF MultiCamera for Android 12
Certain OEMs' new S launches with vendor freeze cannot implement
multi-camera API.

Test: Build
Bug: 189053514
Bug: 211709637
Change-Id: I71b46f1e8343a5848cbe3fa55bbcd427c87b05dd
(cherry picked from commit 30a198ded0)
2022-01-19 13:21:42 -08:00
Emilian Peev
b5f634fc37 Camera: Add device 3.8 and HDR10 native APIs
Initial set of native API extensions to support 10-bit
output capable device:
- Identification
- Configuration
- Data plumbing

Bug: 195946346
Test: adb shell
/data/nativetest64/VtsHalCameraProviderV2_4TargetTest/VtsHalCameraProviderV2_4TargetTest
--gtest_filter=PerInstance/CameraHidlTest.process10BitDynamicRangeRequest/0_internal_0

Change-Id: I526120944232ce211259cbd215935db7e445a6c5
2022-01-05 15:46:50 -08:00
Jayant Chowdhary
c40bae7dc8 Merge "VTS test for previewStabilization" 2021-12-29 19:52:56 +00:00
Jayant Chowdhary
bf39d4db34 VTS test for previewStabilization
Bug: 200197440

Test: VtsHalCameraProviderV2_4TargetTest
     --gtest_filter=PerInstance/CameraHidlTest.processCaptureRequestPreviewStab*

Change-Id: Iba71983a69d20af605924fa6f1c0697e49d911f8
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-12-15 14:41:03 -08:00
Rucha Katakwar
5ad93755c8 Camera: Add 3.8 version of ICameraDevice.
The new version of ICameraDevice supports interfaces for torch
strength control feature. New VTS test has been added to test the
emulator HAL-side implementation of the newly added interfaces.

bug: 200174275

Test: Camera VTS test pass.
Change-Id: Ia5652a96e09bd716b5079fe9ed071dffc53b5b12
2021-12-13 12:02:51 -08:00
Shuzhen Wang
8136c00c7e Camera: Update readoutTimeout requirement
Due to sensor crop, readoutTimeout - startOfExposure may be larger than
exposureTime. Update the VTS test to reflect the spec change.

Test: processCaptureRequestPreview
Bug: 208270993
Change-Id: I51a373ecbc5c7c086f84c5479a43dffbe8fcc0c2
2021-12-01 18:34:03 -08:00
Shuzhen Wang
cd9af6c1ce Camera: Add version 3.8 of ICameraDeviceCallback
The new version of ICameraDeviceCallback supports shutter notify with readout
timestamp.

The readout timestamp is used to re-time viewfinder frames to reduce
jitter. When camera runs at fixed frame rate, the start_of_exposure time
intervals may change, but start_or_readout intervals are constant.

Test: Camera VTS test
Bug: 189380857
Change-Id: I4c3856a4e30caa8cdf8417d437de1de3190c6fd6
2021-11-17 13:48:10 -08:00
Valentin Iftime
b4fcc57952 Use sp<>::make in external camera HAL
Fix external camera HAL crash (android::RefBase::incStrongRequireStrong)

Bug: 184190315
Test: android.hardware.camera.provider@2.5-external-service does not crash
Change-Id: I2406099078fd3c9bddf05afc4011fbece5072139
2021-11-16 22:48:52 +01:00
Xin Li
8f6d361f15 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I96a417467346a57b13c2efae12a183d78506afc3
Change-Id: I570a3b599281f519af7a440562c83f8484684fd5
2021-11-10 08:05:55 +00:00
Shuzhen Wang
dcfd36a1ef Camera: VTS for test_pattern tag requirement for physical camera am: 5ee43a6d24
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16175076

Change-Id: Ica4b42dc02429bc7d1082d9c0ff7bb5078b6e968
2021-11-04 20:46:50 +00:00
Shuzhen Wang
5ee43a6d24 Camera: VTS for test_pattern tag requirement for physical camera
Ensure that if TEST_PATTERN_MODE is listed in physical request keys, the
corresponding physical camera must support the privacy related test
pattern modes.

Test: Run Camera VTS with Cuttlefish emulator
Bug: 204108650
Change-Id: I8f378ab642c7c010a2ba73a8e89e65c91ba780eb
2021-11-03 22:56:16 +00:00
TreeHugger Robot
f51c54566f Merge "VtsHalCameraProviderV2_4TargetTest: Override rotate&crop" into sc-v2-dev am: 3c2ebae81c
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16144607

Change-Id: I386dc4cb7c0fda8b21ffc394fdcb8852cc031e55
2021-11-02 19:27:08 +00:00
TreeHugger Robot
3c2ebae81c Merge "VtsHalCameraProviderV2_4TargetTest: Override rotate&crop" into sc-v2-dev 2021-11-02 19:06:21 +00:00
Shuzhen Wang
0e9dcbff44 Camera: Adjust VTS test to relax multi-camera requirement am: dc6da704ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16149860

Change-Id: I86be1b078702be7324b2e6241e6a44ad5347e9f3
2021-10-29 20:05:50 +00:00
Shuzhen Wang
dc6da704ed Camera: Adjust VTS test to relax multi-camera requirement
The multi-camera Grf requirement is now only applicable to rear facing
camera.

Test: Run test on Pixel devices
Bug: 204252005
Change-Id: Idb7735eebdc104f6ee6a5946b50c11aea809eb85
2021-10-29 11:24:03 -07:00
Shuzhen Wang
55190e272d Camera: Adjust VTS test to relax multi-camera requirement
The multi-camera Grf requirement is now only applicable to rear facing
camera.

Test: Run test on Pixel devices
Bug: 204252005
Change-Id: Idb7735eebdc104f6ee6a5946b50c11aea809eb85
2021-10-29 18:21:36 +00:00
Emilian Peev
06ec563f55 VtsHalCameraProviderV2_4TargetTest: Override rotate&crop
As per documentation the default auto rotate&crop mode must
be overriden before passing the capture request back to the
camera provider.

Bug: 204407427
Test:
atest
VtsHalCameraProviderV2_4TargetTest:PerInstance/CameraHidlTest#processCaptureRequestPreview/0_internal_0
atest
VtsHalCameraProviderV2_4TargetTest:PerInstance/CameraHidlTest#processMultiCaptureRequestPreview/0_internal_0
atest
VtsHalCameraProviderV2_4TargetTest:PerInstance/CameraHidlTest#processCaptureRequestBurstISO/0_internal_0
atest
VtsHalCameraProviderV2_4TargetTest:PerInstance/CameraHidlTest#flushPreviewRequest/0_internal_0

Change-Id: I1e1d387a04add8be9a281fcc3f78a867990248b3
2021-10-28 17:49:19 -07:00
Emilian Peev
08e5e71c1d Merge "Camera: Add static metadata that can map device state to orientation" into sc-v2-dev am: 6621c1ad05
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15943423

Change-Id: I9fbc1699e84cf078fdedd13acc569a2fd1384a98
2021-10-07 23:05:20 +00:00
Emilian Peev
3387f1c84e Camera: Add static metadata that can map device state to orientation
Allow camera providers to advertise the mapping between device state
and camera orientation.

Bug: 201005727
Test: VtsHalCameraProviderV2_4TargetTest
--gtest_filter=PerInstance/CameraHidlTest.getCameraCharacteristics/0_internal_0

Change-Id: Ibb035f4dc3d8af1106ac08f86e43b953ddcbf55b
2021-10-06 16:42:25 -07:00
TreeHugger Robot
1459b1b0c9 Merge "Camera: VTS: Set proper dataSpace for reprocessing test" into stage-aosp-sc-ts-dev am: 6b94d29f51 am: 7a0dff7492
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15874436

Change-Id: I84af990f3150b3ade08c401a743c4394bc18ee9e
2021-09-21 20:33:03 +00:00
Shuzhen Wang
208ed2af02 Camera: VTS: Set proper dataSpace for reprocessing test
Set proper dataSpace for reprocessing output stream.

Bug: 199483381
Test: Camera VTS test on Pixel 4 and Cuttlefish
Change-Id: I6ac96fc65abf4332f3f248b9aed0e3a7ea88d57c
2021-09-20 23:53:58 +00:00
Treehugger Robot
efba724466 Merge "Fix CameraHidlTest" am: eb86f93f53
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1771029

Change-Id: Ie6c744bdd5cd3ffa36647fa1fbe4a985a89916e3
2021-08-25 00:38:56 +00:00
Treehugger Robot
eb86f93f53 Merge "Fix CameraHidlTest" 2021-08-25 00:22:52 +00:00
Yiming Pan
1f3821536d Merge "Add OWNERS for VTS module VtsHalCameraProviderV2_4TargetTest" am: 0463fce0e9 am: 27fd23899d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1773792

Change-Id: I42810167c77a4d39347f35f9e9cb6fd6d1befb9c
2021-07-23 21:27:28 +00:00
Yiming Pan
9f7d8075fb Add OWNERS for VTS module VtsHalCameraProviderV2_4TargetTest
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: I14599c6ca99fb41fadb58555310a0309fa1806ad
2021-07-21 15:32:33 -07:00
yanzong chen
ee1c028c6b Fix CameraHidlTest
[Description]
Add ASOP to Fix CameraHidlTest callback fail

Test:
1,build pass
2,Verified pass

Bug: 193611228

Change-Id: Icdf1cac6e67f866f5aedfaeab4095fa2efc57959
2021-07-19 13:48:11 +08:00