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

Commit 79b0cd28 authored by Weilin Xu's avatar Weilin Xu Committed by Automerger Merge Worker
Browse files

Use DAB_SID_EXT instead in DAB radio VTS am: 371c4d39

parents e0ab321c 371c4d39
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -783,12 +783,13 @@ TEST_P(BroadcastRadioHalTest, DabTune) {
    }
    }


    ProgramSelector sel = {};
    ProgramSelector sel = {};
    uint64_t freq = 0;
    uint64_t dabSidExt = 0;
    bool dabStationPresent = false;
    bool dabStationPresent = false;
    for (auto&& programInfo : *programList) {
    for (auto&& programInfo : *programList) {
        if (!utils::hasId(programInfo.selector, IdentifierType::DAB_FREQUENCY_KHZ)) {
        if (!utils::hasId(programInfo.selector, IdentifierType::DAB_FREQUENCY_KHZ)) {
            continue;
            continue;
        }
        }
        uint64_t freq = 0;
        for (auto&& config_entry : config) {
        for (auto&& config_entry : config) {
            if (config_entry.frequencyKhz ==
            if (config_entry.frequencyKhz ==
                utils::getId(programInfo.selector, IdentifierType::DAB_FREQUENCY_KHZ, 0)) {
                utils::getId(programInfo.selector, IdentifierType::DAB_FREQUENCY_KHZ, 0)) {
@@ -801,7 +802,7 @@ TEST_P(BroadcastRadioHalTest, DabTune) {
        if (freq == 0) {
        if (freq == 0) {
            continue;
            continue;
        }
        }
        int64_t dabSidExt = utils::getId(programInfo.selector, IdentifierType::DAB_SID_EXT, 0);
        dabSidExt = utils::getId(programInfo.selector, IdentifierType::DAB_SID_EXT, 0);
        int64_t dabEns = utils::getId(programInfo.selector, IdentifierType::DAB_ENSEMBLE, 0);
        int64_t dabEns = utils::getId(programInfo.selector, IdentifierType::DAB_ENSEMBLE, 0);
        sel = makeSelectorDab(dabSidExt, (int32_t)dabEns, freq);
        sel = makeSelectorDab(dabSidExt, (int32_t)dabEns, freq);
        dabStationPresent = true;
        dabStationPresent = true;
@@ -830,9 +831,9 @@ TEST_P(BroadcastRadioHalTest, DabTune) {
    LOG(DEBUG) << "Current program info: " << infoCb.toString();
    LOG(DEBUG) << "Current program info: " << infoCb.toString();


    // it should tune exactly to what was requested
    // it should tune exactly to what was requested
    vector<int64_t> freqs = bcutils::getAllIds(infoCb.selector, IdentifierType::DAB_FREQUENCY_KHZ);
    vector<int64_t> sidExts = bcutils::getAllIds(infoCb.selector, IdentifierType::DAB_SID_EXT);
    EXPECT_NE(freqs.end(), find(freqs.begin(), freqs.end(), freq))
    EXPECT_NE(sidExts.end(), find(sidExts.begin(), sidExts.end(), dabSidExt))
            << "DAB freq " << freq << " kHz is not sent back by callback.";
            << "DAB SID ext " << std::hex << dabSidExt << " is not sent back by callback.";
}
}


/**
/**