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

Commit dd2779ef authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: Move QoS Configured state to right place

Make sure QOS_CONFIGURED state is set after remote device has all active
ASEs in the QOS_CONFIGURED state

Bug: 331775328
Flag: Exempt, regression tested with unit tests
Test: atest bluetooth_le_audio_test
Change-Id: I5c7bae06fc197e44f41c7fc156c2c8f0e40bfbad
parent 86689dba
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -505,9 +505,6 @@ public:
    /* Assign all connection handles to multiple device ASEs */
    group->AssignCisConnHandlesToAses();

    /* Last node configured, process group to codec configured state */
    group->SetState(AseState::BTA_LE_AUDIO_ASE_STATE_QOS_CONFIGURED);

    PrepareAndSendQoSToTheGroup(group);
  }

@@ -2230,6 +2227,8 @@ private:
          return;
        }

        group->SetState(AseState::BTA_LE_AUDIO_ASE_STATE_QOS_CONFIGURED);

        PrepareAndSendEnableToTheGroup(group);

        break;
+3 −2
Original line number Diff line number Diff line
@@ -1806,13 +1806,14 @@ TEST_F(StateMachineTest, testConfigureCodecSingleFb2) {
   */
  auto* leAudioDevice = group->GetFirstDevice();
  PrepareConfigureCodecHandler(group, 1);
  PrepareConfigureQosHandler(group, 1);

  /* Start the configuration and stream Media content.
   * Expect 2 times: for Codec Configure & QoS Configure */
   * Expect 3 times: for Codec Configure & QoS Configure & Enable */
  EXPECT_CALL(gatt_queue,
              WriteCharacteristic(leAudioDevice->conn_id_, leAudioDevice->ctp_hdls_.val_hdl, _,
                                  GATT_WRITE_NO_RSP, _, _))
          .Times(2);
          .Times(3);

  InjectInitialIdleNotification(group);