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

Commit 417f22d4 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Gerrit Code Review
Browse files

Merge "leaudio: Fix stopStream while late attach." into main

parents ec4a8afc 9142b5e6
Loading
Loading
Loading
Loading
+20 −4
Original line number Diff line number Diff line
@@ -2082,10 +2082,10 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
          log::debug(
              "Autonomus change for device {}, ase id {}. Just store it.",
              leAudioDevice->address_, ase->id);

          /* Since at least one ASE is in configured state, we should admit
           * group is configured state */
          if (group->HaveAllActiveDevicesAsesTheSameState(
                  AseState::BTA_LE_AUDIO_ASE_STATE_CODEC_CONFIGURED)) {
            group->SetState(AseState::BTA_LE_AUDIO_ASE_STATE_CODEC_CONFIGURED);
          }
          return;
        }

@@ -2359,6 +2359,14 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
        SetAseState(leAudioDevice, ase,
                    AseState::BTA_LE_AUDIO_ASE_STATE_QOS_CONFIGURED);

        if (group->GetTargetState() !=
            AseState::BTA_LE_AUDIO_ASE_STATE_STREAMING) {
          log::warn("{}, ase_id: {}, target state: {}", leAudioDevice->address_,
                    ase->id, ToString(group->GetTargetState()));
          group->PrintDebugState();
          return;
        }

        if (!leAudioDevice->HaveAllActiveAsesSameState(
                AseState::BTA_LE_AUDIO_ASE_STATE_QOS_CONFIGURED)) {
          /* More ASEs notification from this device has to come for this group
@@ -2854,6 +2862,14 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
        SetAseState(leAudioDevice, ase,
                    AseState::BTA_LE_AUDIO_ASE_STATE_ENABLING);

        if (group->GetTargetState() !=
            AseState::BTA_LE_AUDIO_ASE_STATE_STREAMING) {
          log::warn("{}, ase_id: {}, target state: {}", leAudioDevice->address_,
                    ase->id, ToString(group->GetTargetState()));
          group->PrintDebugState();
          return;
        }

        if (group->GetState() == AseState::BTA_LE_AUDIO_ASE_STATE_STREAMING) {
          if (ase->cis_state < CisState::CONNECTING) {
            /* We are here because of the reconnection of the single device. */
+743 −12

File changed.

Preview size limit exceeded, changes collapsed.