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

Commit 04bba0b6 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Automerger Merge Worker
Browse files

Merge "leaudio: Fix for stream reconfiguration" am: a5795b52

parents 388fa683 a5795b52
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2028,6 +2028,17 @@ void LeAudioDeviceGroup::AddToAllowListNotConnectedGroupMembers(int gatt_if) {
  }
}

bool LeAudioDeviceGroup::IsConfiguredForContext(
    types::LeAudioContextType context_type) {
  /* Check if all connected group members are configured */
  if (GetConfigurationContextType() != context_type) {
    return false;
  }

  /* Check if used configuration is same as the active one.*/
  return (stream_conf.conf == GetActiveConfiguration());
}

bool LeAudioDeviceGroup::IsConfigurationSupported(
    LeAudioDevice* leAudioDevice,
    const set_configurations::AudioSetConfiguration* audio_set_conf) {
+1 −0
Original line number Diff line number Diff line
@@ -384,6 +384,7 @@ class LeAudioDeviceGroup {
      const types::BidirectionalPair<std::vector<uint8_t>>& ccid_lists);
  void CreateStreamVectorForOffloader(uint8_t direction);
  void StreamOffloaderUpdated(uint8_t direction);
  bool IsConfiguredForContext(types::LeAudioContextType context_type);

  inline types::AseState GetState(void) const { return current_state_; }
  void SetState(types::AseState state) {
+1 −1
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {

    switch (group->GetState()) {
      case AseState::BTA_LE_AUDIO_ASE_STATE_CODEC_CONFIGURED:
        if (group->GetConfigurationContextType() == context_type) {
        if (group->IsConfiguredForContext(context_type)) {
          if (group->Activate(context_type)) {
            SetTargetState(group, AseState::BTA_LE_AUDIO_ASE_STATE_STREAMING);
            if (CigCreate(group)) {