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

Commit a2c5f936 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Camera: Add new minor revision camera.device@3.3" into oc-mr1-dev

parents 1f88a5dc d09e5651
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ subdirs = [
    "device/1.0/default",
    "device/3.2",
    "device/3.2/default",
    "device/3.3",
    "metadata/3.2",
    "provider/2.4",
    "provider/2.4/default",
+72 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen. Do not edit manually.

filegroup {
    name: "android.hardware.camera.device@3.3_hal",
    srcs: [
        "types.hal",
        "ICameraDeviceSession.hal",
    ],
}

genrule {
    name: "android.hardware.camera.device@3.3_genc++",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.3",
    srcs: [
        ":android.hardware.camera.device@3.3_hal",
    ],
    out: [
        "android/hardware/camera/device/3.3/types.cpp",
        "android/hardware/camera/device/3.3/CameraDeviceSessionAll.cpp",
    ],
}

genrule {
    name: "android.hardware.camera.device@3.3_genc++_headers",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.camera.device@3.3",
    srcs: [
        ":android.hardware.camera.device@3.3_hal",
    ],
    out: [
        "android/hardware/camera/device/3.3/types.h",
        "android/hardware/camera/device/3.3/hwtypes.h",
        "android/hardware/camera/device/3.3/ICameraDeviceSession.h",
        "android/hardware/camera/device/3.3/IHwCameraDeviceSession.h",
        "android/hardware/camera/device/3.3/BnHwCameraDeviceSession.h",
        "android/hardware/camera/device/3.3/BpHwCameraDeviceSession.h",
        "android/hardware/camera/device/3.3/BsCameraDeviceSession.h",
    ],
}

cc_library {
    name: "android.hardware.camera.device@3.3",
    defaults: ["hidl-module-defaults"],
    generated_sources: ["android.hardware.camera.device@3.3_genc++"],
    generated_headers: ["android.hardware.camera.device@3.3_genc++_headers"],
    export_generated_headers: ["android.hardware.camera.device@3.3_genc++_headers"],
    vendor_available: true,
    vndk: {
        enabled: true,
    },
    shared_libs: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "liblog",
        "libutils",
        "libcutils",
        "android.hardware.camera.common@1.0",
        "android.hardware.camera.device@3.2",
        "android.hardware.graphics.common@1.0",
    ],
    export_shared_lib_headers: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "libutils",
        "android.hardware.camera.common@1.0",
        "android.hardware.camera.device@3.2",
        "android.hardware.graphics.common@1.0",
    ],
}
+50 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.3;

import android.hardware.camera.common@1.0::Status;
import android.hardware.camera.device@3.2::ICameraDeviceSession;
import android.hardware.camera.device@3.2::StreamConfiguration;

/**
 * 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.2::ICameraDeviceSession {

    /**
     * configureStreams_3_3:
     *
     * Identical to @3.2::ICameraDeviceSession.configureStreams, except that:
     *
     * - The output HalStreamConfiguration now contains an overrideDataspace
     *   field, to be used by the HAL to select a different dataspace for some
     *   use cases when dealing with the IMPLEMENTATION_DEFINED pixel format.
     *
     * Clients may invoke either this method or
     * @3.2::ICameraDeviceSession.configureStreams() for stream configuration.
     * This method is recommended for clients to use since it provides more
     * flexibility.
     */
    configureStreams_3_3(StreamConfiguration requestedConfiguration)
            generates (Status status,
                    @3.3::HalStreamConfiguration halConfiguration);

};
+57 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.3;

import android.hardware.camera.device@3.2::DataspaceFlags;
import android.hardware.camera.device@3.2::HalStream;

/**
 * HalStream:
 *
 * The camera HAL's response to each requested stream configuration.
 *
 * This version extends the @3.2 HalStream with the overrideDataspace
 * field
 */
struct HalStream {
    /**
     * The definition of HalStream from the prior version.
     */
    @3.2::HalStream v3_2;

    /**
     * An override dataSpace for the buffers in this stream.
     *
     * The HAL must respect the requested dataSpace in Stream unless it is
     * IMPLEMENTATION_DEFINED, in which case the override dataSpace here must be
     * used by the client instead, for this stream. This allows cross-platform
     * HALs to use a specific dataSpace since IMPLEMENTATION_DEFINED formats often
     * require device-specific information for correct selection. In all other cases, the
     * overrideFormat must match the requested format.
     */
    DataspaceFlags overrideDataSpace;
};

/**
 * HalStreamConfiguration:
 *
 * Identical to @3.2::HalStreamConfiguration, except that it contains @3.3::HalStream entries.
 *
 */
struct HalStreamConfiguration {
    vec<HalStream> streams;
};
+13 −0
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@ support for ICameraDevice@1.0 will be removed with the Android R release.
This HAL interface version only allows support at the LEGACY level for the
android.hardware.camera2 API.

Added in Android 8.0.

Subsidiary HALs:

#### ICameraDevice1PreviewCallback.hal@1.0:
@@ -62,6 +64,8 @@ The open() method actually opens the camera device for use, returning a Session
interface for operating the active camera. It takes a Callback interface as an
argument.

Added in Android 8.0.

Subsidiary HALs:

#### ICameraDevice3Session.hal@3.2:
@@ -74,3 +78,12 @@ capture requests to it.

Callback interface for sending completed captures and other asynchronous events
from tehe HAL to the client.

### ICameraDevice.hal@3.3:

A minor revision to the ICameraDevice.hal@3.2.

  - Adds support for overriding the output dataspace of a stream, which was
    supported in the legacy camera HAL.

Added in Android 8.1.