Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 810b1b07 authored by Jayant Chowdhary's avatar Jayant Chowdhary Committed by Automerger Merge Worker
Browse files

Merge "Delete HIDL 3.8" into tm-d1-dev am: b119e9e3

parents 177d1191 b119e9e3
Loading
Loading
Loading
Loading

camera/device/3.8/Android.bp

deleted100644 → 0
+0 −39
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen -Landroidbp.

package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "hardware_interfaces_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["hardware_interfaces_license"],
}

hidl_interface {
    name: "android.hardware.camera.device@3.8",
    root: "android.hardware",
    srcs: [
        "types.hal",
        "ICameraDevice.hal",
        "ICameraDeviceCallback.hal",
        "ICameraDeviceSession.hal",
    ],
    interfaces: [
        "android.hardware.camera.common@1.0",
        "android.hardware.camera.device@3.2",
        "android.hardware.camera.device@3.3",
        "android.hardware.camera.device@3.4",
        "android.hardware.camera.device@3.5",
        "android.hardware.camera.device@3.6",
        "android.hardware.camera.device@3.7",
        "android.hardware.camera.metadata@3.2",
        "android.hardware.camera.metadata@3.3",
        "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",
    ],
    gen_java: false,
}
+0 −122
Original line number Diff line number Diff line
/*
 * 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.7::ICameraDevice;

/**
 * Camera device interface
 *
 * Supports the android.hardware.Camera API, and the android.hardware.camera2
 * API at LIMITED or better hardware level.
 *
 * ICameraDevice.open() must return @3.2::ICameraDeviceSession,
 * @3.5::ICameraDeviceSession, @3.6::ICameraDeviceSession,
 * @3.7::ICameraDeviceSession, or @3.8::ICameraDeviceSession.
 */
interface ICameraDevice extends @3.7::ICameraDevice {
    /**
     * turnOnTorchWithStrengthLevel:
     *
     * Change the brightness level of the flash unit associated with this camera device
     * and set it to value in torchStrength. This function also turns ON the torch
     * with specified torchStrength if the torch is OFF.
     *
     * The torchStrength value must be within the valid range i.e. >=1 and
     * <= FLASH_INFO_STRENGTH_MAXIMUM_LEVEL. Whenever the torch is turned OFF,
     * the brightness level will reset to FLASH_INFO_STRENGTH_DEFAULT_LEVEL.
     * When the client calls setTorchMode(ON) after turnOnTorchWithStrengthLevel(N),
     * the flash unit will have brightness level equal to N. This level does not
     * represent the real brightness units. It is linear in nature i.e. flashlight
     * at level 10 is twice as bright as at level 5.
     *
     * @param torchStrength Brightness level to be set for the flashlight.
     *
     * @return status Status code for the operation, one of:
     *     OK:
     *         On a successful change to the torch strength level.
     *     INTERNAL_ERROR:
     *         The flash unit cannot be operated due to an unexpected internal
     *         error.
     *     CAMERA_IN_USE:
     *         This status code is returned when:
     *           - This camera device has been opened, so the torch cannot be
     *             controlled until it is closed.
     *           - Due to other camera devices being open, or due to other
     *             resource constraints, the torch cannot be controlled currently.
     *     ILLEGAL_ARGUMENT:
     *         If the torchStrength value is not within the range i.e. < 1 or
     *         > FLASH_INFO_STRENGTH_MAXIMUM_LEVEL.
     *     METHOD_NOT_SUPPORTED:
     *         This status code is returned when:
     *           - This camera device does not support direct operation of flashlight
     *             torch mode. The framework must open the camera device and turn
     *             the torch on through the device interface.
     *           - This camera device does not have a flash unit.
     *           - This camera device has flash unit but does not support torch
     *             strength control.
     *     CAMERA_DISCONNECTED:
     *         An external camera device has been disconnected, and is no longer
     *         available. This camera device interface is now stale, and a new
     *         instance must be acquired if the device is reconnected. All
     *         subsequent calls on this interface must return
     *         CAMERA_DISCONNECTED.
     *
     */
    turnOnTorchWithStrengthLevel(int32_t torchStrength) generates (Status status);

