mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 22:04:26 +00:00
Support not tuned PLP info query.
Bug: 209762260 Test: atest VtsHalTvTunerTargetTest Change-Id: Iefc02ae7f4145cfabae8c5a5d60f28ef02ec9bc0
This commit is contained in:
@@ -76,4 +76,5 @@ union FrontendStatus {
|
||||
android.hardware.tv.tuner.FrontendIsdbtPartialReceptionFlag partialReceptionFlag;
|
||||
int[] streamIdList;
|
||||
int[] dvbtCellIds;
|
||||
android.hardware.tv.tuner.FrontendScanAtsc3PlpInfo[] allPlpInfo;
|
||||
}
|
||||
|
||||
@@ -76,4 +76,5 @@ enum FrontendStatusType {
|
||||
ISDBT_PARTIAL_RECEPTION_FLAG = 38,
|
||||
STREAM_ID_LIST = 39,
|
||||
DVBT_CELL_IDS = 40,
|
||||
ATSC3_ALL_PLP_INFO = 41,
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import android.hardware.tv.tuner.FrontendModulation;
|
||||
import android.hardware.tv.tuner.FrontendModulationStatus;
|
||||
import android.hardware.tv.tuner.FrontendRollOff;
|
||||
import android.hardware.tv.tuner.FrontendSpectralInversion;
|
||||
import android.hardware.tv.tuner.FrontendScanAtsc3PlpInfo;
|
||||
import android.hardware.tv.tuner.FrontendStatusAtsc3PlpInfo;
|
||||
import android.hardware.tv.tuner.FrontendTransmissionMode;
|
||||
import android.hardware.tv.tuner.LnbVoltage;
|
||||
@@ -241,5 +242,9 @@ union FrontendStatus {
|
||||
*/
|
||||
int[] dvbtCellIds;
|
||||
|
||||
|
||||
/**
|
||||
* A list of all PLPs in the frequency band for ATSC3 frontend, which includes both tuned
|
||||
* and not tuned PLPs for currently watching service.
|
||||
*/
|
||||
FrontendScanAtsc3PlpInfo[] allPlpInfo;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ enum FrontendStatusType {
|
||||
RF_LOCK,
|
||||
|
||||
/**
|
||||
* PLP information in a frequency band for ATSC3.0 frontend.
|
||||
* Current tuned PLP information in a frequency band for ATSC3 frontend.
|
||||
*/
|
||||
ATSC3_PLP_INFO,
|
||||
|
||||
@@ -222,10 +222,16 @@ enum FrontendStatusType {
|
||||
/**
|
||||
* Stream ID list included in a transponder.
|
||||
*/
|
||||
STREAM_ID_LIST,
|
||||
STREAM_ID_LIST,
|
||||
|
||||
/**
|
||||
* DVB-T Cell Id.
|
||||
*/
|
||||
DVBT_CELL_IDS,
|
||||
/**
|
||||
* DVB-T Cell Id.
|
||||
*/
|
||||
DVBT_CELL_IDS,
|
||||
|
||||
/**
|
||||
* All PLP information in a frequency band for ATSC3 frontend, which includes both tuned
|
||||
* and not tuned PLPs for currently watching service.
|
||||
*/
|
||||
ATSC3_ALL_PLP_INFO,
|
||||
}
|
||||
|
||||
@@ -708,6 +708,20 @@ void Frontend::scanThreadLoop() {
|
||||
status.set<FrontendStatus::dvbtCellIds>(dvbtCellIds);
|
||||
break;
|
||||
}
|
||||
case FrontendStatusType::ATSC3_ALL_PLP_INFO: {
|
||||
FrontendScanAtsc3PlpInfo info1;
|
||||
info1.plpId = 1;
|
||||
info1.bLlsFlag = false;
|
||||
FrontendScanAtsc3PlpInfo info2;
|
||||
info2.plpId = 2;
|
||||
info2.bLlsFlag = true;
|
||||
FrontendScanAtsc3PlpInfo info3;
|
||||
info3.plpId = 3;
|
||||
info3.bLlsFlag = false;
|
||||
vector<FrontendScanAtsc3PlpInfo> infos = {info1, info2, info3};
|
||||
status.set<FrontendStatus::allPlpInfo>(infos);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -77,6 +77,7 @@ void Tuner::init() {
|
||||
FrontendStatusType::BERS,
|
||||
FrontendStatusType::INTERLEAVINGS,
|
||||
FrontendStatusType::BANDWIDTH,
|
||||
FrontendStatusType::ATSC3_ALL_PLP_INFO,
|
||||
};
|
||||
mFrontendStatusCaps[1] = statusCaps;
|
||||
mMaxUsableFrontends[FrontendType::ATSC3] = 1;
|
||||
|
||||
@@ -414,6 +414,13 @@ void FrontendTests::verifyFrontendStatus(vector<FrontendStatusType> statusTypes,
|
||||
expectStatuses[i].get<FrontendStatus::Tag::dvbtCellIds>().begin()));
|
||||
break;
|
||||
}
|
||||
case FrontendStatusType::ATSC3_ALL_PLP_INFO: {
|
||||
ASSERT_TRUE(std::equal(
|
||||
realStatuses[i].get<FrontendStatus::Tag::allPlpInfo>().begin(),
|
||||
realStatuses[i].get<FrontendStatus::Tag::allPlpInfo>().end(),
|
||||
expectStatuses[i].get<FrontendStatus::Tag::allPlpInfo>().begin()));
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user