diff --git a/system/bta/le_audio/broadcaster/state_machine.cc b/system/bta/le_audio/broadcaster/state_machine.cc index bbf7a6c39070da0233fdde390d899760b223bb1e..af15c8ccb815eb6758b33d0caeb8ea1935eda248 100644 --- a/system/bta/le_audio/broadcaster/state_machine.cc +++ b/system/bta/le_audio/broadcaster/state_machine.cc @@ -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 { diff --git a/system/bta/le_audio/state_machine.cc b/system/bta/le_audio/state_machine.cc index 97d8a47d766e1fbceaa52cff591eff9da73b46db..b452e3b797475c3ddcdeaa34cf13a50a153c40f2 100644 --- a/system/bta/le_audio/state_machine.cc +++ b/system/bta/le_audio/state_machine.cc @@ -779,11 +779,11 @@ 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 - : 0x00)); + (ases_pair.source ? bluetooth::hci::iso_manager:: + kRemoveIsoDataPathDirectionInput + : 0x00)); } } @@ -1015,10 +1015,11 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine { IsoManager::GetInstance()->RemoveIsoDataPath( ase->cis_conn_hdl, - (ases_pair.sink ? bluetooth::hci::iso_manager::kIsoDataPathDirectionOut - : 0x00) | + (ases_pair.sink + ? bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionOutput + : 0x00) | (ases_pair.source - ? bluetooth::hci::iso_manager::kIsoDataPathDirectionIn + ? bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput : 0x00)); } @@ -1816,12 +1817,12 @@ 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 - : 0x00) | - (ases_pair.source - ? bluetooth::hci::iso_manager::kIsoDataPathDirectionIn - : 0x00)); + (ases_pair.sink ? bluetooth::hci::iso_manager:: + kRemoveIsoDataPathDirectionOutput + : 0x00) | + (ases_pair.source ? bluetooth::hci::iso_manager:: + kRemoveIsoDataPathDirectionInput + : 0x00)); } else if (ase->data_path_state == AudioStreamDataPathState::CIS_ESTABLISHED || ase->data_path_state == diff --git a/system/gd/hci/hci_packets.pdl b/system/gd/hci/hci_packets.pdl index fd179601e618c3daa828b0a62805b97061b0c2ec..2051261fc0bf0d9fb2712136722b2bd2ce00d16b 100644 --- a/system/gd/hci/hci_packets.pdl +++ b/system/gd/hci/hci_packets.pdl @@ -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) { diff --git a/system/stack/include/btm_iso_api_types.h b/system/stack/include/btm_iso_api_types.h index 05a444973fd7e54bd267098a34760e4cc80650f9..63ca700a8d9dcda67387cf5a939a3d7d4db12175 100644 --- a/system/stack/include/btm_iso_api_types.h +++ b/system/stack/include/btm_iso_api_types.h @@ -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; diff --git a/system/stack/test/btm_iso_test.cc b/system/stack/test/btm_iso_test.cc index f4984296f7f588a0536f1651fc3f2f9cb4f4e2c5..0505a7e94491e782d02a49713ad21effecfc3b46 100644 --- a/system/stack/test/btm_iso_test.cc +++ b/system/stack/test/btm_iso_test.cc @@ -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); diff --git a/tools/rootcanal/model/controller/dual_mode_controller.cc b/tools/rootcanal/model/controller/dual_mode_controller.cc index acd413b3681525aa52826f8504ad9d8e968501b0..3770fcfb11292a5f6499e0a3555ea60b9d9377ae 100644 --- a/tools/rootcanal/model/controller/dual_mode_controller.cc +++ b/tools/rootcanal/model/controller/dual_mode_controller.cc @@ -2299,7 +2299,8 @@ void DualModeController::LeRemoveIsoDataPath(CommandView command) { gd_hci::LeRemoveIsoDataPathView::Create(std::move(iso_command_view)); ASSERT(command_view.IsValid()); link_layer_controller_.LeRemoveIsoDataPath( - command_view.GetConnectionHandle(), command_view.GetDataPathDirection()); + command_view.GetConnectionHandle(), + command_view.GetRemoveDataPathDirection()); } void DualModeController::LeReadRemoteFeatures(CommandView command) { diff --git a/tools/rootcanal/model/controller/link_layer_controller.cc b/tools/rootcanal/model/controller/link_layer_controller.cc index 871a595dd23cf9933a01a93ebe6f3a57a6c1abe9..b4764cb6bdd83a217ebf7452614eadfbf21a5e7c 100644 --- a/tools/rootcanal/model/controller/link_layer_controller.cc +++ b/tools/rootcanal/model/controller/link_layer_controller.cc @@ -3395,7 +3395,7 @@ void LinkLayerController::LeSetupIsoDataPath( void LinkLayerController::LeRemoveIsoDataPath( uint16_t /* connection_handle */, - bluetooth::hci::DataPathDirection /* data_path_direction */) {} + bluetooth::hci::RemoveDataPathDirection /* remove_data_path_direction */) {} void LinkLayerController::HandleLeEnableEncryption( uint16_t handle, std::array<uint8_t, 8> rand, uint16_t ediv, diff --git a/tools/rootcanal/model/controller/link_layer_controller.h b/tools/rootcanal/model/controller/link_layer_controller.h index 6147fb4284f201d97956d4c7df723912d8af0397..0066c69c30a32b0ab3a7eb8525b6175e40d000f4 100644 --- a/tools/rootcanal/model/controller/link_layer_controller.h +++ b/tools/rootcanal/model/controller/link_layer_controller.h @@ -239,7 +239,7 @@ class LinkLayerController { std::vector<uint8_t> codec_configuration); void LeRemoveIsoDataPath( uint16_t connection_handle, - bluetooth::hci::DataPathDirection data_path_direction); + bluetooth::hci::RemoveDataPathDirection remove_data_path_direction); void HandleLeEnableEncryption(uint16_t handle, std::array<uint8_t, 8> rand, uint16_t ediv, std::array<uint8_t, 16> ltk);