Merge "Add frontend caps for CTS" into rvc-dev am: e4f2dc4874 am: 8a87a1a9b9 am: 7cca0c95ad

Change-Id: Ic45af4b24bcd938cd17eb5a732b63318bfb0466e
This commit is contained in:
TreeHugger Robot 2020-04-10 19:07:10 +00:00 committed by Automerger Merge Worker
commit 255ddf9dbf
2 changed files with 45 additions and 13 deletions

View file

@ -46,6 +46,48 @@ Tuner::Tuner() {
mFrontends[5] = new Frontend(FrontendType::ISDBT, 5, this);
mFrontends[6] = new Frontend(FrontendType::ANALOG, 6, this);
mFrontends[7] = new Frontend(FrontendType::ATSC, 7, this);
FrontendInfo::FrontendCapabilities caps;
mFrontendCaps.resize(mFrontendSize);
caps = FrontendInfo::FrontendCapabilities();
caps.dvbtCaps(FrontendDvbtCapabilities());
mFrontendCaps[0] = caps;
caps = FrontendInfo::FrontendCapabilities();
caps.atscCaps(FrontendAtscCapabilities());
mFrontendCaps[1] = caps;
caps = FrontendInfo::FrontendCapabilities();
caps.dvbcCaps(FrontendDvbcCapabilities());
mFrontendCaps[2] = caps;
caps = FrontendInfo::FrontendCapabilities();
caps.dvbsCaps(FrontendDvbsCapabilities());
mFrontendCaps[3] = caps;
caps = FrontendInfo::FrontendCapabilities();
caps.dvbtCaps(FrontendDvbtCapabilities());
mFrontendCaps[4] = caps;
caps = FrontendInfo::FrontendCapabilities();
FrontendIsdbtCapabilities isdbtCaps{
.modeCap = FrontendIsdbtMode::MODE_1 | FrontendIsdbtMode::MODE_2,
.bandwidthCap = (unsigned int)FrontendIsdbtBandwidth::BANDWIDTH_6MHZ,
.modulationCap = (unsigned int)FrontendIsdbtModulation::MOD_16QAM,
// ISDBT shares coderate and guard interval with DVBT
.coderateCap = FrontendDvbtCoderate::CODERATE_4_5 | FrontendDvbtCoderate::CODERATE_6_7,
.guardIntervalCap = (unsigned int)FrontendDvbtGuardInterval::INTERVAL_1_128,
};
caps.isdbtCaps(isdbtCaps);
mFrontendCaps[5] = caps;
caps = FrontendInfo::FrontendCapabilities();
caps.analogCaps(FrontendAnalogCapabilities());
mFrontendCaps[6] = caps;
caps = FrontendInfo::FrontendCapabilities();
caps.atscCaps(FrontendAtscCapabilities());
mFrontendCaps[7] = caps;
}
Tuner::~Tuner() {}
@ -129,20 +171,9 @@ Return<void> Tuner::getFrontendInfo(FrontendId frontendId, getFrontendInfo_cb _h
FrontendStatusType::LAYER_ERROR,
FrontendStatusType::ATSC3_PLP_INFO,
};
FrontendInfo::FrontendCapabilities frontendCaps;
FrontendIsdbtCapabilities isdbtCaps{
.modeCap = FrontendIsdbtMode::MODE_1 | FrontendIsdbtMode::MODE_2,
.bandwidthCap = (unsigned int)FrontendIsdbtBandwidth::BANDWIDTH_6MHZ,
.modulationCap = (unsigned int)FrontendIsdbtModulation::MOD_16QAM,
// ISDBT shares coderate and guard interval with DVBT
.coderateCap =
FrontendDvbtCoderate::CODERATE_4_5 | FrontendDvbtCoderate::CODERATE_6_7,
.guardIntervalCap = (unsigned int)FrontendDvbtGuardInterval::INTERVAL_1_128,
};
frontendCaps.isdbtCaps(isdbtCaps);
// assign randomly selected values for testing.
info = {
.type = FrontendType::ISDBT,
.type = mFrontends[frontendId]->getFrontendType(),
.minFrequency = 139,
.maxFrequency = 1139,
.minSymbolRate = 45,
@ -150,7 +181,7 @@ Return<void> Tuner::getFrontendInfo(FrontendId frontendId, getFrontendInfo_cb _h
.acquireRange = 30,
.exclusiveGroupId = 57,
.statusCaps = statusCaps,
.frontendCaps = frontendCaps,
.frontendCaps = mFrontendCaps[frontendId],
};
break;
}

View file

@ -68,6 +68,7 @@ class Tuner : public ITuner {
virtual ~Tuner();
// Static mFrontends array to maintain local frontends information
vector<sp<Frontend>> mFrontends;
vector<FrontendInfo::FrontendCapabilities> mFrontendCaps;
std::map<uint32_t, uint32_t> mFrontendToDemux;
std::map<uint32_t, sp<Demux>> mDemuxes;
// To maintain how many Frontends we have