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

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

Merge "Correct the data path direction setting in HCI_LE_Remove_ISO_data_path" am: deda9de1

parents 5c984657 deda9de1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -488,7 +488,8 @@ class BroadcastStateMachineImpl : public BroadcastStateMachine {

    SetMuted(true);
    IsoManager::GetInstance()->RemoveIsoDataPath(
        conn_handle, bluetooth::hci::iso_manager::kIsoDataPathDirectionIn);
        conn_handle,
        bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput);
  }

  void HandleHciEvent(uint16_t event, void* data) override {
+14 −13
Original line number Diff line number Diff line
@@ -800,10 +800,10 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
      IsoManager::GetInstance()->RemoveIsoDataPath(
          ase->cis_conn_hdl,
          (ases_pair.sink
               ? bluetooth::hci::iso_manager::kIsoDataPathDirectionOut
               ? bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionOutput
               : 0x00) |
              (ases_pair.source
                   ? bluetooth::hci::iso_manager::kIsoDataPathDirectionIn
              (ases_pair.source ? bluetooth::hci::iso_manager::
                                      kRemoveIsoDataPathDirectionInput
                                : 0x00));
    }
  }
@@ -1038,10 +1038,11 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {

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

@@ -1839,11 +1840,11 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
              leAudioDevice->GetAsesByCisConnHdl(ase->cis_conn_hdl);
          IsoManager::GetInstance()->RemoveIsoDataPath(
              ase->cis_conn_hdl,
              (ases_pair.sink
                   ? bluetooth::hci::iso_manager::kIsoDataPathDirectionOut
              (ases_pair.sink ? bluetooth::hci::iso_manager::
                                    kRemoveIsoDataPathDirectionOutput
                              : 0x00) |
                  (ases_pair.source
                       ? bluetooth::hci::iso_manager::kIsoDataPathDirectionIn
                  (ases_pair.source ? bluetooth::hci::iso_manager::
                                          kRemoveIsoDataPathDirectionInput
                                    : 0x00));
        } else if (ase->data_path_state ==
                       AudioStreamDataPathState::CIS_ESTABLISHED ||
+7 −1
Original line number Diff line number Diff line
@@ -4370,10 +4370,16 @@ packet LeSetupIsoDataPathComplete : CommandComplete (command_op_code = LE_SETUP_
  _reserved_ : 4,
}

enum RemoveDataPathDirection : 8 {
  INPUT = 1,
  OUTPUT = 2,
  INPUT_AND_OUTPUT = 3,
}

packet LeRemoveIsoDataPath : LeIsoCommand (op_code = LE_REMOVE_ISO_DATA_PATH) {
  connection_handle : 12,
  _reserved_ : 4,
  data_path_direction : DataPathDirection,
  remove_data_path_direction : RemoveDataPathDirection,
}

packet LeRemoveIsoDataPathComplete : CommandComplete (command_op_code = LE_REMOVE_ISO_DATA_PATH) {
+3 −0
Original line number Diff line number Diff line
@@ -44,6 +44,9 @@ namespace iso_manager {
constexpr uint8_t kIsoDataPathDirectionIn = 0x00;
constexpr uint8_t kIsoDataPathDirectionOut = 0x01;

constexpr uint8_t kRemoveIsoDataPathDirectionInput = 0x01;
constexpr uint8_t kRemoveIsoDataPathDirectionOutput = 0x02;

constexpr uint8_t kIsoDataPathHci = 0x00;
constexpr uint8_t kIsoDataPathPlatformDefault = 0x01;
constexpr uint8_t kIsoDataPathDisabled = 0xFF;
+1 −1
Original line number Diff line number Diff line
@@ -1674,7 +1674,7 @@ TEST_F(IsoManagerTest, RemoveIsoDataPathValid) {

  // Setup and remove data paths for all CISes
  path_params.data_path_dir =
      bluetooth::hci::iso_manager::kIsoDataPathDirectionIn;
      bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput;
  for (auto& handle : volatile_test_cig_create_cmpl_evt_.conn_handles) {
    IsoManager::GetInstance()->SetupIsoDataPath(handle, path_params);

Loading