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

Commit 58be11ec authored by Ray Chin's avatar Ray Chin
Browse files

Blind scan should be an optional feature based on the design document

Bug: 317215552
Bug: 305118733
Test: cf_x86_tv-staging-userdebug
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:740a0a8c5ebd0218139aded763fb3204886c2dd0)
Merged-In: Id0153700cfa2c02933c23e13ca1305b0a96b00ca
Change-Id: Id0153700cfa2c02933c23e13ca1305b0a96b00ca

NOTE FOR REVIEWERS - errors occurred while applying the patch.
PLEASE REVIEW CAREFULLY.
Errors:
Error applying patch in tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp, hunk HunkHeader[1258,6->1262,10]: Hunk cannot be applied

Original patch:
 From 740a0a8c Mon Sep 17 00:00:00 2001
From: Ray Chin <raychin@google.com>
Date: Fri, 22 Dec 2023 19:10:46 +0800
Subject: [PATCH] Blind scan should be an optional feature based on the design document

Bug: 317215552
Bug: 305118733
Test: cf_x86_tv-staging-userdebug
Change-Id: Id0153700cfa2c02933c23e13ca1305b0a96b00ca
---
parent 71be20f9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1198,6 +1198,10 @@ TEST_P(TunerFrontendAidlTest, BlindScanFrontend) {
    vector<ScanHardwareConnections> scan_configs = generateScanConfigurations();
    for (auto& configuration : scan_configs) {
        scan = configuration;
        // Skip test if the frontend implementation doesn't support blind scan
        if (!frontendMap[scan.frontendId].supportBlindScan) {
            continue;
        }
        mFrontendTests.scanTest(frontendMap[scan.frontendId], FrontendScanType::SCAN_BLIND);
    }
}
@@ -1222,6 +1226,10 @@ TEST_P(TunerFrontendAidlTest, BlindScanFrontendWithEndFrequency) {
    vector<ScanHardwareConnections> scan_configs = generateScanConfigurations();
    for (auto& configuration : scan_configs) {
        scan = configuration;
        // Skip test if the frontend implementation doesn't support blind scan
        if (!frontendMap[scan.frontendId].supportBlindScan) {
            continue;
        }
        mFrontendTests.scanTest(frontendMap[scan.frontendId], FrontendScanType::SCAN_BLIND);
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -612,6 +612,7 @@ inline void initFrontendConfig() {
    frontendMap[defaultFeId].isSoftwareFe = true;
    frontendMap[defaultFeId].canConnectToCiCam = true;
    frontendMap[defaultFeId].ciCamId = 0;
    frontendMap[defaultFeId].supportBlindScan = true;
    FrontendDvbtSettings dvbt;
    dvbt.transmissionMode = FrontendDvbtTransmissionMode::MODE_8K_E;
    frontendMap[defaultFeId].settings.set<FrontendSettings::Tag::dvbt>(dvbt);
+6 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ struct FrontendConfig {
    FrontendSettings settings;
    vector<FrontendStatusType> tuneStatusTypes;
    vector<FrontendStatus> expectTuneStatuses;
    bool supportBlindScan;
};

struct FilterConfig {
@@ -354,6 +355,11 @@ struct TunerTestingConfigAidlReader1_0 {
                } else {
                    hasHwFe = true;
                }
                if (feConfig.hasSupportBlindScan()) {
                    frontendMap[id].supportBlindScan = feConfig.getSupportBlindScan();
                } else {
                    frontendMap[id].supportBlindScan = true;
                }
                // TODO: b/182519645 complete the tune status config
                frontendMap[id].tuneStatusTypes = types;
                frontendMap[id].expectTuneStatuses = statuses;
+2 −0
Original line number Diff line number Diff line
@@ -369,6 +369,7 @@ package android.media.tuner.testing.configuration.V1_0 {
    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 boolean getSupportBlindScan();
    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);
@@ -381,6 +382,7 @@ package android.media.tuner.testing.configuration.V1_0 {
    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 setSupportBlindScan(@Nullable boolean);
    method public void setType(@Nullable android.media.tuner.testing.configuration.V1_0.FrontendTypeEnum);
  }

+1 −0
Original line number Diff line number Diff line
@@ -162,6 +162,7 @@
        <xs:attribute name="connectToCicamId" type="xs:nonNegativeInteger" use="optional"/>
        <xs:attribute name="removeOutputPid" type="xs:nonNegativeInteger" use="optional"/>
        <xs:attribute name="endFrequency" type="xs:nonNegativeInteger" use="optional"/>
        <xs:attribute name="supportBlindScan" type="xs:boolean" use="optional"/>
    </xs:complexType>

    <!-- FILTER SESSION -->