summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-07-23 07:28:05 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-07-23 07:28:05 +0000
commit76e9a0eb5af51636428b5f6b47a47b75f2a507f5 (patch)
tree38d106abd6b15e8298f4bf6662170c871dc51f96
parent4b318647307715488ecdfcc5ae4f224ddb2497a7 (diff)
parentb53fcadb1b321a425a5e044c6037094c733b7894 (diff)
downloadandroid_system_bt-76e9a0eb5af51636428b5f6b47a47b75f2a507f5.tar.gz
android_system_bt-76e9a0eb5af51636428b5f6b47a47b75f2a507f5.tar.bz2
android_system_bt-76e9a0eb5af51636428b5f6b47a47b75f2a507f5.zip
release-request-52da03e1-319b-479f-b7b2-2df79bc638cf-for-git_oc-dr1-release-4207440 snap-temp-L67200000085022454
Change-Id: I5d6a42d9833f5eaa7c21f1b27c966e933029ff51
-rw-r--r--bta/av/bta_av_aact.cc7
-rw-r--r--bta/dm/bta_dm_act.cc7
-rw-r--r--device/include/interop_database.h6
-rw-r--r--stack/a2dp/a2dp_sbc_encoder.cc21
4 files changed, 29 insertions, 12 deletions
diff --git a/bta/av/bta_av_aact.cc b/bta/av/bta_av_aact.cc
index 74311d815..acc4c2c5f 100644
--- a/bta/av/bta_av_aact.cc
+++ b/bta/av/bta_av_aact.cc
@@ -1363,7 +1363,12 @@ void bta_av_str_opened(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
p = BTM_ReadRemoteFeatures(p_scb->peer_addr);
if (p != NULL) {
if (HCI_EDR_ACL_2MPS_SUPPORTED(p)) open.edr |= BTA_AV_EDR_2MBPS;
- if (HCI_EDR_ACL_3MPS_SUPPORTED(p)) open.edr |= BTA_AV_EDR_3MBPS;
+ if (HCI_EDR_ACL_3MPS_SUPPORTED(p)) {
+ if (!interop_match_addr(INTEROP_2MBPS_LINK_ONLY,
+ (const bt_bdaddr_t*)&p_scb->peer_addr)) {
+ open.edr |= BTA_AV_EDR_3MBPS;
+ }
+ }
}
#if (BTA_AR_INCLUDED == TRUE)
bta_ar_avdt_conn(BTA_ID_AV, open.bd_addr);
diff --git a/bta/dm/bta_dm_act.cc b/bta/dm/bta_dm_act.cc
index a215c49fa..f708cc63c 100644
--- a/bta/dm/bta_dm_act.cc
+++ b/bta/dm/bta_dm_act.cc
@@ -2612,10 +2612,9 @@ static uint8_t bta_dm_authentication_complete_cback(
if (bta_dm_cb.p_sec_cback)
bta_dm_cb.p_sec_cback(BTA_DM_AUTH_CMPL_EVT, &sec_event);
- if (result != HCI_ERR_LMP_RESPONSE_TIMEOUT &&
- result != HCI_ERR_PAGE_TIMEOUT && result != HCI_ERR_CONNECTION_TOUT &&
- result != HCI_ERR_CONN_FAILED_ESTABLISHMENT &&
- result != HCI_ERR_KEY_MISSING) {
+ if (result == HCI_ERR_AUTH_FAILURE || result == HCI_ERR_KEY_MISSING ||
+ result == HCI_ERR_HOST_REJECT_SECURITY ||
+ result == HCI_ERR_ENCRY_MODE_NOT_ACCEPTABLE) {
bdstr_t bd_addr_str;
APPL_TRACE_WARNING("%s deleting %s - result: 0x%02x", __func__,
bdaddr_to_string((bt_bdaddr_t*)bd_addr, bd_addr_str,
diff --git a/device/include/interop_database.h b/device/include/interop_database.h
index fb94a1146..bac07397b 100644
--- a/device/include/interop_database.h
+++ b/device/include/interop_database.h
@@ -70,6 +70,12 @@ static const interop_addr_entry_t interop_addr_database[] = {
// JayBird Family
{{{0x00, 0x18, 0x91, 0, 0, 0}}, 3, INTEROP_2MBPS_LINK_ONLY},
+ // Sony MBH-10
+ {{{0x20, 0x15, 0x06, 0, 0, 0}}, 3, INTEROP_2MBPS_LINK_ONLY},
+
+ // Uconnect
+ {{{0x9c, 0xdf, 0x03, 0, 0, 0}}, 3, INTEROP_2MBPS_LINK_ONLY},
+
// LG Tone HBS-730 - unacceptably loud volume
{{{0x00, 0x18, 0x6b, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
{{{0xb8, 0xad, 0x3e, 0, 0, 0}}, 3, INTEROP_DISABLE_ABSOLUTE_VOLUME},
diff --git a/stack/a2dp/a2dp_sbc_encoder.cc b/stack/a2dp/a2dp_sbc_encoder.cc
index 5d48c7903..e4c20499c 100644
--- a/stack/a2dp/a2dp_sbc_encoder.cc
+++ b/stack/a2dp/a2dp_sbc_encoder.cc
@@ -753,14 +753,21 @@ static uint8_t calculate_max_frames_per_packet(void) {
LOG_VERBOSE(LOG_TAG, "%s: original AVDTP MTU size: %d", __func__,
a2dp_sbc_encoder_cb.TxAaMtuSize);
+ if (a2dp_sbc_encoder_cb.is_peer_edr &&
+ !a2dp_sbc_encoder_cb.peer_supports_3mbps) {
+ // This condition would be satisfied only if the remote device is
+ // EDR and supports only 2 Mbps, but the effective AVDTP MTU size
+ // exceeds the 2DH5 packet size.
+ LOG_VERBOSE(LOG_TAG,
+ "%s: The remote device is EDR but does not support 3 Mbps",
+ __func__);
- // Restrict the MTU - even though some Sink devices are advertising large
- // MTU, they are not able to handle the packets and are stuttering.
- if (effective_mtu_size > MAX_2MBPS_AVDTP_MTU) {
- LOG_WARN(LOG_TAG, "%s: Restricting AVDTP MTU size to %d", __func__,
- MAX_2MBPS_AVDTP_MTU);
- effective_mtu_size = MAX_2MBPS_AVDTP_MTU;
- a2dp_sbc_encoder_cb.TxAaMtuSize = effective_mtu_size;
+ if (effective_mtu_size > MAX_2MBPS_AVDTP_MTU) {
+ LOG_WARN(LOG_TAG, "%s: Restricting AVDTP MTU size to %d", __func__,
+ MAX_2MBPS_AVDTP_MTU);
+ effective_mtu_size = MAX_2MBPS_AVDTP_MTU;
+ a2dp_sbc_encoder_cb.TxAaMtuSize = effective_mtu_size;
+ }
}
if (!p_encoder_params->s16NumOfSubBands) {