Skip to content
Snippets Groups Projects
Commit 5db07990 authored by Zhao Xuewen's avatar Zhao Xuewen Committed by Chenjie Luo
Browse files

Bluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect.


If peer A2DP SNK disconnected by some reason, the device will reject reconnection request from peer.
This CL will judge the peer device is A2DP SRC, will reject the reconnection request.
So if peer device is A2DP SNK, will accept the reconnection request.

BUG:26274393

Change-Id: Idecef527a763693f08d76d90512546f013312aa1
Signed-off-by: default avatarz00184990 <z00184990@notesmail.huawei.com>
Signed-off-by: default avatarZhao Xuewen <zhaoxuewen@huawei.com>
parent 52845e63
No related branches found
No related tags found
No related merge requests found
......@@ -1455,7 +1455,18 @@ void bta_av_sig_chg(tBTA_AV_DATA *p_data)
{
mask = 1 << xx;
APPL_TRACE_DEBUG("conn_lcb: 0x%x", p_cb->conn_lcb);
tBTA_AV_SCB *p_scb = p_cb->p_scb[xx];
if (p_scb != NULL)
{
UINT8 avdt_tsep_type = p_scb->sep_info[p_scb->sep_info_idx].tsep;
/* If the device is a A2DP source, disconnect the AVDT connection */
if ((avdt_tsep_type == AVDT_TSEP_SRC) && (p_data->hdr.offset == AVDT_ACP))
{
LOG_INFO("%s disconnecting invalid A2DP source to A2DP source connection.", __func__);
AVDT_DisconnectReq(p_data->str_msg.bd_addr, NULL);
return;
}
}
/* look for a p_lcb with its p_scb registered */
if ((!(mask & p_cb->conn_lcb)) && (p_cb->p_scb[xx] != NULL))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment