mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user