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

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

Merge "leaudio: Fix for removing data path" am: 92675f77 am: dec3b73e am:...

Merge "leaudio: Fix for removing data path" am: 92675f77 am: dec3b73e am: d0e1f596 am: 3ddb6655

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2178115



Change-Id: Iec1c9a7199b959f6b87d01bd0bd6ecb1c865bbca
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9da802dc 3ddb6655
Loading
Loading
Loading
Loading
+17 −13
Original line number Original line Diff line number Diff line
@@ -487,11 +487,11 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
                                        uint8_t status,
                                        uint8_t status,
                                        uint16_t conn_hdl) override {
                                        uint16_t conn_hdl) override {
    if (status != HCI_SUCCESS) {
    if (status != HCI_SUCCESS) {
      LOG(ERROR) << __func__ << ", failed to remove ISO data path, reason: "
      LOG_ERROR(
                 << loghex(status);
          "failed to remove ISO data path, reason: 0x%0x - contining stream "
      StopStream(group);
          "closing",

          status);
      return;
      /* Just continue - disconnecting CIS removes data path as well.*/
    }
    }


    bool do_disconnect = false;
    bool do_disconnect = false;
@@ -740,14 +740,18 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
  static void RemoveDataPathByCisHandle(LeAudioDevice* leAudioDevice,
  static void RemoveDataPathByCisHandle(LeAudioDevice* leAudioDevice,
                                        uint16_t cis_conn_hdl) {
                                        uint16_t cis_conn_hdl) {
    auto ases_pair = leAudioDevice->GetAsesByCisConnHdl(cis_conn_hdl);
    auto ases_pair = leAudioDevice->GetAsesByCisConnHdl(cis_conn_hdl);
    IsoManager::GetInstance()->RemoveIsoDataPath(
    uint8_t value = 0;
        cis_conn_hdl,

        (ases_pair.sink
    if (ases_pair.sink && ases_pair.sink->data_path_state ==
             ? bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput
                              AudioStreamDataPathState::CIS_ESTABLISHED) {
             : 0x00) |
      value |= bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput;
            (ases_pair.source ? bluetooth::hci::iso_manager::
    }
                                    kRemoveIsoDataPathDirectionOutput

                              : 0x00));
    if (ases_pair.source && ases_pair.source->data_path_state ==
                              AudioStreamDataPathState::CIS_ESTABLISHED) {
      value |= bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionOutput;
    }
    IsoManager::GetInstance()->RemoveIsoDataPath(cis_conn_hdl, value);
  }
  }


  void ProcessHciNotifCisDisconnected(
  void ProcessHciNotifCisDisconnected(