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

Commit 3ad735d3 authored by Frankie Lizcano's avatar Frankie Lizcano
Browse files

vts: Added support for ATSC Frontend types

The latest version of the dynamic VTS for Tuner HALs did not support the
configuration of ATSC Frontend types. Logic was added to allow this
feature. Editing the tuner_testing_dynamic_configuration file directly
changes the api outlined in api/current.txt to support reading the newly
added features from the vendor's configuration file.

Bug: b/237100858

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: I6a3221bd69eab000a9ea3de9e7c084bbee0e1451
parent 5def75d8
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -263,6 +263,9 @@ struct TunerTestingConfigAidlReader1_0 {
                        break;
                    case FrontendTypeEnum::ATSC:
                        type = FrontendType::ATSC;
                        frontendMap[id].settings.set<
                            FrontendSettings::Tag::atsc>(
                                readAtscFrontendSettings(feConfig));
                        break;
                    case FrontendTypeEnum::ATSC3:
                        type = FrontendType::ATSC3;
@@ -691,6 +694,26 @@ struct TunerTestingConfigAidlReader1_0 {
        return dvbsSettings;
    }

    static FrontendAtscSettings readAtscFrontendSettings(Frontend& feConfig) {
        ALOGW("[ConfigReader] fe type is atsc");
        FrontendAtscSettings atscSettings{
                .frequency = (int64_t)feConfig.getFrequency(),
        };
        if (feConfig.hasEndFrequency()) {
            atscSettings.endFrequency = (int64_t)feConfig.getEndFrequency();
        }
        if (!feConfig.hasAtscFrontendSettings_optional()) {
            ALOGW("[ConfigReader] no more atsc settings");
            return atscSettings;
        }
        auto atsc = feConfig.getFirstAtscFrontendSettings_optional();
        atscSettings.inversion = static_cast<FrontendSpectralInversion>(
            atsc->getInversion());
        atscSettings.modulation = static_cast<FrontendAtscModulation>(
            atsc->getModulation());
        return atscSettings;
    }

    static bool readFilterTypeAndSettings(Filter filterConfig, DemuxFilterType& type,
                                          DemuxFilterSettings& settings) {
        auto mainType = filterConfig.getMainType();
+10 −0
Original line number Diff line number Diff line
// Signature format: 2.0
package android.media.tuner.testing.configuration.V1_0 {

  public class AtscFrontendSettings {
    ctor public AtscFrontendSettings();
    method @Nullable public java.math.BigInteger getInversion();
    method @Nullable public java.math.BigInteger getModulation();
    method public void setInversion(@Nullable java.math.BigInteger);
    method public void setModulation(@Nullable java.math.BigInteger);
  }

  public class AvFilterSettings {
    ctor public AvFilterSettings();
    method @Nullable public short getAudioStreamType_optional();
@@ -310,6 +318,7 @@ package android.media.tuner.testing.configuration.V1_0 {

  public class Frontend {
    ctor public Frontend();
    method @Nullable public android.media.tuner.testing.configuration.V1_0.AtscFrontendSettings getAtscFrontendSettings_optional();
    method @Nullable public java.math.BigInteger getConnectToCicamId();
    method @Nullable public android.media.tuner.testing.configuration.V1_0.DvbsFrontendSettings getDvbsFrontendSettings_optional();
    method @Nullable public android.media.tuner.testing.configuration.V1_0.DvbtFrontendSettings getDvbtFrontendSettings_optional();
@@ -319,6 +328,7 @@ package android.media.tuner.testing.configuration.V1_0 {
    method @Nullable public boolean getIsSoftwareFrontend();
    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);
    method public void setConnectToCicamId(@Nullable java.math.BigInteger);
    method public void setDvbsFrontendSettings_optional(@Nullable android.media.tuner.testing.configuration.V1_0.DvbsFrontendSettings);
    method public void setDvbtFrontendSettings_optional(@Nullable android.media.tuner.testing.configuration.V1_0.DvbtFrontendSettings);
+7 −3
Original line number Diff line number Diff line
@@ -80,6 +80,10 @@
        <xs:attribute name="scanType" type="dvbsScanType" use="optional"/>
        <xs:attribute name="isDiseqcRxMessage" type="xs:boolean" use="optional"/>
    </xs:complexType>
    <xs:complexType name="atscFrontendSettings">
        <xs:attribute name="inversion" type="xs:nonNegativeInteger" use="required"/>
        <xs:attribute name="modulation" type="xs:nonNegativeInteger" use="required"/>
    </xs:complexType>

    <xs:complexType name="frontend">
        <xs:annotation>
@@ -109,9 +113,9 @@
        </xs:annotation>
        <xs:choice minOccurs="0" maxOccurs="1">
            <!-- TODO: b/182519645 finish all the frontend settings structures. -->
            <!--xs:element name="analog" type="analogSettings"/>
            <xs:element name="atsc" type="atscSettings"/>
            <xs:element name="atsc3" type="atsc3Settings"/>
            <!--xs:element name="analog" type="analogSettings"/-->
            <xs:element name="atscFrontendSettings" type="atscFrontendSettings"/>
            <!--xs:element name="atsc3" type="atsc3Settings"/>
            <xs:element name="dvbc" type="dvbcSettings"/-->
            <xs:element name="dvbsFrontendSettings" type="dvbsFrontendSettings"/>
            <xs:element name="dvbtFrontendSettings" type="dvbtFrontendSettings"/>