getSessionCharacteristics test needs to be gated by HAL version.
Bug: 339233213
Test: vendor testing
Change-Id: Ib611ec64089eecab99f3b82c6c7c2826cfdb62c5
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>
Based on social media app usage, trim required stream combination
queries.
Test: Build
Bug: 314229449
Change-Id: I3c48988c7a8598c1d3a091cf32e00360e6609156
Includes LENS_POSE_AUTOMOTIVE as a valid lens_pose_reference value for vts tests.
Bug: 315076224
Test: atest VtsHalCameraProvider
Change-Id: Iafb7963cb828e1b40308fddd6ab417f8bc0c2115
jpeglib expects height and width of Y component to be an integral
multiple of 2*DCTSIZE, and heights and widths of Cb and Cr components
to be an integral multiple of DCTSIZE. If the image size does not
meet this requirement, libjpeg expects its input to be padded to
meet the constraints.
The current implementation of AllocatedFrame::allocate did not consider
this padding when allocating buffers. This could lead to crashes when
attempting to call libjpeg functions on images with dimensions that
are _not_ an exact multiple of 2*DCTSIZE (=16), for example: 424x240.
This CL ensures that the allocated buffer is padded such that libjpeg
never attempts to access unallocated buffer.
Bug: 333961771
Test: Verified that the HAL no longer crashes for certain resolutions.
Change-Id: I05b5f3390385ad005481141312a2e3e281433f7a
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" \
Merged-in: I86ba422524e79af6b318b50bd6eebe2cb27fa50a
Change-Id: I86ba422524e79af6b318b50bd6eebe2cb27fa50a
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
Merged-in: I04d8e19a2ee78580e54340378122c724a3de8edb
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
Merged-in: I00654836b7ae91a91a2afa4b149712977e07dcc5
Change-Id: I00654836b7ae91a91a2afa4b149712977e07dcc5
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.
Merged-in: Ia99ba6e3abbdf7dec75383450a60c944b92a9c74
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.
Merged-In: Ic406634de6f22a290abb414e80a7747927368b68
Change-Id: Ic406634de6f22a290abb414e80a7747927368b68
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>