Page 1 of 1

Lessons learnt from MOD Duo xruns?

Posted: Mon Feb 06, 2017 6:47 am
by noedig
I read somewhere (can't remember where) falkTX mentioning making fixes on the MOD Duo for handling xruns better.
For interest sake, are any of these lessons you learnt while developing the MOD, especially related to handling xruns, applicable to Linux PC audio?

Re: Lessons learnt from MOD Duo xruns?

Posted: Mon Feb 06, 2017 9:36 am
by falkTX
I believe the xrun issue was related to the 3.4 sunxi kernel (which is not mainline, but a fork).
don't know for sure if the same issue happens with the mainline 3.4 version or not, but on 3.4-sunxi one kernel task/job randomly spams a cpu core like crazy.
the current trick involves figuring out which cpu core is the "bad" one during boot, and move the audio-related IRQs to the other one.
the IRQ used for USB is also always on a different core than the audio stuff, because the Duo makes heavy use of USB for its network interface.

that xrun issue is not something that happens on desktops afaik, no nothing to learn from that.
just a ugly workaround for some bad code somewhere. which hopefully won't be needed after going mainline.

the actual lesson learned from working on the device is that optimization is very very important.
on desktops developers usually don't care much, they have enough cpu to spare.
the Duo has quite a few patches here and there to increase performance, mostly on jack2.
see ... e/jack2mod for the list of patches.
(the first patch is to workaround a driver bug)