Lessons learnt from MOD Duo xruns?

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

User avatar
noedig
Established Member
Posts: 115
Joined: Wed Feb 12, 2014 4:39 am
Location: South Africa

Lessons learnt from MOD Duo xruns?

Postby noedig » Mon Feb 06, 2017 6:47 am

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?

User avatar
falkTX
Established Member
Posts: 6646
Joined: Sat Jan 09, 2010 3:04 pm

Re: Lessons learnt from MOD Duo xruns?

Postby falkTX » Mon Feb 06, 2017 9:36 am

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 https://github.com/moddevices/mod-plugi ... e/jack2mod for the list of patches.
(the first patch is to workaround a driver bug)


Return to “Developer's Section”

Who is online

Users browsing this forum: No registered users and 1 guest