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

Commit 24416aaa authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: Fix regression on call creation

Allow latency to be same as sdu interval.

Bug: 300216034
Test: atest bluetooth_le_audio_test
Tag: #feature
Change-Id: I47bff899acd3af5b074dc35327be24d4e555ea7c
parent 26922b3f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1250,10 +1250,13 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {

  static bool isIntervalAndLatencyProperlySet(uint32_t sdu_interval_us,
                                              uint16_t max_latency_ms) {
    LOG_VERBOSE("sdu_interval_us: %d, max_latency_ms: %d", sdu_interval_us,
                max_latency_ms);

    if (sdu_interval_us == 0) {
      return max_latency_ms == le_audio::types::kMaxTransportLatencyMin;
    }
    return ((1000 * max_latency_ms) > sdu_interval_us);
    return ((1000 * max_latency_ms) >= sdu_interval_us);
  }

  bool CigCreate(LeAudioDeviceGroup* group) {