system/bt
リビジョン | 1ca410710cd3b9263a1c3952054323fc74d523bf (tree) |
---|---|
日時 | 2019-07-11 12:12:33 |
作者 | android-build-team Robot <android-build-team-robot@goog...> |
コミッター | android-build-team Robot |
Snap for 5719479 from 8302b14c71086bc20629537c31336a6a537e07e5 to qt-c2f2-release
Change-Id: I789740cf00af42d9b3364d03145941cd8d15fa7e
@@ -390,6 +390,13 @@ class HearingAidImpl : public HearingAid { | ||
390 | 390 | hearingDevice->connection_update_status = AWAITING; |
391 | 391 | } |
392 | 392 | |
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 | + | |
393 | 400 | // Set data length |
394 | 401 | // TODO(jpawlowski: for 16khz only 87 is required, optimize |
395 | 402 | BTM_SetBleDataLength(address, 167); |
@@ -21,6 +21,7 @@ | ||
21 | 21 | #if (BTA_HH_INCLUDED == TRUE) |
22 | 22 | |
23 | 23 | #include "bta_hh_int.h" |
24 | +#include "btif/include/btif_storage.h" | |
24 | 25 | #include "device/include/interop.h" |
25 | 26 | #include "osi/include/osi.h" |
26 | 27 |
@@ -394,9 +395,14 @@ tBTA_HH_STATUS bta_hh_read_ssr_param(const RawAddress& bd_addr, | ||
394 | 395 | if (ssr_max_latency > BTA_HH_SSR_MAX_LATENCY_DEF) |
395 | 396 | ssr_max_latency = BTA_HH_SSR_MAX_LATENCY_DEF; |
396 | 397 | |
397 | - if (interop_match_addr(INTEROP_HID_HOST_LIMIT_SNIFF_INTERVAL, | |
398 | - &bd_addr)) { | |
399 | - if (ssr_max_latency > 18 /* slots * 0.625ms */) ssr_max_latency = 18; | |
398 | + char remote_name[BTM_MAX_REM_BD_NAME_LEN] = ""; | |
399 | + if (btif_storage_get_stored_remote_name(bd_addr, remote_name)) { | |
400 | + if (interop_match_name(INTEROP_HID_HOST_LIMIT_SNIFF_INTERVAL, | |
401 | + remote_name)) { | |
402 | + if (ssr_max_latency > 18 /* slots * 0.625ms */) { | |
403 | + ssr_max_latency = 18; | |
404 | + } | |
405 | + } | |
400 | 406 | } |
401 | 407 | |
402 | 408 | *p_max_ssr_lat = ssr_max_latency; |
@@ -143,10 +143,6 @@ static const interop_addr_entry_t interop_addr_database[] = { | ||
143 | 143 | |
144 | 144 | // AirPods 2 - unacceptably loud volume |
145 | 145 | {{{0x94, 0x16, 0x25, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME}, |
146 | - | |
147 | - // Nintendo Switch Pro Controller - does not set sniff interval dynamically. | |
148 | - // Requires custom HID report command to change mode. | |
149 | - {{{0x98, 0xB6, 0xE9, 0, 0, 0}}, 3, INTEROP_HID_HOST_LIMIT_SNIFF_INTERVAL}, | |
150 | 146 | }; |
151 | 147 | |
152 | 148 | typedef struct { |
@@ -173,4 +169,8 @@ static const interop_name_entry_t interop_name_database[] = { | ||
173 | 169 | |
174 | 170 | // Kenwood KMM-BT518HD - no audio when A2DP codec sample rate is changed |
175 | 171 | {"KMM-BT51*HD", 11, INTEROP_DISABLE_AVDTP_RECONFIGURE}, |
172 | + | |
173 | + // Nintendo Switch Pro Controller - does not set sniff interval dynamically. | |
174 | + // Requires custom HID report command to change mode. | |
175 | + {"Pro Controller", 14, INTEROP_HID_HOST_LIMIT_SNIFF_INTERVAL}, | |
176 | 176 | }; |