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

Commit eef547f3 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"...

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

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



Change-Id: I46e0d1e0d4a8f19e73e7b5e5231a5138af039c48
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 48e2221a d1659755
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -488,7 +488,8 @@ class BroadcastStateMachineImpl : public BroadcastStateMachine {


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


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


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


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

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


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


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

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


  // Setup and remove data paths for all CISes
  // Setup and remove data paths for all CISes
  path_params.data_path_dir =
  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) {
  for (auto& handle : volatile_test_cig_create_cmpl_evt_.conn_handles) {
    IsoManager::GetInstance()->SetupIsoDataPath(handle, path_params);
    IsoManager::GetInstance()->SetupIsoDataPath(handle, path_params);


Loading