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

Commit 7d03f498 authored by Ray Chin's avatar Ray Chin
Browse files

Support product specific VTS test configuration

The tuner vts will read the system property
ro.vendor.vts_tuner_configuration_variant as the suffix of the config
file to read. Vendor who wants to support multiple region for a single
SoC need to put all VTS config with different suffix as
/vendor/etc/tuner_vts_config_aidl_V1.{suffix}.xml on device.

Bug: 322899156
Test: atest VtsHalTvTunerTargetTest
Change-Id: I1f76d700671c07bc90965fba94f96b8be47198d7
parent b74c11d1
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#pragma once

#include <android/binder_manager.h>
#include <cutils/properties.h>

#include "DemuxTests.h"
#include "DescramblerTests.h"
@@ -29,6 +30,17 @@ using android::sp;
namespace {

bool initConfiguration() {
    std::array<char, PROPERTY_VALUE_MAX> variant;
    auto res = property_get("ro.vendor.vts_tuner_configuration_variant", variant.data(), "");
    if (res <= 0) {
        ALOGE("[vts] failed to read system property ro.vendor.vts_tuner_configuration_variant");
        return false;
    }
    string configFilePath = "/vendor/etc/tuner_vts_config_aidl_V1";
    if (variant.size() != 0) {
        configFilePath = configFilePath + "."  + variant.data();
    }
    configFilePath = configFilePath + ".xml";
    TunerTestingConfigAidlReader1_0::setConfigFilePath(configFilePath);
    if (!TunerTestingConfigAidlReader1_0::checkConfigFileExists()) {
        return false;
+0 −2
Original line number Diff line number Diff line
@@ -52,8 +52,6 @@ using namespace android::media::tuner::testing::configuration::V1_0;
const int32_t FMQ_SIZE_4M = 0x400000;
const int32_t FMQ_SIZE_16M = 0x1000000;

const string configFilePath = "/vendor/etc/tuner_vts_config_aidl_V1.xml";

#define FILTER_MAIN_TYPE_BIT_COUNT 5
#define STATUS_CHECK_INTERVAL_MS 100L