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
This reverts part of the CL(ag/24741349) on 2.4 HAL file to pass 2.4
VTS. Since ag/24741349 was just for passing latest VTS on default HAL,
it's ok to keep 2.4 HAL aligned with 2.4's VTS case.
Bug: 320925606
Test: none
Change-Id: I3c5e34930925c466ef6be4209e49122af1c791f6
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)
For every request, either requestStreamBuffers fails or
handling of the requested buffer fails, always trigger
the processCaptureResult callback by notifying the request
is ready. This avoids the errors like the service side
receives fewer results than the requests and waits until
timeout.
Bug: 299182874
Test: cts
cts-tradefed run cts \
--include-filter "CtsCameraTestCases android.hardware.camera2.cts.RobustnessTest" \
--include-filter "CtsCameraTestCases android.hardware.camera2.cts.PerformanceTest" \
--include-filter "CtsCameraTestCases android.hardware.camera2.cts.StillCaptureTest" \
--include-filter "CtsCameraTestCases android.hardware.camera2.cts.SurfaceViewPreviewTest" \
--include-filter "CtsCameraTestCases android.hardware.cts.CameraGLTest" \
--include-filter "CtsCameraTestCases android.hardware.cts.LegacyCameraPerformanceTest" \
Change-Id: I86ba422524e79af6b318b50bd6eebe2cb27fa50a
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
Change-Id: I0870e90ae68a5e35196f0ba0afaa6b8bf7fbfbd8
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
After enabling HALL Buffer Management, it requires more careful
error handling and syncing. Process the buffer request error correctly.
Handle the lock and states correctly.
Bug: 299182874
Test: CTS passed, expecially
./cts-tradefed run cts -m CtsCameraTestCases -t android.hardware.camera2.cts.NativeCameraDeviceTest
./cts-tradefed run cts -m CtsCameraTestCases -t android.hardware.camera2.cts.RobustnessTest
Change-Id: I04d8e19a2ee78580e54340378122c724a3de8edb
ExternalCameraHAL supports HAL buffer management which means
cameraservice will not send it an output buffer along with the
capture request, and the HAL has the freedom to request an
output buffer when an output buffer is needed.
As a remnant of migration from HIDL to AIDL, the
ExternalCameraHAL still attempted to import buffers that
the cameraservice has sent with the CaptureRequest. However,
with HAL buffer manager enabled, this buffer is always null and
results in the HAL failing to process the capture request.
This CL removes the logic for importing output buffers when
processing capture requests from the cameraservice, and lets
the HAL call requestStreamBuffers when it needs an output buffer.
Bug: 299182874
Test: VTS Tests now pass
Change-Id: I00654836b7ae91a91a2afa4b149712977e07dcc5
Don't allow Camera HAL to send keys other than the required ones for
session characteristics.
Test: atest VtsAidlHalCameraProvider_TargetTest
Bug: 314386872
Change-Id: I3808840e0d404b4a82c8bcfc6d51eab9b171b1e9
- In metadata comments, add reference source file where details can be
found
- Fix grammar in ICameraDeviceSession.aidl comments
Bug: 318762864
Test: build
Change-Id: Id0f88aacd60e9ae444a0f6d4a9dfca67f8d75eaa
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
native_handle objects created by makeFromAidl need to be deleted
with native_handle_delete. Not doing so leads to a memory leak
every time makeFromAidl is called.
This CL ensures that native_handle_delete is called on the
return value of makeFromAidl wherever it is used.
Bug: 305638723
Test: n/a. No functional change.
Change-Id: Ia99ba6e3abbdf7dec75383450a60c944b92a9c74
AIDL's NativeHandle do not have a concept of unowned file
descriptors. If a NativeHandle object is created with an
fd, NativeHandle implicitly assumes ownership of the fd.
When passing fds over binder, ExternalCameraHAL used
makeToAidl which which accidentally transferred ownership
to the AIDL objects. Additionally, NativeHandles close
owned fds on destruction, which led to multiple closure
of fences.
This CL changes the logic to use dupToAidl to ensure that
NativeHandle objects are given ownership of a duped fds
and don't interfere with any of the fds used for internal
bookkeeping.
Bug: 313115623
Test: Verified by partner that ExternalCameraHAL no longer
double closes fds.
Change-Id: Ic406634de6f22a290abb414e80a7747927368b68
As ExternalCameraHAL does not support sensor readout timestamp,
it should set ANDROID_SENSOR_READOUT_TIMESTAMP to
ANDROID_SENSOR_READOUT_TIMESTAMP_NOT_SUPPORTED in CameraDevice
characteristics.
This CL adds the CameraMetadata entry to ExternalCameraDevice.
Bug: 309543399
Test: ReadoutTimestampTest#testReadoutTimestamp passes for
ExternalCameraHAL
Change-Id: I12203f0832416b4ca325380e671675ddc1d788d4
`readoutTimestamp` metadata key was previously only visible to
SDK and the framework, and the camera framework force set the values
based on if the HAL implemented the AIDL or the HIDL interface.
This CL makes readoutTimestamp available to HALs and lets AIDL
HALs choose if they can support sensor readout timestamp or not.
Bug: 309543399
Test: External Camera HAL now sets this value and passes VTS
Change-Id: Ifee2b4020b7630383dc32ef7590f8a9ccdaf49d2
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, HalStream.aidl - the parcelable returned by the camera HAL
for each stream configured now holds a boolean value, specifying
whether output buffers must be managed by the HAL or the camera
framework for the particular session configured.
Bug: 311263114
Test: builds
Test: Run Camera CTS on HAL supporting
ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION_SESSION_CONFIGURABLE
Test: VTS
Change-Id: Id6bda31eab3d66361991e2f883231a5a55a2ef82
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Buffer manager is used in the external camera, but the key is not included in the aidl.
Add a buffermanger key according to the key definition.
Test: Test with USB Camera
Change-Id: I8c8c35d933fecb14dcf39996c709b643db3ee3e3