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

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

Merge changes from topic "cec_hal_11" into sc-dev

* changes:
  Add VTS for tv.cec@1.1
  Add default implementation for tv.cec@1.1
  Add CEC HAL v1.1 to compatibility matrix
  Add TV CEC HAL v1.1
parents 55c20af0 ad7fb5ce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -561,7 +561,7 @@
    </hal>
    <hal format="hidl" optional="true">
        <name>android.hardware.tv.cec</name>
        <version>1.0</version>
        <version>1.0-1</version>
        <interface>
            <name>IHdmiCec</name>
            <instance>default</instance>

tv/cec/1.1/Android.bp

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

hidl_interface {
    name: "android.hardware.tv.cec@1.1",
    root: "android.hardware",
    srcs: [
        "types.hal",
        "IHdmiCec.hal",
        "IHdmiCecCallback.hal",
    ],
    interfaces: [
        "android.hardware.tv.cec@1.0",
        "android.hidl.base@1.0",
    ],
    gen_java: true,
}
+70 −0
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.tv.cec@1.1;

import @1.0::IHdmiCec;
import @1.0::Result;
import @1.0::SendMessageResult;

import IHdmiCecCallback;

/**
 * HDMI-CEC HAL interface definition.
 */
interface IHdmiCec extends @1.0::IHdmiCec {
    /**
     * Passes the logical address that must be used in this system.
     *
     * HAL must use it to configure the hardware so that the CEC commands
     * addressed the given logical address can be filtered in. This method must
     * be able to be called as many times as necessary in order to support
     * multiple logical devices.
     *
     * @param addr Logical address that must be used in this system. It must be
     *        in the range of valid logical addresses for the call to succeed.
     * @return result Result status of the operation. SUCCESS if successful,
     *         FAILURE_INVALID_ARGS if the given logical address is invalid,
     *         FAILURE_BUSY if device or resource is busy
     */
    addLogicalAddress_1_1(CecLogicalAddress addr) generates (Result result);

    /**
     * Transmits HDMI-CEC message to other HDMI device.
     *
     * The method must be designed to return in a certain amount of time and not
     * hanging forever which may happen if CEC signal line is pulled low for
     * some reason.
     *
     * It must try retransmission at least once as specified in the section '7.1
     * Frame Re-transmissions' of the CEC Spec 1.4b.
     *
     * @param message CEC message to be sent to other HDMI device.
     * @return result Result status of the operation. SUCCESS if successful,
     *         NACK if the sent message is not acknowledged,
     *         BUSY if the CEC bus is busy.
     */
    sendMessage_1_1(CecMessage message) generates (SendMessageResult result);

    /**
     * Sets a callback that HDMI-CEC HAL must later use for incoming CEC
     * messages or internal HDMI events.
     *
     * @param callback Callback object to pass hdmi events to the system. The
     *        previously registered callback must be replaced with this one.
     */
    setCallback_1_1(IHdmiCecCallback callback);
};
+30 −0
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.tv.cec@1.1;

import @1.0::IHdmiCecCallback;

/**
 * Callbacks from the HAL implementation to notify the system of new events.
 */
interface IHdmiCecCallback extends @1.0::IHdmiCecCallback {
    /**
     * The callback function that must be called by HAL implementation to notify
     * the system of new CEC message arrival.
     */
    oneway onCecMessage_1_1(CecMessage message);
};
+23 −0
Original line number Diff line number Diff line
cc_binary {
    name: "android.hardware.tv.cec@1.1-service",
    defaults: ["hidl_defaults"],
    vintf_fragments: ["android.hardware.tv.cec@1.1-service.xml"],
    relative_install_path: "hw",
    vendor: true,
    init_rc: ["android.hardware.tv.cec@1.1-service.rc"],
    srcs: [
        "serviceMock.cpp",
        "HdmiCecMock.cpp",
    ],

    shared_libs: [
        "liblog",
        "libcutils",
        "libbase",
        "libutils",
        "libhardware",
        "libhidlbase",
        "android.hardware.tv.cec@1.0",
        "android.hardware.tv.cec@1.1",
    ],
}
Loading