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

Commit ab6eb209 authored by Alice Kuo's avatar Alice Kuo Committed by Automerger Merge Worker
Browse files

Merge "Retry and cache symmetric PHY setting as remote reject the CIS request"...

Merge "Retry and cache symmetric PHY setting as remote reject the CIS request" into main am: 066a6f5a

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2856965



Change-Id: Ica0f1f630c2f095fd218a9c69bf9f9ff9c793bdd
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2ea24035 066a6f5a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@
#include <android/sysprop/BluetoothProperties.sysprop.h>
#endif

#include <android_bluetooth_flags.h>

#include "devices.h"
#include "le_audio_types.h"

@@ -82,6 +84,7 @@ class LeAudioDeviceGroup {
  bool is_output_preference_le_audio;
  bool is_duplex_preference_le_audio;
  DsaMode dsa_mode_;
  bool asymmetric_phy_for_unidirectional_cis_supported;

  explicit LeAudioDeviceGroup(const int group_id)
      : group_id_(group_id),
@@ -118,6 +121,8 @@ class LeAudioDeviceGroup {
    is_output_preference_le_audio = true;
    is_duplex_preference_le_audio = true;
#endif
    asymmetric_phy_for_unidirectional_cis_supported =
        IS_FLAG_ENABLED(asymmetric_phy_for_unidirectional_cis);
  }
  ~LeAudioDeviceGroup(void);

+9 −2
Original line number Diff line number Diff line
@@ -851,6 +851,13 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
        return;
      }

      if (event->status == HCI_ERR_UNSUPPORTED_REM_FEATURE &&
          group->asymmetric_phy_for_unidirectional_cis_supported == true &&
          group->GetSduInterval(le_audio::types::kLeAudioDirectionSource) ==
              0) {
        group->asymmetric_phy_for_unidirectional_cis_supported = false;
      }

      LOG_ERROR("CIS creation failed %d times, stopping the stream",
                leAudioDevice->cis_failed_to_be_established_retry_cnt_);
      leAudioDevice->cis_failed_to_be_established_retry_cnt_ = 0;
@@ -1373,8 +1380,8 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {

    // Use 1M Phy for the ACK packet from remote device to phone for better
    // sensitivity
    if (IS_FLAG_ENABLED(asymmetric_phy_for_unidirectional_cis) &&
        max_sdu_size_stom == 0 &&
    if (group->asymmetric_phy_for_unidirectional_cis_supported &&
        sdu_interval_stom == 0 &&
        (phy_stom & bluetooth::hci::kIsoCigPhy1M) != 0) {
      LOG_INFO("Use asymmetric PHY for unidirectional CIS");
      phy_stom = bluetooth::hci::kIsoCigPhy1M;