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

Commit fa186954 authored by weichinweng's avatar weichinweng Committed by android-build-merger
Browse files

Merge "Hearing Aid: set BLE phy to 2M if local and peer indicate PHY 2M...

Merge "Hearing Aid: set BLE phy to 2M if local and peer indicate PHY 2M support" am: 053253c0 am: 96423438 am: 53ac630a
am: 7a7f5aa2

Change-Id: I3fd68d83c93e49333eb715934baa406a910611db
parents c29bb857 7a7f5aa2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -390,6 +390,13 @@ class HearingAidImpl : public HearingAid {
      hearingDevice->connection_update_status = AWAITING;
    }

    tACL_CONN* p_acl = btm_bda_to_acl(address, BT_TRANSPORT_LE);
    if (p_acl != nullptr && controller_get_interface()->supports_ble_2m_phy() &&
        HCI_LE_2M_PHY_SUPPORTED(p_acl->peer_le_features)) {
      LOG(INFO) << address << " set preferred PHY to 2M";
      BTM_BleSetPhy(address, PHY_LE_2M, PHY_LE_2M, 0);
    }

    // Set data length
    // TODO(jpawlowski: for 16khz only 87 is required, optimize
    BTM_SetBleDataLength(address, 167);