[Galaxy S II Q&A, Help & Troubleshooting] bradobrado:
Same problem, here is a logcat snippet

I have the same problem. SGS2 SGH-I777 with CM7 KANG. I realize there is no support for KANG builds (or nightlies) but they are otherwise QUITE stable, with excellent functionality. These last two days, I have backed up, and tried many different CM builds, no joy.

Here is (hopefully) the helpful part: My bluetooth car kit is a Motorola T505. It disconnects after 1 or two minutes, then reconnects. (it MAY be consistently periodic, but I did not time the disconnects) My Plantronics earpiece works great with BT, no disconnects. Additionally, I have streamed the music player app via A2DP to the T505 for 1.5+ hours without problems; it only seems to disconnect when using the phone audio. I am currently in the process of going back to the stock ROM, to see if the problem is CM only.

Here is a logcat of the issue happening. It appears that the "unexpected revents bitmask" is very near where the problem occurred. I sincerely hope that this is helpful to someone. I am no longer using CM on this phone, but I can probably do a nandroid restore and get some more info if someone would like me to. I have a much larger logcat of the below as well.

D/ScoSocket( 2784): connect() android.bluetooth.ScoSocket@407be1d0

I/bluetooth_ScoSocket.cpp( 2784): getScoType Motorola T505 - 0x0

V/tspdrv ( 2672): opened device /dev/tspdrv

V/tspdrv ( 2672): TSPDRV_MAGIC_NUMBER success

V/tspdrv ( 2672): TSPDRV_GET_NUM_ACTUATORS success, actuators = 1

V/tspdrv ( 2672): timeout_ms: 0

V/tspdrv ( 2672): TSPDRV_STOP_KERNEL_TIMER success

V/tspdrv ( 2672): TSPDRV_DISABLE_AMP success

I/bluetooth_ScoSocket.cpp( 2784): Connecting to socket

I/bluetooth_ScoSocket.cpp( 2784): SCO socket connected (outgoing)

D/AudioFlinger( 2576): setParameters(): io 1, keyvalue routing=32, tid 2656, calling tid 2576

I/AudioHardwareYamaha( 2576): ### incall mode bluetooth route NO NR RilReturnValue:0

I/AudioHardwareYamaha( 2576): AudioHardware::setDevices(devices=00000020h, mask=0000BFFFh)

V/yamaha::media::CManager( 2576): setDevices(devices=00000020h)

E/yamaha::media::VolumeCtrl( 2576): Call Receiver Volume = (A000h).

V/yamaha::media::UserDep( 2576): UserDep::getRouteInfo(output: audioengine=0, devices=00000020h

V/yamaha::media::UserDep( 2576): incall: onoff=1, devices=00840000h

V/yamaha::media::UserDep( 2576): capture: onoff=0, devices=00080000h, audioSource=6

V/yamaha::media::UserDep( 2576): playback: audio_onoff=1, line_onoff=0)

V/yamaha::media::UserDep( 2576): Incall[dev:ADC], Playback[Audio], Output[dev:BT, NonAE]

V/yamaha::media::UserDep( 2576): editAdcSrc() AD0 L: MIC3 ON, R: MIC1 ON

V/yamaha::media::UserDep( 2576): editAdcSrc() AD0 L/R: MIC2 Off

V/yamaha::media::UserDep( 2576): editAdcSrc() AD0 L/R: LINEIN1 Off

E/yamaha::media::MixerCtrl( 2576): setVolume() DIR#0:, vol=0.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() DIR#0 ATT:, vol=0.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() Master:, vol=0.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() AD Analog:, vol=4.500000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() Mic 1 Gain:, vol=15.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() Mic 2 Gain:, vol=15.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() Mic 3 Gain:, vol=15.000000dB

V/AudioHardwareYamaha( 2576): AudioHardware::setVoiceVolume(volume=1.000000)

I/AudioHardwareYamaha( 2576): ### bluetooth call volume, volume:5 RilReturnValue:0

I/AudioPolicyManager( 2576): mForceUse[AudioSystem::FOR_COMMUNICATION] = 3

D/AudioFlinger( 2576): setParameters(): io 0, keyvalue routing=524288, tid 2656, calling tid 2576

I/AudioHardwareYamaha( 2576): AudioHardware::setParameters(keyValuePairs="routing=524288")

I/AudioHardwareYamaha( 2576): ### setDeivceInCall devices 524288, force = 1

I/AudioHardwareYamaha( 2576): SetTwoMicControl(AUDIENCE, TWO_MIC_SOLUTION_OFF) RilReturnValue:0

I/AudioHardwareYamaha( 2576): AudioHardware::setDevices(devices=00080000h, mask=81FF0000h)

V/yamaha::media::CManager( 2576): setDevices(devices=00000020h)

E/yamaha::media::VolumeCtrl( 2576): Call Receiver Volume = (A000h).

V/yamaha::media::UserDep( 2576): UserDep::getRouteInfo(output: audioengine=0, devices=00000020h

V/yamaha::media::UserDep( 2576): incall: onoff=1, devices=00080000h

V/yamaha::media::UserDep( 2576): capture: onoff=0, devices=00080000h, audioSource=6

V/yamaha::media::UserDep( 2576): playback: audio_onoff=1, line_onoff=0)

V/yamaha::media::UserDep( 2576): Incall[dev:BT], Playback[Audio], Output[dev:BT, NonAE]

