bluetoothandroid-bluetootha2dp

Bluedroid AV connection fails (BTAV_CONNECTION_STATE_DISCONNECTED state)


I am using Bluedroid stack for developiong my bluetooth apllication.

I am using A2DP src profile to make connection between Mobile and my device.

I have issue in following scenario:

When i switch from A2DP SINK profile to A2DP Source profile, the first connection request from Mobile site is always failure. And after first connection request its always success.

I found the reason for fail is:

AV connection state is changing from BTAV_CONNECTION_STATE_CONNECTING ... ... BTAV_CONNECTION_STATE_DISCONNECTED

I have checked the flow in Bluedrod Stack, and found that streamming open is failed and due to this i gets BTAV_CONNECTION_STATE_DISCONNECTED event to my app.

Any help would be appreciated. For more information please comment.

The fail status is BTA_AV_FAIL_STREAM in bluedroid stack


Solution

  • I got the answer/solution of this problem.

    Qualcomm engineer has provided a patch to solve the issue.

    Whenever there were switch between A2DP sync to A2DP src profile the SDP records is not set properly due to that the first connection request is rejected. When the rejection happens on first time it sets the value of A2DP SRC in SDP records properly and due to that further connection request is accepted.