Commit graph

982 commits

Author SHA1 Message Date
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
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
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
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
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
Steven Moreland
7387c88980 Merge "cleanup camera OWNERS" 2023-01-20 20:48:35 +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
Steven Moreland
0d1d685860 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
Change-Id: I47ab60785b193764a96d7b63820c87ec4fa81f7f
2023-01-18 21:05:44 +00:00
TreeHugger Robot
5566b8e7a9 Merge changes I3e5d0cd7,I645f8164
* changes:
  External Camera HAL: Fix prefix length
  Clean up external HAL reference implementation.
2023-01-13 20:47:05 +00:00
Avichal Rakesh
915157880b External Camera HAL: Fix prefix length
The length calulation for the string "/dev/video" accidentally added one
instead of removing one for null terminated string. This CL fixes the
misplaced sign to get the correct length.

Test: Manually Tested that the length is correct.
Change-Id: I3e5d0cd7df20afdb2db61ac0963c5580722d8b24
2023-01-13 02:11:49 +00:00
Treehugger Robot
5202a42619 Merge "Limit LOG_TAG in header" am: 248026347f am: 7b33b192c0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2382934

Change-Id: I2a527654b0ab73a369b0d7ae8c3e4f990421ed01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-11 21:03:22 +00:00
Ravneet Dhanjal
eb30591704 Validate request metadata before coverting to camera metadata am: df9ea6e679
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/20918704

Change-Id: I2479b00f72ed1e9478113aed26417cd95c2bc4a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-11 00:17:03 +00:00
Steven Moreland
9c8b6b21ff Limit LOG_TAG in header
Including LOG_TAG in a header prevents any files which uses
this header from defining a LOG_TAG.

Bug: 259162245
Change-Id: I847f4b4f8898aac373db2566c745d3e73404f58a
Merged-In: I847f4b4f8898aac373db2566c745d3e73404f58a
2023-01-10 18:56:35 +00:00
TreeHugger Robot
6fbf0f9f38 Merge "Limit LOG_TAG in header" 2023-01-09 23:07:04 +00:00
Ravneet Dhanjal
df9ea6e679 Validate request metadata before coverting to camera metadata
- Backport similar fix from AIDL to HIDL to protect
from malformed metadata

Bug: 256166626
Test: CTS test
Change-Id: If8f83520144824e38ed102b7468d6d5ee2e6d963
2023-01-09 22:09:25 +00:00
Steven Moreland
93dd2a6dff Limit LOG_TAG in header
Including LOG_TAG in a header prevents any files which uses
this header from defining a LOG_TAG.

Bug: 259162245
Change-Id: I847f4b4f8898aac373db2566c745d3e73404f58a
2023-01-09 21:34:02 +00:00
Avichal Rakesh
740c256079 Clean up external HAL reference implementation.
This CL cleans up the reference external HAL implementation.
Specifically, it makes the following changes:

  - Removes mSupportBufMgr from ExternalCameraDeviceSession as it never
    needed to be used.
  - Makes ExternalCameraOfflineSession final to prevent other classes
    from accidentally inheriting from it. ExternalCameraOfflineSession
    calls the virtual function `close()` on destruction which depends on
    the implementation details of other virtual functions.

Bug: 219974678
Test: Builds successfully
Change-Id: I645f8164cd2426219943d9407f0c282c468c90d3
2023-01-05 01:51:01 -08:00
Ravneet Dhanjal
2f6f874e17 Validate request metadata before coverting to camera metadata
- Backport similar fix from AIDL to HIDL to protect
from malformed metadata

Bug: 256166626
Test: CTS test
Change-Id: If8f83520144824e38ed102b7468d6d5ee2e6d963
2023-01-04 21:06:52 +00:00
Steven Moreland
000068d6d9 specify import version (camera)
Required to automate AIDL finalization - makes errors show up
now instead of later.

Bug: 188871598
Test: build
Change-Id: Ia38678a7dbc0abc0c0d19fa0794f0f80b2638156
Merged-In: I382dea5d13582817959001246240141e83d8172d
2022-12-28 18:59:04 +00:00
Steven Moreland
945c90f7f5 Mark modules frozen explicitly (II)
Makes it easier to see which versions are available.

