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

Commit 8b122cf9 authored by Alice Kuo's avatar Alice Kuo Committed by Gerrit Code Review
Browse files

Merge "Log improvement for unicast asymmetric PHY" into main

parents dbaa0af2 56ce7545
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -5821,7 +5821,7 @@ class LeAudioClientImpl : public LeAudioClient {
                 << ", Invalid group: " << static_cast<int>(active_group_id_);
    } else {
      handleAsymmetricPhyForUnicast(group);
      LOG_VERBOSE("ClientAudioInterfaceRelease - cleanup");
      log::info("ClientAudioInterfaceRelease - cleanup");
    }

    if (le_audio_source_hal_client_) {
@@ -5904,17 +5904,23 @@ class LeAudioClientImpl : public LeAudioClient {
  void SetAsymmetricBlePhy(LeAudioDeviceGroup* group, bool asymmetric) {
    LeAudioDevice* leAudioDevice = group->GetFirstDevice();
    if (leAudioDevice == nullptr) {
      LOG_ERROR("Shouldn't be called without a device.");
      log::error("Shouldn't be called without a device.");
      return;
    }

    for (auto tmpDevice = leAudioDevice; tmpDevice != nullptr;
         tmpDevice = group->GetNextDevice(tmpDevice)) {
      log::info(
          "tmpDevice->acl_asymmetric_: {}, asymmetric: {}, address: {}, "
          "acl_connected: {} ",
          tmpDevice->acl_asymmetric_ == asymmetric, asymmetric,
          ADDRESS_TO_LOGGABLE_CSTR(tmpDevice->address_),
          BTM_IsAclConnectionUp(tmpDevice->address_, BT_TRANSPORT_LE));
      if (tmpDevice->acl_asymmetric_ == asymmetric ||
          !BTM_IsAclConnectionUp(tmpDevice->address_, BT_TRANSPORT_LE))
        continue;

      LOG_VERBOSE("SetAsymmetricBlePhy: %d for %s", asymmetric,
      log::info("SetAsymmetricBlePhy: {} for {}", asymmetric,
                ADDRESS_TO_LOGGABLE_CSTR(tmpDevice->address_));
      BTM_BleSetPhy(tmpDevice->address_, PHY_LE_2M,
                    asymmetric ? PHY_LE_1M : PHY_LE_2M, 0);
+3 −0
Original line number Diff line number Diff line
@@ -975,6 +975,9 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {
          group->asymmetric_phy_for_unidirectional_cis_supported == true &&
          group->GetSduInterval(
              bluetooth::le_audio::types::kLeAudioDirectionSource) == 0) {
        log::info(
            "Remote device may not support asymmetric phy for CIS, retry "
            "symmetric setting again");
        group->asymmetric_phy_for_unidirectional_cis_supported = false;
      }