Help with OpenSL and Android 4.4.3, estrange underrun situation

77 views
Skip to first unread message

David García

unread,
Jun 11, 2014, 8:26:21 AM6/11/14
to andro...@googlegroups.com
Hi,

I'm developing with OpenSL to playback audio on Android, since yesterday I was struggling with noises caused apparently because it took to much time to process next buffer when CPU clock reduced its frequency, that and the fact that in Nexus 4 seemed to only use one buffer internally (at least it looked like this watching systrace and according to https://groups.google.com/forum/#!msg/Android-ndk/aSemcXzr3Sc/AJpRWr489pUJ)

I've just updated to Android 4.4.3 in my Nexus 4 which seems to solve the problem in a long term observation, but it suddenly starts to get buffer underruns in a regular basis.

I've attached couple of systrace images, one overall view and a zoom in into the spotted problem. What seems strange to me is that FastMixer becomes runnable, but does not run. In the meanwhile some executions of AudioOutput_2 will happen but there is no sign of any other process taking CPU time. First of all I thought I was causing a lock somewhere, but the fact that this code runs perfectly on other devices I'm a little bit lost.

Am I looking correctly the systrace, or am I missing something? What is true that the only difference between yesterday and today is I've updated to 4.4.3. Yesterday I was trying to solve one kind of issue, but today it seems to be a complete different creature.

Any guidance will be appreciated.

BR,
David

Device info 
Device: Nexus 4
OS: Android 4.4.3
Kernel version: 3.4.0-perf-ga6edd5e
Compilation number: KTU84L



Overall.png
Zoom_In.png

Glenn Kasten

unread,
Jun 13, 2014, 1:43:19 PM6/13/14
to andro...@googlegroups.com
This is possibly a kernel bug, but we need to investigate to confirm.
This android-ndk group is not the best place for tracking or discussing bugs, so
can you please log a bug here: 
Click New issue / developer bug report
Include the same text here and same systrace attachments.
If you can also include as much information as possible
about your test app and conditions so that it would be easy to reproduce, that will
make it easier to investigate.
Also include the adb bugreport, ideally captured 
while audio is still playing, and the captured within a few 10s of seconds of hearing the underruns.
(there are some statistics in the bugreport that will be really helpful,
but the statistics roll over so we need to catch them right after the underrun).
Then please reply on this thread with the URL of the new issue,
and we'll continue the follow-up at the issue tracker instead of here.
Thanks
Reply all
Reply to author
Forward
0 new messages