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

Commit 016b7311 authored by Amy's avatar Amy
Browse files

Add DVBC/DVBS/ISDBT/ISDBS/ISDBS3/ATSC3 support default implementation

Test: manual
Bug: 135709325
Change-Id: I846c8d1f50ad636e9718cf792a29c8b076246c54
parent 0d5c8da3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ cc_defaults {
        "Descrambler.cpp",
        "Demux.cpp",
        "Tuner.cpp",
        "Lnb.cpp",
        "service.cpp",
    ],

+40 −0
Original line number Diff line number Diff line
@@ -77,6 +77,46 @@ Return<Result> Frontend::stopTune() {
    return Result::SUCCESS;
}

Return<Result> Frontend::scan(const FrontendSettings& /* settings */, FrontendScanType /* type */) {
    ALOGV("%s", __FUNCTION__);

    return Result::SUCCESS;
}

Return<Result> Frontend::stopScan() {
    ALOGV("%s", __FUNCTION__);

    return Result::SUCCESS;
}

Return<void> Frontend::getStatus(const hidl_vec<FrontendStatusType>& /* statusTypes */,
                                 getStatus_cb _hidl_cb) {
    ALOGV("%s", __FUNCTION__);

    vector<FrontendStatus> statuses;
    _hidl_cb(Result::SUCCESS, statuses);

    return Void();
}

Return<Result> Frontend::setLna(bool /* bEnable */) {
    ALOGV("%s", __FUNCTION__);

    return Result::SUCCESS;
}

Return<Result> Frontend::setLnb(const sp<ILnb>& /* lnb */) {
    ALOGV("%s", __FUNCTION__);

    return Result::SUCCESS;
}

Return<Result> Frontend::sendDiseqcMessage(const hidl_vec<uint8_t>& /* diseqcMessage */) {
    ALOGV("%s", __FUNCTION__);

    return Result::SUCCESS;
}

FrontendType Frontend::getFrontendType() {
    return mType;
}
+14 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ using ::android::hardware::tv::tuner::V1_0::Result;
class Frontend : public IFrontend {
  public:
    Frontend();

    Frontend(FrontendType type, FrontendId id);

    virtual Return<Result> close() override;
@@ -48,6 +49,19 @@ class Frontend : public IFrontend {

    virtual Return<Result> stopTune() override;

    virtual Return<Result> scan(const FrontendSettings& settings, FrontendScanType type) override;

    virtual Return<Result> stopScan() override;

    virtual Return<void> getStatus(const hidl_vec<FrontendStatusType>& statusTypes,
                                   getStatus_cb _hidl_cb) override;

    virtual Return<Result> sendDiseqcMessage(const hidl_vec<uint8_t>& diseqcMessage) override;

    virtual Return<Result> setLna(bool bEnable) override;

    virtual Return<Result> setLnb(const sp<ILnb>& lnb) override;

    FrontendType getFrontendType();

    FrontendId getFrontendId();
+62 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 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.
 */

#define LOG_TAG "android.hardware.tv.tuner@1.0-Lnb"

#include "Lnb.h"
#include <utils/Log.h>

namespace android {
namespace hardware {
namespace tv {
namespace tuner {
namespace V1_0 {
namespace implementation {

Lnb::Lnb() {}

Lnb::~Lnb() {}

Return<Result> Lnb::setVoltage(FrontendLnbVoltage /* voltage */) {
    ALOGV("%s", __FUNCTION__);

    return Result::SUCCESS;
}

Return<Result> Lnb::setTone(FrontendLnbTone /* tone */) {
    ALOGV("%s", __FUNCTION__);

    return Result::SUCCESS;
}

Return<Result> Lnb::setSatellitePosition(FrontendLnbPosition /* position */) {
    ALOGV("%s", __FUNCTION__);

    return Result::SUCCESS;
}

Return<Result> Lnb::close() {
    ALOGV("%s", __FUNCTION__);

    return Result::SUCCESS;
}

}  // namespace implementation
}  // namespace V1_0
}  // namespace tuner
}  // namespace tv
}  // namespace hardware
}  // namespace android
 No newline at end of file
+60 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 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.
 */

#ifndef ANDROID_HARDWARE_TV_TUNER_V1_0_LNB_H_
#define ANDROID_HARDWARE_TV_TUNER_V1_0_LNB_H_

#include <android/hardware/tv/tuner/1.0/ILnb.h>
#include <android/hardware/tv/tuner/1.0/ITuner.h>

using namespace std;

namespace android {
namespace hardware {
namespace tv {
namespace tuner {
namespace V1_0 {
namespace implementation {

using ::android::hardware::tv::tuner::V1_0::FrontendLnbPosition;
using ::android::hardware::tv::tuner::V1_0::FrontendLnbTone;
using ::android::hardware::tv::tuner::V1_0::FrontendLnbVoltage;
using ::android::hardware::tv::tuner::V1_0::Result;

class Lnb : public ILnb {
  public:
    Lnb();

    virtual Return<Result> setVoltage(FrontendLnbVoltage voltage);

    virtual Return<Result> setTone(FrontendLnbTone tone) override;

    virtual Return<Result> setSatellitePosition(FrontendLnbPosition position) override;

    virtual Return<Result> close() override;

  private:
    virtual ~Lnb();
};

}  // namespace implementation
}  // namespace V1_0
}  // namespace tuner
}  // namespace tv
}  // namespace hardware
}  // namespace android

#endif  // ANDROID_HARDWARE_TV_TUNER_V1_0_LNB_H_
 No newline at end of file
Loading