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

Commit b019a136 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes I74548185,I7cbdc8b8 am: e6845aef am: bf820592 am: 02fa7023 am: a509e45f

parents 0c78fa89 a509e45f
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -3299,12 +3299,12 @@ class LeAudioClientImpl : public LeAudioClient {
        stream_setup_start_timestamp_ = 0;
        if (group && group->IsPendingConfiguration()) {
          SuspendedForReconfiguration();
          if (!groupStateMachine_->ConfigureStream(group,
          if (groupStateMachine_->ConfigureStream(group,
                                                  current_context_type_)) {
            // DO SOMETHING
          }
            /* If configuration succeed wait for new status. */
            return;
          }
        }
        CancelStreamingRequest();
        HandlePendingAvailableContexts(group);
        break;
+16 −31
Original line number Diff line number Diff line
@@ -709,6 +709,19 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
    }
  }

  static void RemoveDataPathByCisHandle(LeAudioDevice* leAudioDevice,
                                        uint16_t cis_conn_hdl) {
    auto ases_pair = leAudioDevice->GetAsesByCisConnHdl(cis_conn_hdl);
    IsoManager::GetInstance()->RemoveIsoDataPath(
        cis_conn_hdl,
        (ases_pair.sink
             ? bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput
             : 0x00) |
            (ases_pair.source ? bluetooth::hci::iso_manager::
                                    kRemoveIsoDataPathDirectionOutput
                              : 0x00));
  }

  void ProcessHciNotifCisDisconnected(
      LeAudioDeviceGroup* group, LeAudioDevice* leAudioDevice,
      const bluetooth::hci::iso_manager::cis_disconnected_evt* event) override {
@@ -825,18 +838,9 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
    }

    LOG_ASSERT(ase) << __func__ << " shouldn't be called without an active ASE";
    ases_pair = leAudioDevice->GetAsesByCisConnHdl(ase->cis_conn_hdl);

    if (ase->data_path_state ==
        AudioStreamDataPathState::DATA_PATH_ESTABLISHED) {
      IsoManager::GetInstance()->RemoveIsoDataPath(
          ase->cis_conn_hdl,
          (ases_pair.sink
               ? bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionOutput
               : 0x00) |
              (ases_pair.source ? bluetooth::hci::iso_manager::
                                      kRemoveIsoDataPathDirectionInput
                                : 0x00));
      RemoveDataPathByCisHandle(leAudioDevice, ase->cis_conn_hdl);
    }
  }

@@ -1065,17 +1069,7 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
        AudioStreamDataPathState::DATA_PATH_ESTABLISHED);
    LOG_ASSERT(ase) << __func__
                    << " Shouldn't be called without an active ASE.";

    auto ases_pair = leAudioDevice->GetAsesByCisConnHdl(ase->cis_conn_hdl);

    IsoManager::GetInstance()->RemoveIsoDataPath(
        ase->cis_conn_hdl,
        (ases_pair.sink
             ? bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionOutput
             : 0x00) |
            (ases_pair.source
                 ? bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput
                 : 0x00));
    RemoveDataPathByCisHandle(leAudioDevice, ase->cis_conn_hdl);
  }

  void AseStateMachineProcessIdle(
@@ -1899,16 +1893,7 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {

        if (ase->data_path_state ==
            AudioStreamDataPathState::DATA_PATH_ESTABLISHED) {
          auto ases_pair =
              leAudioDevice->GetAsesByCisConnHdl(ase->cis_conn_hdl);
          IsoManager::GetInstance()->RemoveIsoDataPath(
              ase->cis_conn_hdl,
              (ases_pair.sink ? bluetooth::hci::iso_manager::
                                    kRemoveIsoDataPathDirectionOutput
                              : 0x00) |
                  (ases_pair.source ? bluetooth::hci::iso_manager::
                                          kRemoveIsoDataPathDirectionInput
                                    : 0x00));
          RemoveDataPathByCisHandle(leAudioDevice, ase->cis_conn_hdl);
        } else if (ase->data_path_state ==
                       AudioStreamDataPathState::CIS_ESTABLISHED ||
                   ase->data_path_state ==