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

Commit 23f01b2c authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11679388 from d1737dde to 24Q3-release

Change-Id: I1d62c895f7a6812fbad1345bcada19f4493a208b
parents 6c0837e4 d1737dde
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -195,48 +195,42 @@ const std::set<std::vector<DynamicsProcessing::InputGain>>

template <typename T>
bool DynamicsProcessingTestHelper::isBandConfigValid(const std::vector<T>& cfgs, int bandCount) {
    std::vector<float> freqs(cfgs.size(), -1);
    std::unordered_set<int> freqs;
    for (auto cfg : cfgs) {
        if (cfg.channel < 0 || cfg.channel >= mChannelCount) return false;
        if (cfg.band < 0 || cfg.band >= bandCount) return false;
        freqs[cfg.band] = cfg.cutoffFrequencyHz;
        // duplicated band index
        if (freqs.find(cfg.band) != freqs.end()) return false;
        freqs.insert(cfg.band);
    }
    if (std::count(freqs.begin(), freqs.end(), -1)) return false;
    return std::is_sorted(freqs.begin(), freqs.end());
    return true;
}

bool DynamicsProcessingTestHelper::isParamValid(const DynamicsProcessing::Tag& tag,
                                                const DynamicsProcessing& dp) {
    switch (tag) {
        case DynamicsProcessing::preEq: {
            if (!mEngineConfigApplied.preEqStage.inUse) return false;
            return isChannelConfigValid(dp.get<DynamicsProcessing::preEq>());
        }
        case DynamicsProcessing::postEq: {
            if (!mEngineConfigApplied.postEqStage.inUse) return false;
            return isChannelConfigValid(dp.get<DynamicsProcessing::postEq>());
        }
        case DynamicsProcessing::mbc: {
            if (!mEngineConfigApplied.mbcStage.inUse) return false;
            return isChannelConfigValid(dp.get<DynamicsProcessing::mbc>());
        }
        case DynamicsProcessing::preEqBand: {
            if (!mEngineConfigApplied.preEqStage.inUse) return false;
            return isBandConfigValid(dp.get<DynamicsProcessing::preEqBand>(),
                                     mEngineConfigApplied.preEqStage.bandCount);
        }
        case DynamicsProcessing::postEqBand: {
            if (!mEngineConfigApplied.postEqStage.inUse) return false;
            return isBandConfigValid(dp.get<DynamicsProcessing::postEqBand>(),
                                     mEngineConfigApplied.postEqStage.bandCount);
        }
        case DynamicsProcessing::mbcBand: {
            if (!mEngineConfigApplied.mbcStage.inUse) return false;
            return isBandConfigValid(dp.get<DynamicsProcessing::mbcBand>(),
                                     mEngineConfigApplied.mbcStage.bandCount);
        }
        case DynamicsProcessing::limiter: {
            if (!mEngineConfigApplied.limiterInUse) return false;
            return isChannelConfigValid(dp.get<DynamicsProcessing::limiter>());
        }
        case DynamicsProcessing::inputGain: {
+7 −0
Original line number Diff line number Diff line
@@ -93,3 +93,10 @@ cc_defaults {
        latest_android_hardware_automotive_audiocontrol + "-ndk",
    ],
}

java_defaults {
    name: "latest_android_hardware_automotive_audiocontrol_java_static",
    static_libs: [
        latest_android_hardware_automotive_audiocontrol + "-java",
    ],
}
+20 −42
Original line number Diff line number Diff line
@@ -3002,14 +3002,10 @@ TEST_P(GraphicsComposerAidlCommandV3Test, CreateBatchedCommand) {
        GTEST_SKIP() << "LAYER_LIFECYCLE_BATCH_COMMAND not supported by the implementation";
        return;
    }

    auto& writer = getWriter(getPrimaryDisplayId());
    int64_t layer = 5;
    writer.setLayerLifecycleBatchCommandType(getPrimaryDisplayId(), layer,
                                             LayerLifecycleBatchCommandType::CREATE);
    writer.setNewBufferSlotCount(getPrimaryDisplayId(), layer, 1);
    writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
                           VtsComposerClient::kNoFrameIntervalNs);
    const auto& [status, layer] =
            mComposerClient->createLayer(getPrimaryDisplayId(), kBufferSlotCount, &writer);
    EXPECT_TRUE(status.isOk());
    execute();
    ASSERT_TRUE(mReader.takeErrors().empty());
}
@@ -3019,15 +3015,13 @@ TEST_P(GraphicsComposerAidlCommandV3Test, CreateBatchedCommand_BadDisplay) {
        GTEST_SKIP() << "LAYER_LIFECYCLE_BATCH_COMMAND not supported by the implementation";
        return;
    }

    auto& writer = getWriter(getPrimaryDisplayId());
    auto& writer = getWriter(getInvalidDisplayId());
    int64_t layer = 5;
    writer.setLayerLifecycleBatchCommandType(getInvalidDisplayId(), layer,
                                             LayerLifecycleBatchCommandType::CREATE);
    writer.setNewBufferSlotCount(getPrimaryDisplayId(), layer, 1);
    writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
                           VtsComposerClient::kNoFrameIntervalNs);
    writer.setNewBufferSlotCount(getInvalidDisplayId(), layer, 1);
    execute();

    const auto errors = mReader.takeErrors();
    ASSERT_TRUE(errors.size() == 1 && errors[0].errorCode == IComposerClient::EX_BAD_DISPLAY);
}
@@ -3037,26 +3031,15 @@ TEST_P(GraphicsComposerAidlCommandV3Test, DestroyBatchedCommand) {
        GTEST_SKIP() << "LAYER_LIFECYCLE_BATCH_COMMAND not supported by the implementation";
        return;
    }

    auto& writer = getWriter(getPrimaryDisplayId());
    int64_t layer = 5;
    writer.setLayerLifecycleBatchCommandType(getPrimaryDisplayId(), layer,
                                             LayerLifecycleBatchCommandType::CREATE);
    writer.setNewBufferSlotCount(getPrimaryDisplayId(), layer, 1);
    writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
                           VtsComposerClient::kNoFrameIntervalNs);
    const auto& [status, layer] =
            mComposerClient->createLayer(getPrimaryDisplayId(), kBufferSlotCount, &writer);
    EXPECT_TRUE(status.isOk());
    execute();
    ASSERT_TRUE(mReader.takeErrors().empty());
    writer.setLayerLifecycleBatchCommandType(getPrimaryDisplayId(), layer,
                                             LayerLifecycleBatchCommandType::DESTROY);
    layer++;
    writer.setLayerLifecycleBatchCommandType(getPrimaryDisplayId(), layer,
                                             LayerLifecycleBatchCommandType::CREATE);
    writer.setNewBufferSlotCount(getPrimaryDisplayId(), layer, 1);

    EXPECT_TRUE(mComposerClient->destroyLayer(getPrimaryDisplayId(), layer, &writer).isOk());
    execute();
    const auto errors = mReader.takeErrors();
    ASSERT_TRUE(errors.size() == 1 && errors[0].errorCode == IComposerClient::EX_BAD_DISPLAY);
    ASSERT_TRUE(mReader.takeErrors().empty());
}

