Interrupt or preemption disabling sounds right, and I believe that I have definitively established the cause as somewhere in the WiFi stack. Test runs go from very few - often zero - xruns with WiFi disabled to many thousands of xruns and numerous Jack watchdog resets with WiFi enabled.
I am familiar with systrace and it has been a good tool for me in the past. Unfortunately I no longer consider it useful at this point in my development. I am tracking down faults unrelated to the activity of my application; faults that occur many minutes, even hours, into my test runs at seemingly random moments. My best solution has been to invoke systrace repeatedly from a loop in a bash script ensure it is running at the moment of failure. Unfortunately systrace itself generates a flood of xruns and watchdog resets.
These points are discussed in greater detail, along with test results, in my blog at
http://proaudioandroid.blogspot.com/ .
At this point I have statistical evidence that the WiFi stack is the cause of my current xrun problem. Verbose WiFi debug log offers no clues. As systrace is problematic, I am continuing the investigation by making speculative code changes. Additional suggestions are welcome.
With my audio buffer at 2.7 ms I think I am the canary in the coal mine.
Thanks for your assistance on this an so many other issues,
Brad Justice