AOSP-Based Roms and Bluetooth A2DP Streaming Issues

thelazy8

Senior Member
Dec 16, 2010
89
40
0
Los Angeles
I have a newer model KIA with A2DP Bluetooth streaming capabilities and I've always had more issues with connections and with play/pause headset controls on AOSP-based ROMs like CM vs. sense ROMs. Recently, I've been running Tiny's CM 10.1 rom and had the same issues intermittently. Then I noticed the DSP Manager FC'd one day and it immediately cleared up some issues. So I removed the DSP Manager via TB and I can report that although the issues have not completely disappeared, it is much more responsive and the headset controls seem to work much more consistently. I don't have enough posts to comment in the development thread but I thought I'd share FWIW.
 

tiny4579

Inactive Recognized Developer
Jan 15, 2011
9,328
5,060
0
Known issue with android 4.2. Google supposedly has it fixed for the upcoming 4.2.2 release. For some reason not everyone has this problem.

Sent from my Galaxy Nexus using Tapatalk 2
 
  • Like
Reactions: thelazy8

thelazy8

Senior Member
Dec 16, 2010
89
40
0
Los Angeles
Known issue with android 4.2. Google supposedly has it fixed for the upcoming 4.2.2 release. For some reason not everyone has this problem.

Sent from my Galaxy Nexus using Tapatalk 2
Good to know, and thanks for all your work. I should note that in my experience, the exact same A2DP issues have cropped up for me on CM6 and CM7 in the past but not on any sense-based GB roms or MIUI GB. I have no explanation for why MIUI works better than CM, as I was under the assumption it was AOSP-based and borrowed heavily from the CM team.
 

tiny4579

Inactive Recognized Developer
Jan 15, 2011
9,328
5,060
0
Good to know, and thanks for all your work. I should note that in my experience, the exact same A2DP issues have cropped up for me on CM6 and CM7 in the past but not on any sense-based GB roms or MIUI GB. I have no explanation for why MIUI works better than CM, as I was under the assumption it was AOSP-based and borrowed heavily from the CM team.
Your issues are not 4.2 related it seems.

Sent from my Galaxy Nexus using Tapatalk 2
 

thelazy8

Senior Member
Dec 16, 2010
89
40
0
Los Angeles
Do you know what specifically the 4.2 issues are? I have a few theories about mine but I only have the one device (car) to test the setup with. I think some of my issues stem from my car automatically syncing address book data on each connection in the background while I'm trying to simultaneously play music over the same connection.
 

tiny4579

Inactive Recognized Developer
Jan 15, 2011
9,328
5,060
0
Do you know what specifically the 4.2 issues are? I have a few theories about mine but I only have the one device (car) to test the setup with. I think some of my issues stem from my car automatically syncing address book data on each connection in the background while I'm trying to simultaneously play music over the same connection.
Some experience playing audio over Bluetooth. That is the acknowledged issue. Connecting itself shouldn't be affected.

Sent from my Galaxy Nexus using Tapatalk 2
 

tiny4579

Inactive Recognized Developer
Jan 15, 2011
9,328
5,060
0
Do you think any possible fixes for this in upcoming updates from Google will make it to our device? Too soon to tell?
4.2.2 should merge no problem so the answer is probably. If your issue isn't related to 4.2 exclusively as in it doesn't work on older Android version then 4.2.2 won't fix your issue. It sounded like you had issues in CM7 even.

Sent from my Galaxy Nexus using Tapatalk 2
 

nicu28

New member
Feb 18, 2013
1
0
0
I'm using Tiny's CM10.1 (2013-2-21) and I'm definitely getting Bluetooth streaming problems. I just started using BT audio more recently and after about 7 minutes the whole phone locks up. Sometimes it comes back after 4-5 minutes. I'm copying in a recent alogcat trace and I added "..." where there were many almost identical lines:

Code:
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-67369384,-50000000) -- cpu overload ? #####
...
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-58498535,-50000000) -- cpu overload ? #####
I/Choreographer(11058): Skipped 131 frames!  The application may be doing too much work on its main thread.
W/bt-btif ( 1235): ### UNDERRUN :: ONLY READ 0 BYTES OUT OF 512 ###
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-798387449,-50000000) -- cpu overload ? #####
W/bt-btif ( 1235): ### UNDERRUN :: ONLY READ 0 BYTES OUT OF 512 ###
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-1344443103,-50000000) -- cpu overload ? #####
W/AudioTrack(   97): obtainBuffer timed out (is the CPU pegged?) 0x40a1cd88 name=0x1user=00ee8e00, server=00ee6600
W/bt-btif ( 1235): ### UNDERRUN :: ONLY READ 0 BYTES OUT OF 512 ###
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-142488247,-50000000) -- cpu overload ? #####
W/AudioFlinger(   97): write blocked for 20638 msecs, 2 delayed writes, thread 0x41a80008
D/dalvikvm(  376): GC_CONCURRENT freed 1918K, 20% free 13640K/16844K, paused 39ms+65ms, total 21113ms
D/dalvikvm(  376): WAIT_FOR_CONCURRENT_GC blocked 21006ms
D/dalvikvm(  376): WAIT_FOR_CONCURRENT_GC blocked 232ms
D/dalvikvm(  376): WAIT_FOR_CONCURRENT_GC blocked 223ms
D/dalvikvm(  376): WAIT_FOR_CONCURRENT_GC blocked 20ms
D/HeadsetPhoneState( 1235): sendDeviceStateChanged. mService=1 mSignal=3 mRoam=0 mBatteryCharge=4
D/HeadsetPhoneState( 1235): sendDeviceStateChanged. mService=1 mSignal=2 mRoam=0 mBatteryCharge=4
I/Choreographer(11058): Skipped 1297 frames!  The application may be doing too much work on its main thread.
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-220421086,-50000000) -- cpu overload ? #####
...
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-285830022,-50000000) -- cpu overload ? #####
Does this match the known bugs that Google has been working on? Is there any information or testing/debugging that I can do to help?
 

tiny4579

Inactive Recognized Developer
Jan 15, 2011
9,328
5,060
0
I'm using Tiny's CM10.1 (2013-2-21) and I'm definitely getting Bluetooth streaming problems. I just started using BT audio more recently and after about 7 minutes the whole phone locks up. Sometimes it comes back after 4-5 minutes. I'm copying in a recent alogcat trace and I added "..." where there were many almost identical lines:

Code:
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-67369384,-50000000) -- cpu overload ? #####
...
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-58498535,-50000000) -- cpu overload ? #####
I/Choreographer(11058): Skipped 131 frames!  The application may be doing too much work on its main thread.
W/bt-btif ( 1235): ### UNDERRUN :: ONLY READ 0 BYTES OUT OF 512 ###
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-798387449,-50000000) -- cpu overload ? #####
W/bt-btif ( 1235): ### UNDERRUN :: ONLY READ 0 BYTES OUT OF 512 ###
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-1344443103,-50000000) -- cpu overload ? #####
W/AudioTrack(   97): obtainBuffer timed out (is the CPU pegged?) 0x40a1cd88 name=0x1user=00ee8e00, server=00ee6600
W/bt-btif ( 1235): ### UNDERRUN :: ONLY READ 0 BYTES OUT OF 512 ###
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-142488247,-50000000) -- cpu overload ? #####
W/AudioFlinger(   97): write blocked for 20638 msecs, 2 delayed writes, thread 0x41a80008
D/dalvikvm(  376): GC_CONCURRENT freed 1918K, 20% free 13640K/16844K, paused 39ms+65ms, total 21113ms
D/dalvikvm(  376): WAIT_FOR_CONCURRENT_GC blocked 21006ms
D/dalvikvm(  376): WAIT_FOR_CONCURRENT_GC blocked 232ms
D/dalvikvm(  376): WAIT_FOR_CONCURRENT_GC blocked 223ms
D/dalvikvm(  376): WAIT_FOR_CONCURRENT_GC blocked 20ms
D/HeadsetPhoneState( 1235): sendDeviceStateChanged. mService=1 mSignal=3 mRoam=0 mBatteryCharge=4
D/HeadsetPhoneState( 1235): sendDeviceStateChanged. mService=1 mSignal=2 mRoam=0 mBatteryCharge=4
I/Choreographer(11058): Skipped 1297 frames!  The application may be doing too much work on its main thread.
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-220421086,-50000000) -- cpu overload ? #####
...
E/GKI_LINUX( 1235): ##### ERROR : timer_thread: tick delayed > 5 slots (-285830022,-50000000) -- cpu overload ? #####
Does this match the known bugs that Google has been working on? Is there any information or testing/debugging that I can do to help?
Try the latest cm 10.1 build. They did some fixing up on Bluetooth add far add quality. Next time it freezes see if it reboots after 30 seconds and three finger salute to reboot if it doesn't reboot automatically. Then pull the last_kmsg.

Sent from my Galaxy Nexus using Tapatalk 2