TEST_P(GraphicsComposerAidlCommandV3Test, DestroyBatchedCommand_BadDisplay) {
@@ -3064,25 +3047,20 @@ TEST_P(GraphicsComposerAidlCommandV3Test, DestroyBatchedCommand_BadDisplay) {
        GTEST_SKIP() << "LAYER_LIFECYCLE_BATCH_COMMAND not supported by the implementation";
        return;
    }

    auto& writer = getWriter(getPrimaryDisplayId());
    int64_t layer = 5;
    writer.setLayerLifecycleBatchCommandType(getPrimaryDisplayId(), layer,
                                             LayerLifecycleBatchCommandType::CREATE);
    writer.setNewBufferSlotCount(getPrimaryDisplayId(), layer, 1);
    writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
                           VtsComposerClient::kNoFrameIntervalNs);
    const auto& [status, layer] =
            mComposerClient->createLayer(getPrimaryDisplayId(), kBufferSlotCount, &writer);

    EXPECT_TRUE(status.isOk());
    execute();
    ASSERT_TRUE(mReader.takeErrors().empty());
    writer.setLayerLifecycleBatchCommandType(getInvalidDisplayId(), layer,
                                             LayerLifecycleBatchCommandType::DESTROY);
    layer++;
    writer.setLayerLifecycleBatchCommandType(getInvalidDisplayId(), layer,
                                             LayerLifecycleBatchCommandType::CREATE);
    writer.setNewBufferSlotCount(getPrimaryDisplayId(), layer, 1);

    auto& invalid_writer = getWriter(getInvalidDisplayId());
    invalid_writer.setLayerLifecycleBatchCommandType(getInvalidDisplayId(), layer,
                                                     LayerLifecycleBatchCommandType::DESTROY);
    execute();
    ASSERT_TRUE(mReader.takeErrors().empty());
    const auto errors = mReader.takeErrors();
    ASSERT_TRUE(errors.size() == 1 && errors[0].errorCode == IComposerClient::EX_BAD_DISPLAY);
}

