mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:09:42 +00:00
Fix: BroadcastradioHalTest.DabTune case failure am: 58eeec5925
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2379191 Change-Id: I077044dd855a3b090e63c8f625e72344f6756130 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
committed by
Automerger Merge Worker
commit
c9fa6a8ef3
@@ -1,6 +1,6 @@
|
|||||||
# Automotive team
|
# Automotive team
|
||||||
egranata@google.com
|
xuweilin@google.com
|
||||||
twasilczyk@google.com
|
oscarazu@google.com
|
||||||
|
|
||||||
# VTS team
|
# VTS team
|
||||||
dshi@google.com
|
dshi@google.com
|
||||||
|
|||||||
@@ -514,9 +514,48 @@ TEST_P(BroadcastRadioHalTest, DabTune) {
|
|||||||
|
|
||||||
ASSERT_TRUE(openSession());
|
ASSERT_TRUE(openSession());
|
||||||
|
|
||||||
|
auto programList = getProgramList();
|
||||||
|
|
||||||
|
if (!programList) {
|
||||||
|
printSkipped("Empty Station-List, tune cannot be performed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ProgramSelector sel = {};
|
ProgramSelector sel = {};
|
||||||
uint64_t freq = config[config.size() / 2].frequency;
|
uint64_t freq = 0;
|
||||||
sel.primaryId = make_identifier(IdentifierType::DAB_FREQUENCY,freq);
|
bool dabStnPresent = false;
|
||||||
|
|
||||||
|
for (auto&& programInfo : *programList) {
|
||||||
|
if (utils::hasId(programInfo.selector, IdentifierType::DAB_FREQUENCY)) {
|
||||||
|
for (auto&& config_entry : config) {
|
||||||
|
if (config_entry.frequency == utils::getId(programInfo.selector,
|
||||||
|
IdentifierType::DAB_FREQUENCY, 0)) {
|
||||||
|
freq = config_entry.frequency;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Do not trigger a tune request if the programList entry does not contain
|
||||||
|
// a valid DAB frequency
|
||||||
|
if (freq == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
uint64_t dabSidExt = utils::getId(programInfo.selector, IdentifierType::DAB_SID_EXT, 0);
|
||||||
|
uint64_t dabEns = utils::getId(programInfo.selector, IdentifierType::DAB_ENSEMBLE, 0);
|
||||||
|
sel.primaryId = make_identifier(IdentifierType::DAB_SID_EXT, dabSidExt);
|
||||||
|
hidl_vec<ProgramIdentifier> secondaryIds = {
|
||||||
|
make_identifier(IdentifierType::DAB_ENSEMBLE, dabEns),
|
||||||
|
make_identifier(IdentifierType::DAB_FREQUENCY, freq)
|
||||||
|
};
|
||||||
|
sel.secondaryIds = secondaryIds;
|
||||||
|
dabStnPresent = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!dabStnPresent) {
|
||||||
|
printSkipped("No DAB stations in the list, tune cannot be performed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::this_thread::sleep_for(gTuneWorkaround);
|
std::this_thread::sleep_for(gTuneWorkaround);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user