    /**
     * getTorchStrengthLevel:
     *
     * Get current torch strength level.
     * If the device supports torch strength control, when the torch is OFF the
     * strength level will reset to default level, so the return
     * value in this case will be equal to FLASH_INFO_STRENGTH_DEFAULT_LEVEL.
     *
     * @return status Status code for the operation, one of:
     *      OK:
     *           On success.
     *      INTERNAL_ERROR:
     *           An unexpected error occurred and the information is not
     *           available.
     *      METHOD_NOT_SUPPORTED:
     *          This status code is returned when:
     *            - This camera device does not support direct operation of flashlight
     *              torch mode. The framework must open the camera device and turn
     *              the torch on through the device interface.
     *            - This camera device does not have a flash unit.
     *            - This camera device has flash unit but does not support torch
     *              strength control.
     *
     * @return torchStrength Current torch strength level.
     *
     */
    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 or
     * stream use case.
     *
     */
    isStreamCombinationSupported_3_8(StreamConfiguration streams)
            generates (Status status, bool queryStatus);
};
+0 −34
Original line number Diff line number Diff line
/*
 * 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 @3.5::ICameraDeviceCallback;

/**
 * Callback methods for the HAL to call into the framework.
 */
interface ICameraDeviceCallback extends @3.5::ICameraDeviceCallback {
    /**
     * Identical to @3.5::ICameraDeviceCallback.notify, except that it takes a
     * list of @3.8::NotifyMsg which contain readout timestamp in addition
     * to exposure start timestamp for shutter.
     *
     * The readout timestamp is used for the framework to re-time the viewfinder
     * frames targeted for SurfaceView so that preview jitter can be reduced.
     */
    notify_3_8(vec<NotifyMsg> msgs);
};
+0 −98
Original line number Diff line number Diff line
/*
 * 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.
     * - The requestedConfiguration allows the camera framework to configure
     *   stream use cases.
     *
     * @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.
     *           - Unsupported stream use case
     *         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);
};

camera/device/3.8/types.hal

deleted100644 → 0
+0 −157
Original line number Diff line number Diff line
/*
 * 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 @3.2::ErrorMsg;
import @3.2::CameraMetadata;
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;
import android.hardware.camera.metadata@3.8::CameraMetadataEnumAndroidScalerAvailableStreamUseCases;

/**
 * ShutterMsg:
 *
 * Message contents for MsgType::SHUTTER
 *
 * This version extends the @3.2 ShutterMsg with the readout timestamp.
 */
struct ShutterMsg {
    /**
     * The definition of ShutterMsg from prior version.
     */
    @3.2::ShutterMsg v3_2;

    /**
     * Timestamp for the capture readout. This must be in the same time domain
     * as v3_2.timestamp, and for a rolling shutter sensor, the value must be
     * v3_2.timestamp + exposureTime + t_crop_top where t_crop_top is the exposure time
     * skew of the cropped lines on the top.
     */
    uint64_t readoutTimestamp;
};

/**
 * NotifyMsg:
 *
 * The message structure sent to ICameraDevice3Callback::notify()
 *
 * This version extends the @3.2 NotifyMsg with the @3.8 version of ShutterMsg.
 */
struct NotifyMsg {
    /**
     * The message type.
     */
    @3.2::MsgType type;

    union Message {
        /**
         * Error message contents. Valid if type is MsgType::ERROR
         */
        @3.2::ErrorMsg error;

        /**
         * Shutter message contents. Valid if type is MsgType::SHUTTER
         */
        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 and the
 * stream use case 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;

    /**
     * The stream use case describing the stream's purpose
     *
     * This flag provides the camera device a hint on what user scenario this
     * stream is intended for. With this flag, the camera device can optimize
     * camera pipeline parameters, such as tuning, sensor mode, and ISP settings,
     * for the intended use case.
     *
     * When this field is set to DEFAULT, the camera device should behave in
     * the same way as in previous HAL versions, and optimize the camera pipeline
     * based on stream format, data space, usage flag, and other stream properties.
     *
     * The HAL reports supported stream use cases in
     * ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES. If the HAL doesn't support
     * setting stream use cases, the camera framework leaves this field as
     * DEFAULT.
     */
    CameraMetadataEnumAndroidScalerAvailableStreamUseCases useCase;
};

/**
 * 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;

    /**
     * The definition of multi-resolution input image flag from prior version.
     */
    bool multiResolutionInputImage;
};
Loading