From 4c240064ab0117958f145d4c01cfc5d66ab7b339 Mon Sep 17 00:00:00 2001 From: wangmengyang Date: Fri, 7 Sep 2018 12:07:59 +0800 Subject: [PATCH] component/bt: stop to inititate AVRC connection when A2DP connection fails to set up AVRCP connection binds to A2DP in current implementation, despite the two profiles are\ independent according to specification. AVRCP connection is not necessary to set-up \ if A2DP connection fails to establish --- components/bt/bluedroid/btc/profile/std/a2dp/btc_av.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/bt/bluedroid/btc/profile/std/a2dp/btc_av.c b/components/bt/bluedroid/btc/profile/std/a2dp/btc_av.c index 27842f3d3..a5d527e29 100644 --- a/components/bt/bluedroid/btc/profile/std/a2dp/btc_av.c +++ b/components/bt/bluedroid/btc/profile/std/a2dp/btc_av.c @@ -430,7 +430,8 @@ static BOOLEAN btc_av_state_opening_handler(btc_sm_event_t event, void *p_data) btc_rc_check_handle_pending_play(p_bta_data->open.bd_addr, (p_bta_data->open.status == BTA_AV_SUCCESS)); */ - } else if (btc_av_cb.peer_sep == AVDT_TSEP_SRC) { + } else if (btc_av_cb.peer_sep == AVDT_TSEP_SRC && + (p_bta_data->open.status == BTA_AV_SUCCESS)) { /* Bring up AVRCP connection too */ BTA_AvOpenRc(btc_av_cb.bta_handle); }