Bluetooth Locking Up
@Lysergic Acid
Hey LA! I wanted to make you aware of a bug I have been having trouble with for a long time. I've tried to diagnose it myself but it's unfortunately beyond my skillset.
Basically any time a bluetooth device is connected and is actively used for audio I/O, the entire UI will intermittently freeze (often times for up to 10 seconds) with intermittent periods of smooth operation lasting 2-3 seconds each. This makes dialing touch-tones while connected to bluetooth nearly impossible. Surprisingly the incoming / outgoing audio seems to be completely unaffected.
This issue wasn't present in CM10.1. I first noticed it when I upgraded to CM11 and it has persisted through Lollipop. I have done a full wipe and fresh install multiple times since I first noticed it with no success. I imagine it'll also affect your upcoming work on CM13.
I've attached a short logcat of the issue (during the course of a phone call, using touch tones intermittently). These are the relevant messages (out of order):
W/AudioTrack( 3326): dead IAudioTrack, PCM, creating a new one from start()
E/AudioTrack( 3326): detected illegal retrograde motion by the server: mServer advanced by -9024
W/SurfaceFlinger( 1846): Timed out waiting for hw vsync; faking it
E/ToneGenerator( 3326): --- Stop timed out
I/Choreographer(17676): Skipped 142 frames! The application may be doing too much work on its main thread.
E/TinyALSA-Audio Output( 3005): pcm write failed!
E/TinyALSA-Audio Output( 3005): Process and write failed!
W/AudioFlinger( 3005): write blocked for 9999 msecs, 4 delayed writes, thread 0x40ef8008
In scouring the forums, I couldn't find anybody that had also experienced this issue (so I'm assuming it's a problem with the device specific code, ie. TinyALSA). Let me know if you plan on looking at this. I'm happy to assist in resolving this if you like (I could debug in specific situations or scour the code if you point me in the right direction).
Thanks!