Merge "Enable frontend input loop when FrontendTune happens before Demux is configured." into rvc-dev am: 1fb7d06712

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11853109

Change-Id: I1aa7de7488a2753fc88b3fdc46335499b1612da0
This commit is contained in:
Amy Zhang 2020-06-12 23:37:25 +00:00 committed by Automerger Merge Worker
commit ecc7c04fd6
3 changed files with 10 additions and 1 deletions

View file

@ -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;
}
@ -272,6 +272,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

View file

@ -68,6 +68,8 @@ class Frontend : public IFrontend {
string getSourceFile();
bool isLocked();
private:
virtual ~Frontend();
bool supportsSatellite();

View file

@ -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) {