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

Commit e0422236 authored by Amy Zhang's avatar Amy Zhang
Browse files

Enable frontend input loop when FrontendTune happens before Demux is

configured.

Test: atest VtsHalTvTunerV1_0TargetTest
Bug: 153366959
Change-Id: I6fa98e367a7530e308ea2a74e7efeb6ed4d3a56b
parent 0e6850ee
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ Return<Result> Frontend::tune(const FrontendSettings& /* settings */) {

    mTunerService->frontendStartTune(mId);
    mCallback->onEvent(FrontendEventType::LOCKED);
    mIsLocked = false;
    mIsLocked = true;
    return Result::SUCCESS;
}

@@ -276,6 +276,10 @@ bool Frontend::supportsSatellite() {
    return mType == FrontendType::DVBS || mType == FrontendType::ISDBS ||
           mType == FrontendType::ISDBS3;
}

bool Frontend::isLocked() {
    return mIsLocked;
}
}  // namespace implementation
}  // namespace V1_0
}  // namespace tuner
+2 −0
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ class Frontend : public IFrontend {

    string getSourceFile();

    bool isLocked();

  private:
    virtual ~Frontend();
    bool supportsSatellite();
+3 −0
Original line number Diff line number Diff line
@@ -231,6 +231,9 @@ Return<void> Tuner::openLnbByName(const hidl_string& /*lnbName*/, openLnbByName_

void Tuner::setFrontendAsDemuxSource(uint32_t frontendId, uint32_t demuxId) {
    mFrontendToDemux[frontendId] = demuxId;
    if (mFrontends[frontendId] != nullptr && mFrontends[frontendId]->isLocked()) {
        mDemuxes[demuxId]->startFrontendInputLoop();
    }
}

void Tuner::frontendStopTune(uint32_t frontendId) {