[ONE Android Development] mpiermar:
bluetooth

Just curious if others are having wonky bluetooth issues like I am. I can say it's not just this ROM, but pretty much every CM11 based rom, EXCEPT CM11S -- which always worked. After an initial boot, BT will connect fine to my car (car is ONLY phone audio, not media). After the 1st initial connection, subsequent BT attempts will: connect, disconnect, repeat until phone is again rebooted.

I've captured the log when this is happening, if it helps. Looks like to me it's trying to do something with a2dp,which is failing based on this line from the log below.

11-06 10:10:21.221 E/audio_a2dp_hw( 1497): adev_set_parameters: ERROR: set param called even when stream out is null

Just really put this out there if it's meaningful to anyone...

---------------logcat snippet------

11-06 10:10:20.511 W/bt-l2cap( 4370): l2cu_get_conn_role 0

11-06 10:10:20.561 W/bt-btm ( 4370): btm_acl_created hci_handle=2 link_role=1 is_le_link=0

11-06 10:10:20.561 W/bt-btm ( 4370): BTM: RemBdAddr: 000a302adc2a

11-06 10:10:20.571 W/bt-btm ( 4370): BTM: remote role: 0x01

11-06 10:10:20.571 W/bt-btm ( 4370): btm_acl_created hci_handle=2 link_role=1 is_le_link=0

11-06 10:10:20.571 W/bt-btm ( 4370): BTM: RemBdAddr: 000a302adc2a

11-06 10:10:20.571 W/bt-btm ( 4370): BTM: remote role: 0x01

11-06 10:10:20.571 W/bt-btif ( 4370): info:x0

11-06 10:10:20.571 W/bt-l2cap( 4370): L2CA_SetDesireRole() new:x0, disallow_switch:0

11-06 10:10:20.571 D/ ( 4370): remote version info [00:0a:30:2a:dc:2a]: 1, f, 800

11-06 10:10:20.581 W/bt-l2cap( 4370): L2CAP - st: CLOSED evt: 10

11-06 10:10:20.581 W/bt-l2cap( 4370): L2CAP - st: TERM_W4_SEC_COMP evt: 7

11-06 10:10:20.581 W/bt-l2cap( 4370): L2CA_ErtmConnectRsp() CID: 0x0045 Result: 0 Status: 0 BDA: 000a302adc2a p_ertm_info:0x00000000

11-06 10:10:20.581 W/bt-l2cap( 4370): L2CAP - st: W4_L2CA_CON_RSP evt: 22

11-06 10:10:20.581 W/bt-l2cap( 4370): L2CAP - st: CONFIG evt: 24

