• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

Revisiona2bb603ac61fa5ba66b4219c95f252519b2235b9 (tree)
Time2019-07-10 11:07:39
Authorweichinweng <weichinweng@goog...>
CommiterUgo Yu

Log Message

Hearing Aid: set BLE phy to 2M if local and peer indicate PHY 2M support

Set the BLE phy to 2M if the BT controller and peer Hearing Aid device
indicate phy 2M support, otherwise, use default phy channel.

Bug: 135769508
Test: 1.Forget/Repair Hearing Aid device check whether phy is expected.
2.Disconnect/Reconnect Hearing Aid device check whether phy is expected.
3.HearingAid device power off/on, check whether phy is expected.

Change-Id: Ib410a8885f3a68c361bb97d5c9a3833f2a1be528
Merged-In: Ib410a8885f3a68c361bb97d5c9a3833f2a1be528
(cherry picked from commit 554c3598db5661ac0166eb12006d248a38723db1)

Change Summary

Incremental Difference

--- a/bta/hearing_aid/hearing_aid.cc
+++ b/bta/hearing_aid/hearing_aid.cc
@@ -390,6 +390,13 @@ class HearingAidImpl : public HearingAid {
390390 hearingDevice->connection_update_status = AWAITING;
391391 }
392392
393+ tACL_CONN* p_acl = btm_bda_to_acl(address, BT_TRANSPORT_LE);
394+ if (p_acl != nullptr && controller_get_interface()->supports_ble_2m_phy() &&
395+ HCI_LE_2M_PHY_SUPPORTED(p_acl->peer_le_features)) {
396+ LOG(INFO) << address << " set preferred PHY to 2M";
397+ BTM_BleSetPhy(address, PHY_LE_2M, PHY_LE_2M, 0);
398+ }
399+
393400 // Set data length
394401 // TODO(jpawlowski: for 16khz only 87 is required, optimize
395402 BTM_SetBleDataLength(address, 167);