TEST_P(GraphicsComposerAidlCommandV3Test, NoCreateDestroyBatchedCommandIncorrectLayer) {
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ impl From<String> for HalServiceError {
}

fn main() {
    if let Err(e) = inner_main() {
    if let Err(HalServiceError(e)) = inner_main() {
        panic!("HAL service failed: {:?}", e);
    }
}
+17 −13
Original line number Diff line number Diff line
@@ -121,12 +121,10 @@ typedef struct {
/* RTT configuration v3 (11az support)*/
typedef struct {
    wifi_rtt_config rtt_config;
    byte ntb_min_measurement_time_millis; // 11az Non-Trigger-based (non-TB) minimum measurement
                                          // time in milliseconds
    byte ntb_max_measurement_time_millis; // 11az Non-Trigger-based (non-TB) maximum measurement
                                          // time in milliseconds
    byte tx_ltf_repetition_count;         // Multiple transmissions of HE-LTF symbols in an HE
                                          // Ranging NDP. A value of 1 indicates no repetition.
    u64 ntb_min_measurement_time; // 11az Non-Trigger-based (non-TB) minimum measurement time in
                                  // units of 100 microseconds
    u64 ntb_max_measurement_time; // 11az Non-Trigger-based (non-TB) maximum measurement time in
                                  // units of 10 milliseconds
} wifi_rtt_config_v3;

/* RTT results */
@@ -184,11 +182,19 @@ typedef struct {
/* RTT results v3 (11az support)*/
typedef struct {
  wifi_rtt_result_v2 rtt_result;
  int tx_ltf_repetition_count;         // 11az Transmit LTF repetitions used to get this result.
  int ntb_min_measurement_time_millis; // Minimum non-trigger based (non-TB) dynamic measurement
                                       // time in milliseconds assigned by the 11az responder.
  int ntb_max_measurement_time_millis; // Maximum non-trigger based (non-TB) dynamic measurement
                                       // time in milliseconds assigned by the 11az responder.
  byte i2r_tx_ltf_repetition_count;// Multiple transmissions of HE-LTF symbols in an HE (I2R)
                                   // Ranging NDP. An HE-LTF repetition value of 1 indicates no
                                   // repetitions.
  byte r2i_tx_ltf_repetition_count;// Multiple transmissions of HE-LTF symbols in an HE (R2I)
                                   // Ranging NDP. An HE-LTF repetition value of 1 indicates no
                                   // repetitions.
  u64 ntb_min_measurement_time;    // Minimum non-trigger based (non-TB) dynamic measurement time
                                   // in units of 100 microseconds assigned by the 11az responder.
  u64 ntb_max_measurement_time;    // Maximum non-trigger based (non-TB) dynamic measurement
                                   // time in units of 10 milliseconds assigned by the 11az
                                   // responder.
  byte num_tx_sts;                 // Number of transmit space-time streams used.
  byte num_rx_sts;                 // Number of receive space-time streams used.
} wifi_rtt_result_v3;


@@ -305,8 +311,6 @@ typedef struct {
    byte az_bw_support;             // bit mask indicates what BW is supported by 11az initiator
    byte ntb_initiator_supported;   // if 11az non-TB initiator is supported
    byte ntb_responder_supported;   // if 11az non-TB responder is supported
    byte max_tx_ltf_repetition_count;// maximum HE LTF repetitions the 11az initiator is capable of
                                    // transmitting in the preamble of I2R NDP
} wifi_rtt_capabilities_v3;

/*  RTT capabilities v3 of the device (11az support) */
Loading