diff options
author | Haamed Gheibi <haamed@google.com> | 2022-02-04 13:47:26 -0800 |
---|---|---|
committer | Haamed Gheibi <haamed@google.com> | 2022-02-04 13:55:47 -0800 |
commit | f99b35c293439db0b7436b47b939eb8c7bf21b51 (patch) | |
tree | 6cd9b0719554809447c845616317cca5409b93ae /camera/device | |
parent | a028272dee9220e6810cbdcfb2328c34f8afe4c2 (diff) | |
parent | 332dead340bb196c6ba3f6978e8fb53966c74bf7 (diff) |
Merge TP1A.220120.003
Change-Id: Ie5eba313ee102e452f5f96942ed2f3a7bb4e8f01
Diffstat (limited to 'camera/device')
-rw-r--r-- | camera/device/3.8/Android.bp | 3 | ||||
-rw-r--r-- | camera/device/3.8/ICameraDevice.hal | 15 | ||||
-rw-r--r-- | camera/device/3.8/ICameraDeviceSession.hal | 95 | ||||
-rw-r--r-- | camera/device/3.8/types.hal | 77 |
4 files changed, 187 insertions, 3 deletions
diff --git a/camera/device/3.8/Android.bp b/camera/device/3.8/Android.bp index 2a1f215023..c3c29416a9 100644 --- a/camera/device/3.8/Android.bp +++ b/camera/device/3.8/Android.bp @@ -9,7 +9,6 @@ package { default_applicable_licenses: ["hardware_interfaces_license"], } - hidl_interface { name: "android.hardware.camera.device@3.8", root: "android.hardware", @@ -17,6 +16,7 @@ hidl_interface { "types.hal", "ICameraDevice.hal", "ICameraDeviceCallback.hal", + "ICameraDeviceSession.hal", ], interfaces: [ "android.hardware.camera.common@1.0", @@ -31,6 +31,7 @@ hidl_interface { "android.hardware.camera.metadata@3.4", "android.hardware.camera.metadata@3.5", "android.hardware.camera.metadata@3.6", + "android.hardware.camera.metadata@3.8", "android.hardware.graphics.common@1.0", "android.hidl.base@1.0", ], diff --git a/camera/device/3.8/ICameraDevice.hal b/camera/device/3.8/ICameraDevice.hal index 1101819a4d..8832c68098 100644 --- a/camera/device/3.8/ICameraDevice.hal +++ b/camera/device/3.8/ICameraDevice.hal @@ -26,8 +26,8 @@ import @3.7::ICameraDevice; * API at LIMITED or better hardware level. * * ICameraDevice.open() must return @3.2::ICameraDeviceSession, - * @3.5::ICameraDeviceSession, @3.6::ICameraDeviceSession, or - * @3.7::ICameraDeviceSession. + * @3.5::ICameraDeviceSession, @3.6::ICameraDeviceSession, + * @3.7::ICameraDeviceSession, or @3.8::ICameraDeviceSession. */ interface ICameraDevice extends @3.7::ICameraDevice { /** @@ -107,4 +107,15 @@ interface ICameraDevice extends @3.7::ICameraDevice { * */ getTorchStrengthLevel() generates (Status status, int32_t torchStrength); + + /** + * isStreamCombinationSupported_3_8: + * + * Identical to @3.7::ICameraDevice.isStreamCombinationSupported, except + * that it takes a @3.8::StreamConfiguration parameter, which could contain + * additional information about a specific 10-bit dynamic range profile. + * + */ + isStreamCombinationSupported_3_8(StreamConfiguration streams) + generates (Status status, bool queryStatus); }; diff --git a/camera/device/3.8/ICameraDeviceSession.hal b/camera/device/3.8/ICameraDeviceSession.hal new file mode 100644 index 0000000000..88e4338209 --- /dev/null +++ b/camera/device/3.8/ICameraDeviceSession.hal @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.hardware.camera.device@3.8; + +import android.hardware.camera.common@1.0::Status; +import @3.5::StreamConfiguration; +import @3.7::ICameraDeviceSession; +import @3.6::HalStreamConfiguration; + +/** + * Camera device active session interface. + * + * Obtained via ICameraDevice::open(), this interface contains the methods to + * configure and request captures from an active camera device. + */ +interface ICameraDeviceSession extends @3.7::ICameraDeviceSession { + /** + * configureStreams_3_8: + * + * Identical to @3.7::ICameraDeviceSession.configureStreams_3_7, except that: + * + * - The requestedConfiguration allows the camera framework to configure + * 10-bit dynamic range profile. + * + * @return status Status code for the operation, one of: + * OK: + * On successful stream configuration. + * INTERNAL_ERROR: + * If there has been a fatal error and the device is no longer + * operational. Only close() can be called successfully by the + * framework after this error is returned. + * ILLEGAL_ARGUMENT: + * If the requested stream configuration is invalid. Some examples + * of invalid stream configurations include: + * - Including more than 1 INPUT stream + * - Not including any OUTPUT streams + * - Including streams with unsupported formats, or an unsupported + * size for that format. + * - Including too many output streams of a certain format. + * - Unsupported rotation configuration + * - Stream sizes/formats don't satisfy the + * StreamConfigurationMode requirements + * for non-NORMAL mode, or the requested operation_mode is not + * supported by the HAL. + * - Unsupported usage flag + * - Unsupported stream groupIds, or unsupported multi-resolution + * input stream. + * - Invalid combination between a 10-bit dynamic range profile + * and none impl. defined 8-bit format for a particular stream. + * The camera service cannot filter out all possible illegal stream + * configurations, since some devices may support more simultaneous + * streams or larger stream resolutions than the minimum required + * for a given camera device hardware level. The HAL must return an + * ILLEGAL_ARGUMENT for any unsupported stream set, and then be + * ready to accept a future valid stream configuration in a later + * configureStreams call. + * @return halConfiguration The stream parameters desired by the HAL for + * each stream, including maximum buffers, the usage flags, and the + * override format and dataspace. + */ + configureStreams_3_8(StreamConfiguration requestedConfiguration) + generates (Status status, @3.6::HalStreamConfiguration halConfiguration); + + /** + * repeatingRequestEnd: + * + * Notification about the last frame number in a repeating request along with the + * ids of all streams included in the repeating request. + * + * This can be called at any point after 'processCaptureRequest' in response + * to camera clients disabling an active repeating request. + * + * Performance requirements: + * The call must not be blocked for extensive periods and should be extremely lightweight. There + * must be no frame rate degradation or frame jitter introduced. + * + * This method must always succeed, even if the device has encountered a + * serious error. + */ + repeatingRequestEnd(uint32_t frameNumber, vec<int32_t> streamIds); +}; diff --git a/camera/device/3.8/types.hal b/camera/device/3.8/types.hal index 843d050bb2..9d1ac22f5a 100644 --- a/camera/device/3.8/types.hal +++ b/camera/device/3.8/types.hal @@ -19,6 +19,11 @@ package android.hardware.camera.device@3.8; import @3.2::ErrorMsg; import @3.2::MsgType; import @3.2::ShutterMsg; +import @3.2::CameraMetadata; +import @3.2::StreamConfigurationMode; +import @3.7::Stream; + +import android.hardware.camera.metadata@3.8::CameraMetadataEnumAndroidRequestAvailableDynamicRangeProfilesMap; /** * ShutterMsg: @@ -67,3 +72,75 @@ struct NotifyMsg { ShutterMsg shutter; } msg; }; + +/** + * Stream: + * + * A descriptor for a single camera input or output stream. A stream is defined + * by the framework by its buffer resolution and format, and additionally by the + * HAL with the gralloc usage flags and the maximum in-flight buffer count. + * + * This version extends the @3.7 Stream with the dynamic range profile field. + */ +struct Stream { + /** + * The definition of Stream from the prior version. + */ + @3.7::Stream v3_7; + + /** + * The dynamic range profile for this stream. + * + * This field is valid and must only be considered for streams with format + * android.hardware.graphics.common.PixelFormat.YCBCR_P010 or + * android.hardware.graphics.common.PixelFormat.IMPLEMENTATION_DEFINED on devices supporting the + * ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_10_BIT capability. + * + */ + CameraMetadataEnumAndroidRequestAvailableDynamicRangeProfilesMap dynamicRangeProfile; +}; + +/** + * StreamConfiguration: + * + * Identical to @3.7::StreamConfiguration, except that the streams + * vector contains @3.8::Stream. + */ +struct StreamConfiguration { + /** + * An array of camera stream pointers, defining the input/output + * configuration for the camera HAL device. + */ + vec<Stream> streams; + + /** + * The definition of operation mode from prior version. + * + */ + @3.2::StreamConfigurationMode operationMode; + + /** + * The definition of session parameters from prior version. + */ + @3.2::CameraMetadata sessionParams; + + /** + * The definition of stream configuration counter from prior version. + */ + uint32_t streamConfigCounter; + + /** + * If an input stream is configured, whether the input stream is expected to + * receive variable resolution images. + * + * This flag can only be set to true if the camera device supports + * multi-resolution input streams by advertising input stream configurations in + * physicalCameraMultiResolutionStreamConfigurations in its physical cameras' + * characteristics. + * + * When this flag is set to true, the input stream's width and height can be + * any one of the supported multi-resolution input stream sizes. + */ + bool multiResolutionInputImage; +}; + |