Requirement is to have hfp client role on android device. So we backported hfp client role implementation available in Lollopop version. Except for the audio changes everything went smooth.
Now I am facing a problem where I am not able to dial/receive calls to other phones (Device as HFP client and any Smart phone as AG). I came across scenarios where call did not end properly.
I am listing all my observations down here-
if phone (acting as an AG), is jellybean then dialing/receiving calls is not a problem.
if phone (acting as an AG), is kitkat then dialing/receiving calls does not happen smoothly (like while dialing, hfp client device does not receive CALL_STATE_DIALING but rather gets CALL_STATE_ALERTING. Although call usually gets established but ending the call from device does not go well). Strangely if user disconnect the AG phone and connects again. Receiving/Dialing a number starts acting fine.
if phone (acting as an AG), is lollipop then dialing/receiving call acts similar as explained in #2, however this time disconnect/connect does not have any effect on the behavior.
Let me know if you need more information here on the issue.
Note- This is Dial case, logs are recorded till call is accepted. The difference is that I don't get android.bluetooth.headsetclient.profile.action.AG_CALL_CHANGED State: 2(CALL_STATE_DIALING) in non-working scenario
Edit: Just noticed that JellyBean works because it is bluez, problem lies in sdk which have bluedroid stack. Can someone please share some pointers which can help. Problem still persists. We are not getting ack for Dialing, Accept, and Terminate.
Not Working Case Log
D/BluetoothHeadsetClient( 2403): dial()
D/HeadsetClientStateMachine( 2189): Connected process message: 10
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/HeadsetClientStateMachine( 2189): Connected: addQueuedAction: 10
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
D/bt-l2cap( 2189): l2cu_allocate_ccb: cid 0x0000
D/bt-l2cap( 2189): l2cu_enqueue_ccb CID: 0x004f priority: 2
D/bt-l2cap( 2189): l2c_link_adjust_chnl_allocation
D/bt-l2cap( 2189): POOL ID:3, GKI_poolcount = 200, reserved_buff = 0, weighted_chnls = 4, quota_per_weighted_chnls = 51
D/bt-btm ( 2189): BTM_SetPowerMode: mode:0x0 interval 0 max:0, min:0
D/bt-btm ( 2189): btm_sec_l2cap_access_req is_originator:0, 0x54f825c8
D/bt-l2cap( 2189): l2c_link_sec_comp: 17, 0x54f825c8
D/bt-l2cap( 2189): ccb timer ticks: 2147483648
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004f, q_cout=0
D/bt-l2cap( 2189): TotalWin=4,Hndl=0x100,Quota=6,Unack=2,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004f, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004f, q_cout=0
D/bt-l2cap( 2189): TotalWin=5,LinkUnack(0x100)=1,RRCheck=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004f, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
D/bt-btm ( 2189): btm_bda_to_acl found
D/bt-btm ( 2189): btm_get_max_packet_size
D/bt-l2cap( 2189): l2cu_adjust_out_mps use 0 Based on peer_cfg.fcr.mps: 0 packet_size: 1011
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004f, q_cout=0
D/bt-l2cap( 2189): l2c_link_adjust_chnl_allocation
D/bt-l2cap( 2189): POOL ID:3, GKI_poolcount = 200, reserved_buff = 0, weighted_chnls = 4, quota_per_weighted_chnls = 51
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004f, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004f, q_cout=1
D/bt-l2cap( 2189): RR service pri=2, quota=4, lcid=0x004f
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004f, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004f, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
D/bt-btif ( 2189): bta_hf_client_esco_connreq_cback 2
D/bt-btif ( 2189): bta_hf_client_sco_conn_rsp
D/bt-btif ( 2189): bta_hf_client_sco_conn_cback 0
D/bt-btif ( 2189): bta_hf_client_sco_conn_open
D/bt-btif ( 2189): bta_hf_client_sco_event state: 2 event: 4
D/bt-btif ( 2189): bta_dm_pm_cback: st(4), id(27), app(1)
D/bt-btm ( 2189): BTM_SetPowerMode: mode:0x0 interval 0 max:31209, min:21738
D/HeadsetClientStateMachine( 2189): incomingStackEvent {type:EVENT_TYPE_AUDIO_STATE_CHANGED, value1:2, value2:0, value3:0, value4:0, string: "null", device:CC:FA:00:72:B7:D0}
D/HeadsetClientStateMachine( 2189): Connected process message: 100
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004f, q_cout=0
D/bt-l2cap( 2189): l2cu_release_ccb: cid 0x004f in_use: 1
D/bt-l2cap( 2189): l2cu_dequeue_ccb CID: 0x004f
D/bt-l2cap( 2189): l2c_link_adjust_chnl_allocation
D/bt-l2cap( 2189): POOL ID:3, GKI_poolcount = 200, reserved_buff = 0, weighted_chnls = 2, quota_per_weighted_chnls = 101
D/bt-sdp ( 2189): releasing SDP rsp_list
D/HeadsetClientStateMachine( 2189): Connected: event type: 2
D/HeadsetClientStateMachine( 2189): Connected: Audio state changed: CC:FA:00:72:B7:D0: 2
E/bt-rfcomm( 2189): PORT_DataInd, p_port:0x54f82d5c, p_data_co_callback is null
D/bt-btif ( 2189): bta_hf_client_at_parse offset: 0 len: 6
D/bt-btif ( 2189): bta_hf_client_check_at_complete 1
D/bt-btif ( 2189): bta_hf_client_at_parse_start
D/bt-btif ( 2189): bta_hf_client_handle_ok
D/bt-btif ( 2189): bta_hf_client_send_queued_at
E/bt-rfcomm( 2189): PORT_DataInd, p_port:0x54f82d5c, p_data_co_callback is null
D/bt-btif ( 2189): bta_hf_client_at_parse offset: 0 len: 14
D/bt-btif ( 2189): bta_hf_client_check_at_complete 1
D/bt-btif ( 2189): bta_hf_client_at_parse_start
D/bt-btif ( 2189): bta_hf_client_handle_ciev index: 2 value: 2
D/HeadsetClientStateMachine( 2189): bthf_companion case
D/HeadsetClientStateMachine( 2189): incomingStackEvent {type:EVENT_TYPE_CMD_RESULT, value1:0, value2:0, value3:0, value4:0, string: "null", device:null}
V/Avrcp ( 2189): New genId = 4, clearing = 1
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
D/HeadsetClientStateMachine( 2189): setAudioMode Setting audio mode from 0 to 2
D/HeadsetClientStateMachine( 2189): incomingStackEvent {type:EVENT_TYPE_CALLSETUP, value1:2, value2:0, value3:0, value4:0, string: "null", device:null}
D/bt-l2cap( 2189): l2cu_allocate_ccb: cid 0x0000
D/bt-l2cap( 2189): l2cu_enqueue_ccb CID: 0x0040 priority: 2
D/bt-l2cap( 2189): l2c_link_adjust_chnl_allocation
D/bt-l2cap( 2189): POOL ID:3, GKI_poolcount = 200, reserved_buff = 0, weighted_chnls = 4, quota_per_weighted_chnls = 51
D/bt-btm ( 2189): BTM_SetPowerMode: mode:0x0 interval 0 max:0, min:0
D/bt-btm ( 2189): btm_sec_l2cap_access_req is_originator:0, 0x54f81164
D/bt-btm ( 2189): btm_sec_l2cap_access_req() sm4:0x11, sec_flags:0xbe, security_required:0x1086 chk:1
D/bt-btm ( 2189): no next_serv sm4:0x11, chk:1
D/bt-btm ( 2189): (SM4 to SM4) btm_sec_l2cap_access_req rspd. authenticated: x2, enc: x4
D/bt-btm ( 2189): btm_sec_check_upgrade...
D/bt-btm ( 2189): btm_sec_is_upgrade_possible id:37, link_key_typet:5, rmt_io_caps:1, chk flags:x1000, flags:x1082
D/bt-btm ( 2189): btm_sec_is_upgrade_possible is_possible:0 sec_flags:0xbe
D/bt-l2cap( 2189): l2c_link_sec_comp: 0, 0x54f81164
D/bt-l2cap( 2189): ccb timer ticks: 2147483648
D/bt-btm ( 2189): btm_sec_mx_access_request is_originator:0
D/bt-btm ( 2189): btm_sec_find_mx_serv
D/bt-btm ( 2189): btm_sec_check_upgrade...
D/bt-btm ( 2189): btm_sec_is_upgrade_possible id:37, link_key_typet:5, rmt_io_caps:1, chk flags:x1000, flags:x1082
D/bt-btm ( 2189): btm_sec_is_upgrade_possible is_possible:0 sec_flags:0xbe
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0040, q_cout=0
D/bt-l2cap( 2189): TotalWin=4,Hndl=0x100,Quota=6,Unack=2,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0040, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0040, q_cout=0
D/bt-l2cap( 2189): TotalWin=5,LinkUnack(0x100)=1,RRCheck=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0040, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
D/bt-btm ( 2189): btm_bda_to_acl found
D/bt-btm ( 2189): btm_get_max_packet_size
D/bt-l2cap( 2189): l2cu_adjust_out_mps use 0 Based on peer_cfg.fcr.mps: 0 packet_size: 1011
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0040, q_cout=0
D/bt-l2cap( 2189): l2c_link_adjust_chnl_allocation
D/bt-l2cap( 2189): POOL ID:3, GKI_poolcount = 200, reserved_buff = 0, weighted_chnls = 4, quota_per_weighted_chnls = 51
D/bt-l2cap( 2189): Update CCB list in logical link
D/bt-l2cap( 2189): l2cu_dequeue_ccb CID: 0x0040
D/bt-l2cap( 2189): l2cu_enqueue_ccb CID: 0x0040 priority: 0
D/bt-btif ( 2189): CONN_IND is ACP:1
D/bt-btif ( 2189): conn_cback bd_addr:cc-fa-00-72-b7-d0
D/bt-btif ( 2189): bta_av_sig_chg event: 16
D/bt-btif ( 2189): conn_lcb: 0x0
E/bt-btif ( 2189): bta_av_rc_create ACP handle exist for shdl:0
D/bt-btif ( 2189): start sig timer 1
D/bt-btif ( 2189): Incoming L2CAP acquired, set state as incoming
D/bt-btif ( 2189): bta_av_sig_timer
D/bt-btif ( 2189): conn_lcb: 0x1
D/bt-btif ( 2189): btif_av_state_idle_handler event:BTA_AV_PENDING_EVT flags 0
D/bt-btif ( 2189): btif_av_state_idle_handler event:BTIF_SM_EXIT_EVT flags 0
D/bt-btif ( 2189): btif_av_state_opening_handler event:BTIF_SM_ENTER_EVT flags 0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=0, lcid=0x0040, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
D/A2dpStateMachine( 2189): Disconnected process message: 101
I/A2dpStateMachine( 2189): Incoming A2DP accepted
D/A2dpStateMachine( 2189): Exit Disconnected: 101
D/A2dpStateMachine( 2189): Enter Pending: 101
D/bt-l2cap( 2189): RR scan pri=0, lcid=0x0040, q_cout=1
D/bt-l2cap( 2189): RR service pri=0, quota=14, lcid=0x0040
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=0, lcid=0x0040, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/A2dpStateMachine( 2189): Connection state CC:FA:00:72:B7:D0: 0->1
D/bt-l2cap( 2189): RR scan pri=0, lcid=0x0040, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
D/CachedBluetoothDevice( 1850): onProfileStateChanged: profile A2DP newProfileState 1
D/bt-btm ( 2189): BTM_SetPowerMode: mode:0x0 interval 0 max:1, min:0
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=0, lcid=0x0040, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): l2cu_release_ccb: cid 0x0040 in_use: 1
D/bt-l2cap( 2189): l2cu_dequeue_ccb CID: 0x0040
D/bt-l2cap( 2189): l2c_link_adjust_chnl_allocation
D/bt-l2cap( 2189): POOL ID:3, GKI_poolcount = 200, reserved_buff = 0, weighted_chnls = 2, quota_per_weighted_chnls = 101
D/bt-btif ( 2189): scb hndl x41, role x0
D/bt-btif ( 2189): conn_cback bd_addr:cc-fa-00-72-b7-d0
D/bt-btif ( 2189): bta_av_sig_chg event: 17
D/bt-btif ( 2189): conn_lcb: 0x0
D/bt-btif ( 2189): conn_lcb: 0x0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
D/HeadsetClientStateMachine( 2189): hfp_enable=true
D/HeadsetClientStateMachine( 2189): mAudioWbs is false
D/HeadsetClientStateMachine( 2189): Setting sampling rate as 8000
D/HeadsetClientStateMachine( 2189): Audio state CC:FA:00:72:B7:D0: 1->2
D/HeadsetClientStateMachine( 2189): Enter AudioOn: 100
D/HeadsetClientStateMachine( 2189): AudioOn process message: 100
D/HeadsetClientStateMachine( 2189): AudioOn: event type: 16
D/HeadsetClientStateMachine( 2189): Connected process message: 100
D/HeadsetClientStateMachine( 2189): Connected: event type: 16
D/HeadsetClientStateMachine( 2189): EVENT_TYPE_CMD_RESULT 0
D/HeadsetClientStateMachine( 2189): Connected: command result: 0 queuedAction: 7
D/HeadsetClientStateMachine( 2189): AudioOn process message: 100
D/HeadsetClientStateMachine( 2189): AudioOn: event type: 10
D/HeadsetClientStateMachine( 2189): Connected process message: 100
D/HeadsetClientStateMachine( 2189): Connected: event type: 10
D/HeadsetClientStateMachine( 2189): updateCallSetupIndicator 2 0
D/HeadsetClientStateMachine( 2189): updateCallSetupIndicator 52
D/HeadsetClientStateMachine( 2189): AudioOn process message: 50
D/HeadsetClientStateMachine( 2189): Connected process message: 50
D/HeadsetClientStateMachine( 2189): queryCallsStart
D/HeadsetClientStateMachine( 2189): queryCallsStart clearPendingAction
D/HeadsetClientStateMachine( 2189): function clearPendingAction
D/bt-btif ( 2189): bta_hf_client_send_at_clcc
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=1
D/bt-l2cap( 2189): RR service pri=2, quota=4, lcid=0x004a
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/HeadsetClientStateMachine( 2189): queryCallsStart: queryCurrentCallsNative
D/HeadsetClientStateMachine( 2189): action3: 50
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
E/bt-rfcomm( 2189): PORT_DataInd, p_port:0x54f82d5c, p_data_co_callback is null
D/bt-btif ( 2189): bta_hf_client_at_parse offset: 0 len: 37
D/bt-btif ( 2189): bta_hf_client_check_at_complete 1
D/bt-btif ( 2189): bta_hf_client_at_parse_start
D/bt-btif ( 2189): bta_hf_client_handle_clcc idx: 1 dir: 0 status: 2 mode: 0 mpty: 0
D/bt-btif ( 2189): bta_hf_client_handle_clcc number: 9686811761 type: 129
D/HeadsetClientStateMachine( 2189): incoming StackEvent {type:EVENT_TYPE_CURRENT_CALLS, value1:1, value2:0, value3:2, value4:0, string: "9686811761", device:null}
D/HeadsetClientStateMachine( 2189): AudioOn process message: 100
D/HeadsetClientStateMachine( 2189): AudioOn: event type: 14
D/HeadsetClientStateMachine( 2189): Connected process message: 100
D/HeadsetClientStateMachine( 2189): Connected: event type: 14
D/HeadsetClientStateMachine( 2189): queryCallsUpdate: 1
E/bt-rfcomm( 2189): PORT_DataInd, p_port:0x54f82d5c, p_data_co_callback is null
D/bt-btif ( 2189): bta_hf_client_at_parse offset: 0 len: 6
D/bt-btif ( 2189): bta_hf_client_check_at_complete 1
D/bt-btif ( 2189): bta_hf_client_at_parse_start
D/bt-btif ( 2189): bta_hf_client_handle_ok
D/bt-btif ( 2189): bta_hf_client_send_queued_at
D/HeadsetClientStateMachine( 2189): incomingStackEvent {type:EVENT_TYPE_CMD_RESULT, value1:0, value2:0, value3:0, value4:0, string: "null", device:null}
D/HeadsetClientStateMachine( 2189): AudioOn process message: 100
D/HeadsetClientStateMachine( 2189): AudioOn: event type: 16
D/HeadsetClientStateMachine( 2189): Connected process message: 100
D/HeadsetClientStateMachine( 2189): Connected: event type: 16
D/HeadsetClientStateMachine( 2189): EVENT_TYPE_CMD_RESULT 0
D/HeadsetClientStateMachine( 2189): Connected: command result: 0 queuedAction: 10
D/HeadsetClientStateMachine( 2189): Line 1924: 10
E/bt-rfcomm( 2189): PORT_DataInd, p_port:0x54f82d5c, p_data_co_callback is null
D/bt-btif ( 2189): bta_hf_client_at_parse offset: 0 len: 14
D/bt-btif ( 2189): bta_hf_client_check_at_complete 1
D/bt-btif ( 2189): bta_hf_client_at_parse_start
D/bt-btif ( 2189): bta_hf_client_handle_ciev index: 2 value: 3
I/bt-btif ( 2189): HAL bt_hf_client_callbacks->callsetup_cb
D/HeadsetClientStateMachine( 2189): incomingStackEvent {type:EVENT_TYPE_CALLSETUP, value1:3, value2:0, value3:0, value4:0, string: "null", device:null}
D/HeadsetClientStateMachine( 2189): AudioOn process message: 100
D/HeadsetClientStateMachine( 2189): AudioOn: event type: 10
D/HeadsetClientStateMachine( 2189): Connected process message: 100
D/HeadsetClientStateMachine( 2189): Connected: event type: 10
D/HeadsetClientStateMachine( 2189): updateCallSetupIndicator 3 10
D/HeadsetClientStateMachine( 2189): updateCallSetupIndicator 50
D/HeadsetClientStateMachine( 2189): AudioOn process message: 50
D/HeadsetClientStateMachine( 2189): Connected process message: 50
D/HeadsetClientStateMachine( 2189): queryCallsStart
D/HeadsetClientStateMachine( 2189): queryCallsStart clearPendingAction
D/HeadsetClientStateMachine( 2189): function clearPendingAction
D/HeadsetClientStateMachine( 2189): queryCallsStart: mCallsUpdate != null
D/bt-btif ( 2189): bta_av_acp_sig_timer_cback, coll_mask = 0x03
D/bt-btif ( 2189): bta_av_do_disc_a2d use_rc: 1 rs:0, oc:0
D/bt-btm ( 2189): BTM_GetRole
D/bt-btm ( 2189): btm_bda_to_acl found
E/bt-btif ( 2189): bta_av_link_role_ok hndl:x41 role:0, conn_audio:x0, bits:2, features:x824b
D/bt-btif ( 2189): ok_continue: 1 wait:x0, q_tag: 0
D/bt-btif ( 2189): bta_av_save_addr r:1, s:1
D/bt-btif ( 2189): bta_dm_pm_cback: st(2), id(18), app(0)
D/bt-l2cap( 2189): l2cu_allocate_ccb: cid 0x0000
D/bt-l2cap( 2189): l2cu_enqueue_ccb CID: 0x0041 priority: 2
D/bt-l2cap( 2189): l2c_link_adjust_chnl_allocation
D/bt-l2cap( 2189): POOL ID:3, GKI_poolcount = 200, reserved_buff = 0, weighted_chnls = 4, quota_per_weighted_chnls = 51
D/bt-btm ( 2189): BTM_SetPowerMode: mode:0x0 interval 0 max:0, min:0
D/bt-btm ( 2189): btm_sec_l2cap_access_req is_originator:1, 0x54f812c0
D/bt-l2cap( 2189): l2c_link_sec_comp: 17, 0x54f812c0
D/bt-l2cap( 2189): ccb timer ticks: 2147483648
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0041, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0041, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0041, q_cout=0
D/bt-btm ( 2189): btm_bda_to_acl found
D/bt-btm ( 2189): btm_get_max_packet_size
D/bt-l2cap( 2189): l2cu_adjust_out_mps use 0 Based on peer_cfg.fcr.mps: 0 packet_size: 1011
D/bt-l2cap( 2189): TotalWin=4,Hndl=0x100,Quota=6,Unack=2,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0041, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0041, q_cout=0
D/bt-l2cap( 2189): TotalWin=5,LinkUnack(0x100)=1,RRCheck=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0041, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
D/bt-l2cap( 2189): l2c_link_adjust_chnl_allocation
D/bt-l2cap( 2189): POOL ID:3, GKI_poolcount = 200, reserved_buff = 0, weighted_chnls = 4, quota_per_weighted_chnls = 51
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0041, q_cout=1
D/bt-l2cap( 2189): RR service pri=2, quota=4, lcid=0x0041
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0041, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0041, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
W/bt-sdp ( 2189): process_service_search_attr_rsp
D/bt-btm ( 2189): BTM_SetPowerMode: mode:0x0 interval 0 max:8, min:0
D/bt-l2cap( 2189): TotalWin=5,Hndl=0x100,Quota=6,Unack=1,RRQuota=0,RRUnack=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0041, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x004a, q_cout=0
D/bt-l2cap( 2189): RR scan pri=2, lcid=0x0041, q_cout=0
D/bt-l2cap( 2189): TotalWin=6,LinkUnack(0x100)=0,RRCheck=0,RRUnack=0
D/bt-l2cap( 2189): l2cu_release_ccb: cid 0x0041 in_use: 1
D/bt-l2cap( 2189): l2cu_dequeue_ccb CID: 0x0041
D/bt-l2cap( 2189): l2c_link_adjust_chnl_allocation
D/bt-l2cap( 2189): POOL ID:3, GKI_poolcount = 200, reserved_buff = 0, weighted_chnls = 2, quota_per_weighted_chnls = 101
D/bt-sdp ( 2189): releasing SDP rsp_list