Bug: 188871598
Test: N/A
Merged-In: Ica76a8225fec8dc5267362cbfd43e06e65ad3f1e
Change-Id: I8c091237478e4b095ce4be280ae5d6fbcd0b7152
2022-12-23 02:33:24 +00:00
Jayant Chowdhary
2b251bbaa4 Merge "Camera: Add metadata support for cropped RAW streams." 2022-12-22 00:56:01 +00:00
Emilian Peev
8000869cb3 Camera: Add Jpeg/R stream configuration metadata
Bug: 241284696
Test: Camera CTS
Change-Id: If78cba575e3b771f5b7d49c78d50b0ca2c76744f
2022-12-16 11:09:21 -08:00
Steven Moreland
65ee297ef9 Merge "Mark modules frozen explicitly." 2022-12-12 18:27:49 +00:00
Jayant Chowdhary
de1909e865 Camera: Add metadata support for cropped RAW streams.
Bug: 247524520

Test: Camera CTS
Test: Camera VTS

Change-Id: Ie50359aca3fbbd6088e2e1525cca85c7d5eb0ad0
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2022-12-09 23:44:41 +00:00
Xin Li
34eab1cf79 Merge Android 13 QPR1
Bug: 261731544
Merged-In: I4fe9ddd1c22ebfff03f5660ec9b01de2521f8533
Change-Id: Ic59ecf4fbb0438607c4069829426fbdfa7c7abd1
2022-12-09 10:29:52 -08:00
TreeHugger Robot
4dc8e55af7 Merge "Camera: Add extension specific metadata section" 2022-12-08 18:09:56 +00:00
Steven Moreland
edff13e314 Mark modules frozen explicitly.
Makes it easier to see which versions are available.

Bug: 188871598
Test: N/A
Change-Id: Ica76a8225fec8dc5267362cbfd43e06e65ad3f1e
2022-12-08 18:02:08 +00:00
Vadim Caen
79ee3e0e97 Merge "Enable Rust backend for Camera HAL" 2022-12-07 20:15:33 +00:00
Marc Kassis
9c428fe3ed graphics.common V3 -> V4
Bug: 251177105
Test: m
Change-Id: I816b8e14a0741402090cdc4732c2a904e830ff4e
Merged-In: I1cb84ec85f98789d0737207a1661b39a25538c96
Merged-In: I2e1561f4ccb59a2a833af9a7afd07840ab2ebfa4
2022-12-07 10:53:12 +00:00
Greg Kaiser
9b77fd1272 Fix NULL check
We were checking 'info' twice and not checking 'msgs'.  So we
fix that up, and fix a typo in the message.

Bug: 219974678
Test: TreeHugger
Change-Id: Ia52178b758dc3d9753731b043da01743ff59e10c
2022-12-05 17:06:02 -08:00
Avichal Rakesh
0d2d8a4b4d Camera: Move common-helper target out of HIDL directory
This CL moves the common helper classes from inside the HIDL directory
and refactors the HIDL-esque namespaces to android style namespaces.

To preserve compatibility, the header files export the new symbols under
old namespace and the old build module exports symbols from the new
build module. This refactor is transparent to the codebase.

Also ran clangformat to appease the repohook gods.

Bug: 219974678
Test: Existing VTS tests pass on Cuttlefish
Change-Id: I8c3160497c1e2fe7a0a7155641f0e1f5e47ec32e
2022-12-01 05:09:21 -08:00
Avichal Rakesh
e1857f8dbd Migrate reference external HAL implementation to AIDL
Android T migrated the HAL interface to AIDL, but the reference HAL
was never updated to use AIDL. This CL migrates the reference
HAL implementation for external cameras to use AIDL as well. The
external HAL uses V4L2 standard to expose USB cameras to the
cameraserver.

The reference HAL implementation for internal camera was dropped
because it is not possible to write a generic HAL that works with some
large percentage of internal cameras.

Bug: 219974678
Test: Existing CTS tests pass with external camera connected.
Change-Id: I35f3dc32c16670eca7735a4ac00fed3daf36aa65
2022-12-01 05:09:18 -08:00