Commit graph

847 commits

Author SHA1 Message Date
Greg Kaiser
754fcb8c33 Avoid multiple map lookups
We directly use erase(), and its return value, so we only need
to look up 'deviceName' once.

Test: TreeHugger
Bug: 191248460
Change-Id: I7c229e7d1de5f76071f55f965eab447b6c868bcc
2022-01-21 07:00:25 -08:00
Iavor-Valentin Iftime
cd3e66327f Merge "Add external lazy camera provider 2.7" 2022-01-20 16:48:21 +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
Valentin Iftime
23d32a1fc3 Add external lazy camera provider 2.7
Add default implementation for external camera
 provider with lazy HAL support v2.7.

 Test configuration for devices:
 PRODUCT_PACKAGES += android.hardware.camera.provider@2.7-impl
 PRODUCT_PACKAGES += android.hardware.camera.provider@2.7-external-service-lazy
 PRODUCT_PROPERTY_OVERRIDES += ro.camera.enableLazyHal=true

Test: atest CtsCameraTestCases
      atest VtsHalCameraProviderV2_4TargetTest

Bug: 191248460

Change-Id: I57c8130d7c331028eff35dc68e360fdd8d8c32e2
2021-12-27 18:59:47 +01: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
Rucha Katakwar
f67194b6ee Merge "Camera: Update torch strength control API name." 2021-11-22 18:44:01 +00:00
Rucha Katakwar
ba757a0f44 Camera: Update torch strength control API name.
bug: 200174275
Change-Id: I0934d0181a58ae37f1c8d094295329d8126fb90a
2021-11-18 17:22:12 -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
Bob Badour
ce854e5605 [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  camera/metadata/3.7/Android.bp
  camera/metadata/3.8/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I31cece41e97d4b6cc8e425c05ba84d94b6b59065
2021-11-11 17:25:08 -08:00
Jayant Chowdhary
71d51acb33 Merge "Add CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION to allow for better preview stabilization." 2021-11-05 17:01:26 +00:00
Shuzhen Wang
8d7222335e Camera: VTS for test_pattern tag requirement for physical camera am: 5ee43a6d24 am: dcfd36a1ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16175076

Change-Id: I6c39ce56fce986b6121f1c479551240dfbd709e5
2021-11-04 21:04:26 +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
6d6f21dd42 Merge "VtsHalCameraProviderV2_4TargetTest: Override rotate&crop" into sc-v2-dev am: 3c2ebae81c am: f51c54566f
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16144607

Change-Id: I2b8901f212176dda1904a2ef4458a13d7152d427
2021-11-02 19:40:23 +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
4aec71e7ff Camera: Adjust VTS test to relax multi-camera requirement am: dc6da704ed am: 0e9dcbff44
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16149860

Change-Id: I6a3768b5f7ddd5233aaba81bddb43a511ffb54cf
2021-10-29 20:18:06 +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
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
Jayant Chowdhary
763d122fd2 Add CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION to allow for better preview stabilization.
Add CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION. This CaptureRequest key may be
advertised by devices which can support applying the same quality of
stabilization to preview and other non-RAW streams. This helps clients
achieve a what you see is what you get effect.

Bug: 170230992

Test: builds

Change-Id: I6e115f5b98cdb07ba20055c2a1fba9cdad7e595c
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-10-27 17:26:03 +00:00
Rucha Katakwar
abe080d6e3 Camera: Add torch brightness control keys.
1.FLASH_INFO_STRENGTH_MAXIMUM_LEVEL : Number of brightness levels.
2.FLASH_INFO_STRENGTH_DEFAULT_LEVEL : Default brightness level to be set
via setTorchBrightnessLevel API.

bug: 200174275
Change-Id: Iab35bc3cbc8c8ede0b1729f45be4b8ba1b3fed78
2021-10-14 11:59:18 -07:00
TreeHugger Robot
43720ae394 Merge "Merge "Camera: Add static metadata that can map device state to orientation" into sc-v2-dev am: 6621c1ad05" into sc-v2-dev-plus-aosp am: 11ac9efa38
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16010600

Change-Id: Idc7d3f7b531569dbabeb5d83483b2ae1f5f49aec
2021-10-08 06:20:28 +00: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
ac42a9f702 Merge "Camera: VTS: Set proper dataSpace for reprocessing test" into stage-aosp-sc-ts-dev am: 6b94d29f51 am: 7a0dff7492 am: 0770d4ce06
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15874436

Change-Id: I2d2803f103c14ebcd2c727c9043a24e8bd20b544
2021-09-21 20:46:18 +00: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
Android Build Prod User
9a78d09ce5 Merge "Enable mute test pattern for external cameras" 2021-08-26 10:20:35 +00:00
Valentin Iftime
bf33bcb35c Enable mute test pattern for external cameras
Add ANDROID_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR as an available
 test pattern for ExternalCameraDevice (v3.4).

Bug: 182204067
Test: Connect an USB camera.
 Enable camera privacy toggle.
 Apps using the camera should get a black preview
Change-Id: Ie0d4d5b3f555eb9e1b1fc255b612668736daeaa4
2021-08-26 11:10:46 +02: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
Jayant Chowdhary
b4d21c8e80 Merge "camera: Clarify that ANDROID_JPEG_MAX_SIZE applies to default sensor pixel mode." into sc-dev 2021-07-13 23:22:55 +00:00
Jayant Chowdhary
36f01d9083 camera: Clarify that ANDROID_JPEG_MAX_SIZE applies to default sensor pixel mode.
Bug: 193346383

Test: builds

Change-Id: I451e4a8da7598f878f8fa5024e6bda5d8dbb1868
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-07-12 15:34:09 -07:00
TreeHugger Robot
4987850cc5 Merge "Camera: Add logical camera requirement test for GVF" into sc-dev 2021-07-08 21:43:43 +00:00
Shuzhen Wang
3ed299dfca Camera: Add logical camera requirement test for GVF
The test verifies that if more than one color camera is available for a
particular facing, a logical mulit-camera must be supported consisting
all color cameras facing that direction.

Test: Run VTS test on Pixel4 and cuttlefish emulator
Bug: 178633246
Change-Id: I7b02a4057064a7f4a236c1bbc49f768ac80232cf
2021-07-08 11:03:24 -07:00
Shuzhen Wang
753a594aec Camera: Fix a typo in the 3.7 device comment
Test: Build
Bug: 192701691
Change-Id: Iba9ce48fc7e50bf632e93408072c89d3eb74ab99
2021-07-03 00:07:37 +00:00
TreeHugger Robot
0dd1d3909f Merge "Camera: Add framework-only enum value to test pattern mode" into sc-dev 2021-06-15 17:29:24 +00:00
Eino-Ville Talvala
6d3fa0a331 Camera: Add framework-only enum value to test pattern mode
Adding TEST_PATTERN_MODE_BLACK to support the new sensor privacy
feature on more limited-capability camera implementations.

Also updating older docs due to an API being moved to public.

Test: Camera CTS continues to pass
Bug: 189507251
Change-Id: I043d011ad43070d6c402cdffbff3d2e9b70ffd7b
2021-05-27 17:36:54 -07:00
Cliff Wu
ee49e56f26 [VTS] Add test cases for ICameraInjectionSession.hal
- Add test cases for ICameraInjectionSession.hal in VtsHalCameraProviderV2_4TargetTest.

Bug: 171024665
Test: Camera VTS
Change-Id: I5c16cc090b8bf0072163fbc928f4180d60c4206d
2021-05-27 07:00:05 +00:00
Emilian Peev
6a2572b7ea Camera: Add support for single plane stride queries
Allow buffer mapper clients to query the current buffer
stride of the first plane.

Bug: 188992806
Test: Camera CTS
Change-Id: I503ad8ae2e144405f0f365636210275f8e56ae82
2021-05-25 16:55:11 -07:00