diff --git a/tv/tuner/config/TunerTestingConfigAidlReaderV1_0.h b/tv/tuner/config/TunerTestingConfigAidlReaderV1_0.h index a150797e78..bab6a484be 100644 --- a/tv/tuner/config/TunerTestingConfigAidlReaderV1_0.h +++ b/tv/tuner/config/TunerTestingConfigAidlReaderV1_0.h @@ -294,6 +294,8 @@ struct TunerTestingConfigAidlReader1_0 { break; case FrontendTypeEnum::ISDBT: type = FrontendType::ISDBT; + frontendMap[id].settings.set( + readIsdbtFrontendSettings(feConfig)); break; case FrontendTypeEnum::DTMB: type = FrontendType::DTMB; @@ -735,6 +737,43 @@ struct TunerTestingConfigAidlReader1_0 { return isdbsSettings; } + static FrontendIsdbtSettings readIsdbtFrontendSettings(Frontend& feConfig) { + ALOGW("[ConfigReader] fe type is isdbt"); + FrontendIsdbtSettings isdbtSettings{ + .frequency = (int64_t)feConfig.getFrequency(), + }; + if (feConfig.hasEndFrequency()) { + isdbtSettings.endFrequency = (int64_t)feConfig.getEndFrequency(); + } + if (!feConfig.hasIsdbtFrontendSettings_optional()) { + ALOGW("[ConfigReader] no more isdbt settings"); + return isdbtSettings; + } + auto isdbt = feConfig.getFirstIsdbtFrontendSettings_optional(); + isdbtSettings.inversion = static_cast(isdbt->getInversion()); + isdbtSettings.bandwidth = static_cast(isdbt->getBandwidth()); + isdbtSettings.mode = static_cast(isdbt->getMode()); + isdbtSettings.guardInterval = + static_cast(isdbt->getGuardInterval()); + isdbtSettings.serviceAreaId = (int32_t)isdbt->getServiceAreaId(); + isdbtSettings.partialReceptionFlag = + static_cast(isdbt->getPartialReceptionFlag()); + if (!isdbt->hasFrontendIsdbtLayerSettings()) { + ALOGW("[ConfigReader] no isdbt layer settings"); + return isdbtSettings; + } + auto layerSettings = isdbt->getFirstFrontendIsdbtLayerSettings(); + ::aidl::android::hardware::tv::tuner::FrontendIsdbtLayerSettings mLayerSettings; + mLayerSettings.modulation = + static_cast(layerSettings->getModulation()); + mLayerSettings.coderate = static_cast(layerSettings->getCoderate()); + mLayerSettings.timeInterleave = + static_cast(layerSettings->getTimeInterleave()); + mLayerSettings.numOfSegment = (int32_t)layerSettings->getNumOfSegment(); + isdbtSettings.layerSettings.push_back(mLayerSettings); + return isdbtSettings; + } + static bool readFilterTypeAndSettings(Filter filterConfig, DemuxFilterType& type, DemuxFilterSettings& settings) { auto mainType = filterConfig.getMainType(); diff --git a/tv/tuner/config/api/current.txt b/tv/tuner/config/api/current.txt index aa7b88c249..acaf07af4d 100644 --- a/tv/tuner/config/api/current.txt +++ b/tv/tuner/config/api/current.txt @@ -327,6 +327,7 @@ package android.media.tuner.testing.configuration.V1_0 { method @Nullable public String getId(); method @Nullable public boolean getIsSoftwareFrontend(); method @Nullable public android.media.tuner.testing.configuration.V1_0.IsdbsFrontendSettings getIsdbsFrontendSettings_optional(); + method @Nullable public android.media.tuner.testing.configuration.V1_0.IsdbtFrontendSettings getIsdbtFrontendSettings_optional(); method @Nullable public java.math.BigInteger getRemoveOutputPid(); method @Nullable public android.media.tuner.testing.configuration.V1_0.FrontendTypeEnum getType(); method public void setAtscFrontendSettings_optional(@Nullable android.media.tuner.testing.configuration.V1_0.AtscFrontendSettings); @@ -338,10 +339,23 @@ package android.media.tuner.testing.configuration.V1_0 { method public void setId(@Nullable String); method public void setIsSoftwareFrontend(@Nullable boolean); method public void setIsdbsFrontendSettings_optional(@Nullable android.media.tuner.testing.configuration.V1_0.IsdbsFrontendSettings); + method public void setIsdbtFrontendSettings_optional(@Nullable android.media.tuner.testing.configuration.V1_0.IsdbtFrontendSettings); method public void setRemoveOutputPid(@Nullable java.math.BigInteger); method public void setType(@Nullable android.media.tuner.testing.configuration.V1_0.FrontendTypeEnum); } + public class FrontendIsdbtLayerSettings { + ctor public FrontendIsdbtLayerSettings(); + method @Nullable public java.math.BigInteger getCoderate(); + method @Nullable public java.math.BigInteger getModulation(); + method @Nullable public java.math.BigInteger getNumOfSegment(); + method @Nullable public java.math.BigInteger getTimeInterleave(); + method public void setCoderate(@Nullable java.math.BigInteger); + method public void setModulation(@Nullable java.math.BigInteger); + method public void setNumOfSegment(@Nullable java.math.BigInteger); + method public void setTimeInterleave(@Nullable java.math.BigInteger); + } + public enum FrontendTypeEnum { method @NonNull public String getRawName(); enum_constant public static final android.media.tuner.testing.configuration.V1_0.FrontendTypeEnum ANALOG; @@ -450,6 +464,24 @@ package android.media.tuner.testing.configuration.V1_0 { method public void setSymbolRate(@Nullable java.math.BigInteger); } + public class IsdbtFrontendSettings { + ctor public IsdbtFrontendSettings(); + method @Nullable public java.math.BigInteger getBandwidth(); + method @Nullable public android.media.tuner.testing.configuration.V1_0.FrontendIsdbtLayerSettings getFrontendIsdbtLayerSettings(); + method @Nullable public java.math.BigInteger getGuardInterval(); + method @Nullable public java.math.BigInteger getInversion(); + method @Nullable public java.math.BigInteger getMode(); + method @Nullable public java.math.BigInteger getPartialReceptionFlag(); + method @Nullable public java.math.BigInteger getServiceAreaId(); + method public void setBandwidth(@Nullable java.math.BigInteger); + method public void setFrontendIsdbtLayerSettings(@Nullable android.media.tuner.testing.configuration.V1_0.FrontendIsdbtLayerSettings); + method public void setGuardInterval(@Nullable java.math.BigInteger); + method public void setInversion(@Nullable java.math.BigInteger); + method public void setMode(@Nullable java.math.BigInteger); + method public void setPartialReceptionFlag(@Nullable java.math.BigInteger); + method public void setServiceAreaId(@Nullable java.math.BigInteger); + } + public class Lnb { ctor public Lnb(); method @Nullable public String getId(); diff --git a/tv/tuner/config/tuner_testing_dynamic_configuration.xsd b/tv/tuner/config/tuner_testing_dynamic_configuration.xsd index 282433e741..f4347f0d73 100644 --- a/tv/tuner/config/tuner_testing_dynamic_configuration.xsd +++ b/tv/tuner/config/tuner_testing_dynamic_configuration.xsd @@ -92,6 +92,21 @@ + + + + + + + + + + + + + + + @@ -128,9 +143,9 @@ - + + +