11-06 10:10:20.581 I/BTConnectionReceiver( 3904): onReceive(context, Intent { act=android.bluetooth.device.action.ACL_CONNECTED flg=0x4000010 cmp=com.google.android.googlequicksearchbox/com.google.android.search.core.service.BluetoothConnectionReceiver (has extras) }, [BluetoothDevice: address=00:0A:30:2A:DC:2A, alias=null, name=HandsFreeLink TM, majorDeviceClass=1024, deviceClass=1032]

11-06 10:10:20.581 I/BluetoothClassifier( 3904): Bluetooth Device Name: HandsFreeLink TM

11-06 10:10:20.591 V/Zygote (19663): Switching descriptor 34 to /dev/null

11-06 10:10:20.591 V/Zygote (19663): Switching descriptor 10 to /dev/null

11-06 10:10:20.591 I/ActivityManager( 2768): Start proc spinninghead.carhome for broadcast spinninghead.carhome/.BtReceiver: pid=19663 uid=10140 gids={50140, 3003, 3002, 3001, 1028, 1015, 1023}

11-06 10:10:20.611 D/btif_config_util( 4370): btif_config_save_file(L188): in file name:/data/misc/bluedroid/bt_config.new

11-06 10:10:20.631 D/ActivityThread(19663): handleBindApplication:spinninghead.carhome

11-06 10:10:20.631 D/ActivityThread(19663): setTargetHeapUtilization:0.75

11-06 10:10:20.631 D/ActivityThread(19663): setTargetHeapMinFree:2097152

11-06 10:10:20.641 D/BluetoothManagerService( 2768): Message: 20

11-06 10:10:20.641 D/BluetoothManagerService( 2768): Added callback: android.bluetooth.IBluetoothManagerCallback$Stub$Proxy@41fea6d8:true

11-06 10:10:20.641 D/CarHome (19663): BtReceiver action: android.bluetooth.device.action.ACL_CONNECTED

11-06 10:10:20.641 D/CarHome (19663): BtReceiver key: 00:0A:30:2A:DC:2A

11-06 10:10:20.851 W/bt-l2cap( 4370): L2CAP - st: CONFIG evt: 19

11-06 10:10:20.861 W/bt-l2cap( 4370): L2CAP - st: CONFIG evt: 14

11-06 10:10:20.861 W/bt-l2cap( 4370): L2CAP - st: CONFIG evt: 25

11-06 10:10:20.861 W/bt-l2cap( 4370): L2CAP - st: CONFIG evt: 15

11-06 10:10:20.911 W/bt-l2cap( 4370): L2CAP - st: CLOSED evt: 10

11-06 10:10:20.911 W/bt-l2cap( 4370): L2CAP - st: TERM_W4_SEC_COMP evt: 7

11-06 10:10:20.911 W/bt-l2cap( 4370): L2CA_ErtmConnectRsp() CID: 0x0046 Result: 0 Status: 0 BDA: 000a302adc2a p_ertm_info:0x00000000

11-06 10:10:20.911 W/bt-l2cap( 4370): L2CAP - st: W4_L2CA_CON_RSP evt: 22

11-06 10:10:20.911 W/bt-l2cap( 4370): L2CAP - st: CONFIG evt: 24

11-06 10:10:20.911 W/bt-l2cap( 4370): L2CA_DisconnectRsp() CID: 0x0045

11-06 10:10:20.911 W/bt-l2cap( 4370): L2CAP - st: W4_L2CA_DISC_RSP evt: 28

11-06 10:10:20.931 W/bt-l2cap( 4370): L2CAP - st: CONFIG evt: 14

11-06 10:10:20.931 W/bt-l2cap( 4370): L2CAP - st: CONFIG evt: 25

11-06 10:10:20.931 W/bt-l2cap( 4370): L2CAP - st: CONFIG evt: 15

11-06 10:10:21.191 W/bt-l2cap( 4370): L2CA_ErtmConnectReq() PSM: 0x0001 BDA: 000a302adc2a p_ertm_info: 0x00000000 allowed:0x0 preferred:0

11-06 10:10:21.191 W/bt-l2cap( 4370): L2CAP - st: CLOSED evt: 21

11-06 10:10:21.191 W/bt-l2cap( 4370): L2CAP - st: CLOSED evt: 7

11-06 10:10:21.191 W/bt-l2cap( 4370): L2CA_SetDesireRole() new:x0, disallow_switch:0

11-06 10:10:21.191 W/bt-btif ( 4370): new conn_srvc id:5, app_id:0 count:1

11-06 10:10:21.201 I/BluetoothHeadsetServiceJni( 4370): connection_state_callback

11-06 10:10:21.201 W/HeadsetStateMachine( 4370): HFP Connected from Disconnected state

11-06 10:10:21.201 D/BluetoothAdapterService( 4370): getAdapterService(): returning com.android.bluetooth.btservice.AdapterService@41eca1b0

11-06 10:10:21.201 D/BluetoothAdapterService(1106026928)( 4370): Quiet mode Enabled = false

11-06 10:10:21.201 I/HeadsetStateMachine( 4370): Incoming Hf accepted

11-06 10:10:21.201 D/BluetoothAdapterService( 4370): getAdapterService(): returning com.android.bluetooth.btservice.AdapterService@41eca1b0

11-06 10:10:21.201 D/BluetoothAdapterService(1106026928)( 4370): Message: 20

11-06 10:10:21.211 D/BluetoothAdapterService(1106026928)( 4370): MESSAGE_PROFILE_CONNECTION_STATE_CHANGED

11-06 10:10:21.211 D/BluetoothAdapterService(1106026928)( 4370): Profile connected. Schedule missing profile connection if any

11-06 10:10:21.211 D/LocalBluetoothProfileManager( 7721): HEADSET state change 0 -> 2

11-06 10:10:21.211 D/BluetoothManager( 3192): mReceiver: HEADSET_STATE_CHANGED_ACTION

11-06 10:10:21.211 D/BluetoothManager( 3192): ==> new state: 2

11-06 10:10:21.211 D/CachedBluetoothDevice( 7721): onProfileStateChanged: profile HEADSET newProfileState 2

11-06 10:10:21.211 D/AudioRouter( 3192): onBluetoothIndicationChange false

11-06 10:10:21.221 D/BluetoothAdapterService(1106026928)( 4370): getState(): mAdapterProperties: com.android.bluetooth.btservice.AdapterProperties@41ec67e0

11-06 10:10:21.221 D/AudioRouter( 3192): calculateModeFromCurrentState EARPIECE

11-06 10:10:21.221 D/BluetoothManager( 3192): isBluetoothAvailable()...

11-06 10:10:21.221 D/audio_hw_primary( 1497): adev_set_parameters: enter: bt_headset_name=HandsFreeLink TM;bt_headset_nrec=on

11-06 10:10:21.221 V/msm8974_platform( 1497): platform_set_parameters: enter: bt_headset_name=HandsFreeLink TM;bt_headset_nrec=on

11-06 10:10:21.221 V/msm8974_platform( 1497): platform_set_parameters: exit with code(0)

11-06 10:10:21.221 D/audio_hw_extn( 1497): audio_extn_set_anc_parameters: anc_enabled:0

11-06 10:10:21.221 E/audio_a2dp_hw( 1497): adev_set_parameters: ERROR: set param called even when stream out is null

11-06 10:10:21.221 V/BluetoothAdapterService( 4370): Initiate SDP for Missing UUID's support in remote

11-06 10:10:21.221 D/AudioPolicyManager( 1497): setDeviceConnectionState() device: 20, state 1, address 00:0A:30:2A:DC:2A

11-06 10:10:21.231 D/audio_hw_primary( 1497): adev_open_output_stream: enter: sample_rate(8000) channel_mask(0x3) devices(0x20) flags(0x4) stream_handle(0xb8e5da60)

11-06 10:10:21.231 E/audio_hw_primary( 1497): adev_open_output_stream: Primary output is already opened

11-06 10:10:21.231 D/audio_hw_primary( 1497): adev_open_output_stream: exit: ret -17

11-06 10:10:21.231 D/BluetoothAdapterService(1106026928)( 4370): getState(): mAdapterProperties: com.android.bluetooth.btservice.AdapterProperties@41ec67e0

11-06 10:10:21.231 W/AudioPolicyManagerBase( 1497): checkOutputsForDevice() could not open output for device 20

11-06 10:10:21.231 D/audio_hw_primary( 1497): adev_open_output_stream: enter: sample_rate(48000) channel_mask(0x3) devices(0x20) flags(0x4) stream_handle(0xb8e5da60)

11-06 10:10:21.231 E/audio_hw_primary( 1497): adev_open_output_stream: Primary output is already opened

11-06 10:10:21.231 D/audio_hw_primary( 1497): adev_open_output_stream: exit: ret -17