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

Commit 1088e255 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "leaudio: Yet another improvements on data path" into tm-qpr-dev

parents 16d5eda3 5b0ccc5b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -727,6 +727,12 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
            AudioStreamDataPathState::DATA_PATH_ESTABLISHED) {
      value |= bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionOutput;
    }

    if (value == 0) {
      LOG_INFO("Data path was not set. Nothing to do here.");
      return;
    }

    IsoManager::GetInstance()->RemoveIsoDataPath(cis_conn_hdl, value);
  }

@@ -737,6 +743,11 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {

    FreeLinkQualityReports(leAudioDevice);

    /* If this is peer disconnecting CIS, make sure to clear data path */
    if (event->reason != HCI_ERR_CONN_CAUSE_LOCAL_HOST) {
      RemoveDataPathByCisHandle(leAudioDevice, event->cis_conn_hdl);
    }

    auto ases_pair = leAudioDevice->GetAsesByCisConnHdl(event->cis_conn_hdl);
    if (ases_pair.sink) {
      ases_pair.sink->data_path_state = AudioStreamDataPathState::CIS_ASSIGNED;