E/yamaha::media::MixerCtrl( 2576): setVolume() DIR#0:, vol=0.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() DIR#0 ATT:, vol=0.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() Master:, vol=0.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() AD Analog:, vol=0.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() Mic 1 Gain:, vol=15.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() Mic 2 Gain:, vol=15.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() Mic 3 Gain:, vol=15.000000dB

I/AudioHardwareYamaha( 2576): ### setDeivceInCall = 00080000h mWbamrStatus 0 mEnabledDualMic 1

I/AudioPolicyManager( 2576): mForceUse[AudioSystem::FOR_COMMUNICATION] = 3

D/AudioFlinger( 2576): setParameters(): io 0, keyvalue routing=524288, tid 2656, calling tid 2576

I/AudioHardwareYamaha( 2576): AudioHardware::setParameters(keyValuePairs="routing=524288")

I/AudioHardwareYamaha( 2576): ### setDeivceInCall devices 524288, force = 1

I/AudioHardwareYamaha( 2576): SetTwoMicControl(AUDIENCE, TWO_MIC_SOLUTION_OFF) RilReturnValue:0

I/AudioHardwareYamaha( 2576): AudioHardware::setDevices(devices=00080000h, mask=81FF0000h)

I/AudioHardwareYamaha( 2576): ### setDeivceInCall = 00080000h mWbamrStatus 0 mEnabledDualMic 1

E/yamaha::media::VolumeCtrl( 2576): Call Receiver Volume = (A000h).

V/yamaha::media::UserDep( 2576): UserDep::getRouteInfo(output: audioengine=0, devices=00000020h

V/yamaha::media::UserDep( 2576): incall: onoff=1, devices=00080000h

V/yamaha::media::UserDep( 2576): capture: onoff=0, devices=00080000h, audioSource=6

V/yamaha::media::UserDep( 2576): playback: audio_onoff=0, line_onoff=0)

V/yamaha::media::UserDep( 2576): Incall[dev:BT], Output[dev:BT, NonAE]

E/yamaha::media::MixerCtrl( 2576): setVolume() DIR#0:, vol=0.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() DIR#0 ATT:, vol=0.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() Master:, vol=0.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() AD Analog:, vol=0.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() Mic 1 Gain:, vol=15.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() Mic 2 Gain:, vol=15.000000dB

E/yamaha::media::MixerCtrl( 2576): setVolume() Mic 3 Gain:, vol=15.000000dB

D/dalvikvm( 3463): GC_EXPLICIT freed 961K, 48% free 4232K/8007K, external 3029K/3118K, paused 117ms

#************* Some (I think) irrelevant log entries ************************

V/tspdrv ( 2672): opened device /dev/tspdrv

V/tspdrv ( 2672): TSPDRV_MAGIC_NUMBER success

V/tspdrv ( 2672): TSPDRV_GET_NUM_ACTUATORS success, actuators = 1

V/tspdrv ( 2672): timeout_ms: 0

V/tspdrv ( 2672): TSPDRV_STOP_KERNEL_TIMER success

V/tspdrv ( 2672): TSPDRV_DISABLE_AMP success

D/ScoSocket( 2784): onClosed() android.bluetooth.ScoSocket@407be1d0

W/BT HSHFP( 2784): RFCOMM poll() returned success (1), but with an unexpected revents bitmask: 0x18

I/Bluetooth HeadsetBase( 2784): headset read error 5

I/EventHub( 2672): Removed device: path=/dev/input/event8 name=AVRCP id=0x10004 (of 0x5) index=6 fd=299 classes=0x1

I/InputReader( 2672): Device removed: id=0x10004, name=AVRCP, sources=00000101

E/BluetoothEventLoop.cpp( 2672): event_filter: Received signal org.bluez.Control:Disconnected from /org/bluez/2920/hci0/dev_00_1A_0E_AB_53_9F

D/BluetoothHidService.cpp( 2672): hid_event_filter...

E/BluetoothEventLoop.cpp( 2672): event_filter: Received signal org.bluez.Control:PropertyChanged from /org/bluez/2920/hci0/dev_00_1A_0E_AB_53_9F

D/BluetoothHidService.cpp( 2672): hid_event_filter...

E/BluetoothEventLoop.cpp( 2672): event_filter: Received signal org.bluez.AudioSink:Disconnected from /org/bluez/2920/hci0/dev_00_1A_0E_AB_53_9F

D/BluetoothHidService.cpp( 2672): hid_event_filter...

E/BluetoothEventLoop.cpp( 2672): event_filter: Received signal org.bluez.AudioSink:PropertyChanged from /org/bluez/2920/hci0/dev_00_1A_0E_AB_53_9F

E/BluetoothEventLoop.cpp( 2672): event_filter: Received signal org.bluez.AudioSink:PropertyChanged from /org/bluez/2920/hci0/dev_00_1A_0E_AB_53_9F

D/ScoSocket( 2784): android.bluetooth.ScoSocket@407be1d0 SCO OBJECT close() mState = 5

D/AudioFlinger( 2576): setParameters(): io 1, keyvalue routing=1, tid 2656, calling tid 2576

I/AudioHardwareYamaha( 2576): ### incall mode earpiece route RilReturnValue:0

I/AudioHardwareYamaha( 2576): AudioHardware::setDevices(devices=00000001h, mask=0000BFFFh)