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

Commit f03a14d5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "leaudio: Fix regression on data path removal"

parents 62f18822 b8a310f3
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -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);
+17 −3
Original line number Original line Diff line number Diff line
@@ -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);


@@ -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);


@@ -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);