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

Commit 452b026f authored by Frankie Lizcano's avatar Frankie Lizcano
Browse files

vts: Added support for ISDBS Frontend types

The latest version of the dynamic VTS for Tuner HALs did not support the
configuration of ISDBS Frontend types. Logic was added to allow this
feature.

Bug: b/237319139

Test: manual - Ran local tests that ensured the ATSC frontend was being
configured correctly. Also ran the VTS module to ensure no failures were
occuring.

Change-Id: I7d7fe5ce153a582a65fa9d1347e18f7689e0bcfb
parent fa1610ff
Loading
Loading
Loading
Loading
+45 −16
Original line number Diff line number Diff line
@@ -286,6 +286,9 @@ struct TunerTestingConfigAidlReader1_0 {
                    }
                    case FrontendTypeEnum::ISDBS:
                        type = FrontendType::ISDBS;
                        frontendMap[id].settings.set<
                            FrontendSettings::Tag::isdbs>(
                                readIsdbsFrontendSettings(feConfig));
                        break;
                    case FrontendTypeEnum::ISDBS3:
                        type = FrontendType::ISDBS3;
@@ -714,6 +717,32 @@ struct TunerTestingConfigAidlReader1_0 {
      return atscSettings;
    }

    static FrontendIsdbsSettings readIsdbsFrontendSettings(Frontend &feConfig) {
      ALOGW("[ConfigReader] fe type is isdbs");
      FrontendIsdbsSettings isdbsSettings{
              .frequency = (int64_t)feConfig.getFrequency()
      };
      if (feConfig.hasEndFrequency()) {
            isdbsSettings.endFrequency = (int64_t)feConfig.getEndFrequency();
      }
      if (!feConfig.hasIsdbsFrontendSettings_optional()) {
            ALOGW("[ConfigReader] no more isdbs settings");
            return isdbsSettings;
      }
      auto isdbs = feConfig.getFirstIsdbsFrontendSettings_optional();
      isdbsSettings.streamId = (int32_t)isdbs->getStreamId();
      isdbsSettings.symbolRate = (int32_t)isdbs->getSymbolRate();
      isdbsSettings.modulation = static_cast<FrontendIsdbsModulation>(
          isdbs->getModulation());
      isdbsSettings.coderate = static_cast<FrontendIsdbsCoderate>(
          isdbs->getCoderate());
      isdbsSettings.rolloff = static_cast<FrontendIsdbsRolloff>(
          isdbs->getRolloff());
      isdbsSettings.streamIdType = static_cast<FrontendIsdbsStreamIdType>(
          isdbs->getStreamIdType());
      return isdbsSettings;
    }

    static bool readFilterTypeAndSettings(Filter filterConfig, DemuxFilterType& type,
                                          DemuxFilterSettings& settings) {
        auto mainType = filterConfig.getMainType();
+18 −0
Original line number Diff line number Diff line
@@ -326,6 +326,7 @@ package android.media.tuner.testing.configuration.V1_0 {
    method @Nullable public java.math.BigInteger getFrequency();
    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 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);
@@ -336,6 +337,7 @@ package android.media.tuner.testing.configuration.V1_0 {
    method public void setFrequency(@Nullable java.math.BigInteger);
    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 setRemoveOutputPid(@Nullable java.math.BigInteger);
    method public void setType(@Nullable android.media.tuner.testing.configuration.V1_0.FrontendTypeEnum);
  }
@@ -432,6 +434,22 @@ package android.media.tuner.testing.configuration.V1_0 {
    method public void setSrcPort(@Nullable long);
  }

  public class IsdbsFrontendSettings {
    ctor public IsdbsFrontendSettings();
    method @Nullable public java.math.BigInteger getCoderate();
    method @Nullable public java.math.BigInteger getModulation();
    method @Nullable public java.math.BigInteger getRolloff();
    method @Nullable public java.math.BigInteger getStreamId();
    method @Nullable public java.math.BigInteger getStreamIdType();
    method @Nullable public java.math.BigInteger getSymbolRate();
    method public void setCoderate(@Nullable java.math.BigInteger);
    method public void setModulation(@Nullable java.math.BigInteger);
    method public void setRolloff(@Nullable java.math.BigInteger);
    method public void setStreamId(@Nullable java.math.BigInteger);
    method public void setStreamIdType(@Nullable java.math.BigInteger);
    method public void setSymbolRate(@Nullable java.math.BigInteger);
  }

  public class Lnb {
    ctor public Lnb();
    method @Nullable public String getId();
+10 −2
Original line number Diff line number Diff line
@@ -84,6 +84,14 @@
        <xs:attribute name="inversion" type="xs:nonNegativeInteger" use="required"/>
        <xs:attribute name="modulation" type="xs:nonNegativeInteger" use="required"/>
    </xs:complexType>
    <xs:complexType name="isdbsFrontendSettings">
        <xs:attribute name="streamId" type="xs:nonNegativeInteger" use="required"/>
        <xs:attribute name="symbolRate" type="xs:nonNegativeInteger" use="required"/>
        <xs:attribute name="streamIdType" type="xs:nonNegativeInteger" use="required"/>
        <xs:attribute name="modulation" type="xs:nonNegativeInteger" use="required"/>
        <xs:attribute name="coderate" type="xs:nonNegativeInteger" use="required"/>
        <xs:attribute name="rolloff" type="xs:nonNegativeInteger" use="required"/>
    </xs:complexType>

    <xs:complexType name="frontend">
        <xs:annotation>
@@ -119,8 +127,8 @@
            <xs:element name="dvbc" type="dvbcSettings"/-->
            <xs:element name="dvbsFrontendSettings" type="dvbsFrontendSettings"/>
            <xs:element name="dvbtFrontendSettings" type="dvbtFrontendSettings"/>
            <!--xs:element name="isdbs" type="isdbsSettings"/>
            <xs:element name="isdbs3" type="isdbs3Settings"/>
            <xs:element name="isdbsFrontendSettings" type="isdbsFrontendSettings"/>
            <!--xs:element name="isdbs3" type="isdbs3Settings"/>
            <xs:element name="isdbt" type="isdbtSettings"/>
            <xs:element name="dtmb" type="dtmbSettings"/-->
        </xs:choice>