USB Audio performance

Hi,
I’m trying to identify a performance issue in my zynthian build, I’m using a USB audio interface (actually I tried several interfaces).
I know that the USB stack is CPU consuming, but I am able to run Obxd full voices with Jalv in raspbian strech with desktop without any xrun error.

When I try Obxd with Zynthian OS I get xruns with just 4/5 voices.

Something similar happens with NoiseMak3r.

Has someone else notice this?

raspi3 or 4?

Also what are the jack settings? Specifically the Frames/Period in a default desktop setup is quite often it’s set at a much larger value which makes audio processing easier at the expense of high latency.

Can you share a screenshot of top or htop for both situations that you describe? That’ll give a more detailed idea on what is using your CPU at those moments.

Raspi 3b+

Same jack settings in both cases
Sample rate 48000
Buffer size 256
Period 2 or 3

The only actual difference is the SD Card.

1 Like

I just recalled there are specific buffer sizes and periods that are optimal for USB, specifically for jack. I think this page could be of use to test a few different settings with.

That page would imply that 3 periods would be better than 2, for your sample rate and buffer size.

And it’s the exact same obxd patch? I found when my pi3 was a zynth, some patches were ok, some caused xruns.

Thanks, for the comments.

Yes, I’m using the same jack settings in both environments (same period, buffer size and sample rate).
And yes, I’m testing with the same patches.

Finally I had some time to do another test.
I was able to get an I2S DAC (a suptronics x400 based on a PCM5122) and as I expected the performance is better, I don’t have xruns with NoiseMak3r but there are xruns with Obxd.

The last test that I can do is to change the SD Card, I didn’t check if swap is enabled in the ZynthianOS image but that could be the issue.

Would be great if someone with a similar build (Raspi 3b+ and Usb interface) could confirm that Zynthian image works without xruns when using OBxd and NoiseMak3r with Jalv.

Thanks

1 Like

And the cpu clock settings are the same for both too?

Yes, I didn’t overclock the cpu.

Can you confirm that Zynthian OS is able to run Obxd in Jalv without xruns using a Rpi3b+ and a USB interface?

Thanks

1 Like

No. RBPi3 is not capable of running OBX-d without XRuns. You need a RBPi4 for that.

Regards,

Are you using the KXStudio repo for obxd?

Right. I DISMANTLED my setup to test this magical scenario on my rpi3 B+ using the same patch (StevenGrace/PAD - RandnHold) with obxd on raspbian and zynthian and it xruns like bugger.

note: I’m assuming you’re using the KXStudio repo. It would have been helpful to document ALL the steps when you’re asking people to do testing.

YOURS MUST BE HAUNTED, RUN AWAY.

I’m using an old pre build Obxd from zynthian repo

The good thing is this builds have UI, so I can run them using jalv.gtk

I didn’t have time to do more test, but what you can do is to try the jalv from the apt repositories.
Last time I’ve tested I’m pretty sure that I was using the modified version of Jalv which Zynthian OS is using but maybe I’m wrong and the performance problem is related to the increment of buffers in that modified version.

1 Like

Let me know when you have a properly reproducible test and I’ll have another go. One good thing out of this was I found a spare SD card.