Loading system/bta/le_audio/state_machine.cc +4 −3 Original line number Original line Diff line number Diff line Loading @@ -718,12 +718,13 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine { uint8_t value = 0; uint8_t value = 0; if (ases_pair.sink && ases_pair.sink->data_path_state == if (ases_pair.sink && ases_pair.sink->data_path_state == AudioStreamDataPathState::CIS_ESTABLISHED) { AudioStreamDataPathState::DATA_PATH_ESTABLISHED) { value |= bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput; value |= bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput; } } if (ases_pair.source && ases_pair.source->data_path_state == if (ases_pair.source && AudioStreamDataPathState::CIS_ESTABLISHED) { ases_pair.source->data_path_state == AudioStreamDataPathState::DATA_PATH_ESTABLISHED) { value |= bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionOutput; value |= bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionOutput; } } IsoManager::GetInstance()->RemoveIsoDataPath(cis_conn_hdl, value); IsoManager::GetInstance()->RemoveIsoDataPath(cis_conn_hdl, value); Loading system/bta/le_audio/state_machine_test.cc +17 −3 Original line number Original line Diff line number Diff line Loading @@ -1574,7 +1574,11 @@ TEST_F(StateMachineTest, testDisableSingle) { EXPECT_CALL(*mock_iso_manager_, CreateCig(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, CreateCig(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, EstablishCis(_)).Times(1); EXPECT_CALL(*mock_iso_manager_, EstablishCis(_)).Times(1); EXPECT_CALL(*mock_iso_manager_, SetupIsoDataPath(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, SetupIsoDataPath(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, RemoveIsoDataPath(_, _)).Times(1); EXPECT_CALL( *mock_iso_manager_, RemoveIsoDataPath( _, bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput)) .Times(1); EXPECT_CALL(*mock_iso_manager_, DisconnectCis(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, DisconnectCis(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, RemoveCig(_)).Times(0); EXPECT_CALL(*mock_iso_manager_, RemoveCig(_)).Times(0); Loading Loading @@ -1637,7 +1641,11 @@ TEST_F(StateMachineTest, testDisableMultiple) { EXPECT_CALL(*mock_iso_manager_, CreateCig(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, CreateCig(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, EstablishCis(_)).Times(1); EXPECT_CALL(*mock_iso_manager_, EstablishCis(_)).Times(1); EXPECT_CALL(*mock_iso_manager_, SetupIsoDataPath(_, _)).Times(2); EXPECT_CALL(*mock_iso_manager_, SetupIsoDataPath(_, _)).Times(2); EXPECT_CALL(*mock_iso_manager_, RemoveIsoDataPath(_, _)).Times(2); EXPECT_CALL( *mock_iso_manager_, RemoveIsoDataPath( _, bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput)) .Times(2); EXPECT_CALL(*mock_iso_manager_, DisconnectCis(_, _)).Times(2); EXPECT_CALL(*mock_iso_manager_, DisconnectCis(_, _)).Times(2); EXPECT_CALL(*mock_iso_manager_, RemoveCig(_)).Times(0); EXPECT_CALL(*mock_iso_manager_, RemoveCig(_)).Times(0); Loading Loading @@ -1695,7 +1703,13 @@ TEST_F(StateMachineTest, testDisableBidirectional) { EXPECT_CALL(*mock_iso_manager_, CreateCig(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, CreateCig(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, EstablishCis(_)).Times(1); EXPECT_CALL(*mock_iso_manager_, EstablishCis(_)).Times(1); EXPECT_CALL(*mock_iso_manager_, SetupIsoDataPath(_, _)).Times(2); EXPECT_CALL(*mock_iso_manager_, SetupIsoDataPath(_, _)).Times(2); EXPECT_CALL(*mock_iso_manager_, RemoveIsoDataPath(_, _)).Times(1); EXPECT_CALL( *mock_iso_manager_, RemoveIsoDataPath( _, bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput | bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionOutput)) .Times(1); EXPECT_CALL(*mock_iso_manager_, DisconnectCis(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, DisconnectCis(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, RemoveCig(_)).Times(0); EXPECT_CALL(*mock_iso_manager_, RemoveCig(_)).Times(0); Loading Loading
system/bta/le_audio/state_machine.cc +4 −3 Original line number Original line Diff line number Diff line Loading @@ -718,12 +718,13 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine { uint8_t value = 0; uint8_t value = 0; if (ases_pair.sink && ases_pair.sink->data_path_state == if (ases_pair.sink && ases_pair.sink->data_path_state == AudioStreamDataPathState::CIS_ESTABLISHED) { AudioStreamDataPathState::DATA_PATH_ESTABLISHED) { value |= bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput; value |= bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput; } } if (ases_pair.source && ases_pair.source->data_path_state == if (ases_pair.source && AudioStreamDataPathState::CIS_ESTABLISHED) { ases_pair.source->data_path_state == AudioStreamDataPathState::DATA_PATH_ESTABLISHED) { value |= bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionOutput; value |= bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionOutput; } } IsoManager::GetInstance()->RemoveIsoDataPath(cis_conn_hdl, value); IsoManager::GetInstance()->RemoveIsoDataPath(cis_conn_hdl, value); Loading
system/bta/le_audio/state_machine_test.cc +17 −3 Original line number Original line Diff line number Diff line Loading @@ -1574,7 +1574,11 @@ TEST_F(StateMachineTest, testDisableSingle) { EXPECT_CALL(*mock_iso_manager_, CreateCig(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, CreateCig(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, EstablishCis(_)).Times(1); EXPECT_CALL(*mock_iso_manager_, EstablishCis(_)).Times(1); EXPECT_CALL(*mock_iso_manager_, SetupIsoDataPath(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, SetupIsoDataPath(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, RemoveIsoDataPath(_, _)).Times(1); EXPECT_CALL( *mock_iso_manager_, RemoveIsoDataPath( _, bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput)) .Times(1); EXPECT_CALL(*mock_iso_manager_, DisconnectCis(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, DisconnectCis(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, RemoveCig(_)).Times(0); EXPECT_CALL(*mock_iso_manager_, RemoveCig(_)).Times(0); Loading Loading @@ -1637,7 +1641,11 @@ TEST_F(StateMachineTest, testDisableMultiple) { EXPECT_CALL(*mock_iso_manager_, CreateCig(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, CreateCig(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, EstablishCis(_)).Times(1); EXPECT_CALL(*mock_iso_manager_, EstablishCis(_)).Times(1); EXPECT_CALL(*mock_iso_manager_, SetupIsoDataPath(_, _)).Times(2); EXPECT_CALL(*mock_iso_manager_, SetupIsoDataPath(_, _)).Times(2); EXPECT_CALL(*mock_iso_manager_, RemoveIsoDataPath(_, _)).Times(2); EXPECT_CALL( *mock_iso_manager_, RemoveIsoDataPath( _, bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput)) .Times(2); EXPECT_CALL(*mock_iso_manager_, DisconnectCis(_, _)).Times(2); EXPECT_CALL(*mock_iso_manager_, DisconnectCis(_, _)).Times(2); EXPECT_CALL(*mock_iso_manager_, RemoveCig(_)).Times(0); EXPECT_CALL(*mock_iso_manager_, RemoveCig(_)).Times(0); Loading Loading @@ -1695,7 +1703,13 @@ TEST_F(StateMachineTest, testDisableBidirectional) { EXPECT_CALL(*mock_iso_manager_, CreateCig(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, CreateCig(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, EstablishCis(_)).Times(1); EXPECT_CALL(*mock_iso_manager_, EstablishCis(_)).Times(1); EXPECT_CALL(*mock_iso_manager_, SetupIsoDataPath(_, _)).Times(2); EXPECT_CALL(*mock_iso_manager_, SetupIsoDataPath(_, _)).Times(2); EXPECT_CALL(*mock_iso_manager_, RemoveIsoDataPath(_, _)).Times(1); EXPECT_CALL( *mock_iso_manager_, RemoveIsoDataPath( _, bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionInput | bluetooth::hci::iso_manager::kRemoveIsoDataPathDirectionOutput)) .Times(1); EXPECT_CALL(*mock_iso_manager_, DisconnectCis(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, DisconnectCis(_, _)).Times(1); EXPECT_CALL(*mock_iso_manager_, RemoveCig(_)).Times(0); EXPECT_CALL(*mock_iso_manager_, RemoveCig(_)).Times(0); Loading