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
diff --git a/tv/tuner/config/TunerTestingConfigAidlReaderV1_0.h b/tv/tuner/config/TunerTestingConfigAidlReaderV1_0.h
index 189f5fd..caf631c 100644
--- a/tv/tuner/config/TunerTestingConfigAidlReaderV1_0.h
+++ b/tv/tuner/config/TunerTestingConfigAidlReaderV1_0.h
@@ -263,6 +263,9 @@
                         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 @@
         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();