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

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

Merge "Support Link/Unlink Cicam to Frontend in Tuner HAL 1.1"

parents 5e99cbaf e8a57377
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -77,11 +77,22 @@ interface IFrontend extends @1.0::IFrontend {
     * directly from the frontend.
     *
     * @param ciCamId specify CI-CAM Id to link.
     * @return ltsId Local Transport Stream Id.
     * @return result Result status of the operation.
     *         SUCCESS if successful,
     *         UNKNOWN_ERROR if failed for other reasons.
     */
    linkCiCam(uint32_t ciCamId) generates (Result result);
    linkCiCam(uint32_t ciCamId) generates (Result result, uint32_t ltsId);

    /**
     * Unlink Conditional Access Modules (CAM) to Frontend.
     *
     * @param ciCamId specify CI-CAM Id to unlink.
     * @return result Result status of the operation.
     *         SUCCESS if successful,
     *         UNKNOWN_ERROR if failed for other reasons.
     */
    unlinkCiCam(uint32_t ciCamId) generates (Result result);

    /**
     * Get the v1_1 extended statuses of the frontend.
+10 −1
Original line number Diff line number Diff line
@@ -364,10 +364,19 @@ Return<Result> Frontend::setLnb(uint32_t /* lnb */) {
    return Result::SUCCESS;
}

Return<Result> Frontend::linkCiCam(uint32_t ciCamId) {
Return<void> Frontend::linkCiCam(uint32_t ciCamId, linkCiCam_cb _hidl_cb) {
    ALOGV("%s", __FUNCTION__);

    mCiCamId = ciCamId;
    _hidl_cb(Result::SUCCESS, 0 /*ltsId*/);

    return Void();
}

Return<Result> Frontend::unlinkCiCam(uint32_t /*ciCamId*/) {
    ALOGV("%s", __FUNCTION__);

    mCiCamId = -1;

    return Result::SUCCESS;
}
+3 −1
Original line number Diff line number Diff line
@@ -66,7 +66,9 @@ class Frontend : public V1_1::IFrontend {

    virtual Return<Result> setLnb(uint32_t lnb) override;

    virtual Return<Result> linkCiCam(uint32_t ciCamId) override;
    virtual Return<void> linkCiCam(uint32_t ciCamId, linkCiCam_cb _hidl_cb) override;

    virtual Return<Result> unlinkCiCam(uint32_t ciCamId) override;

    FrontendType getFrontendType();

+5 −0
Original line number Diff line number Diff line
@@ -58,6 +58,11 @@ enum Constant : @1.0::Constant {
     * be used to reset the configured ip context id.
     */
    INVALID_IP_FILTER_CONTEXT_ID = 0xFFFFFFFF,
    /**
     * An invalid local transport stream id used as the return value on a failed operation of
     * IFrontend.linkCiCam.
     */
    INVALID_LTS_ID = 0xFFFFFFFF,
};

@export