New audio board: Audio Injector Ultra sound card for the Raspberry Pi

@flatmax
Hi Matt, nice to see you here.
Please let us know, when you fixed the driver.
I will test that and the DAC/PGA issue in that case.

-P 70 -t 2000 -s -d alsa -d hw:0 -r 48000 -p 256 -n 2 -X raw

Those are xruns when Pianoteq is used. The Hifiberry seems to use less processing power.
When I play the same sound with Hifiberry, the performance stays green at approx. 50% most of the time with peaks at 80%. (at 44.1k)
But with AudioInjector Ultra and Zero as well, I am constantly at 60/70% with little peaks up to 100%, so that there are occasional xruns.

Thanks a lot,
Markus

Sweet !

I am wondering why two i2s based cards would have such different cpu usage ?

Both use the same DMA right? Their Alsa soc pcm processes should be very similar … hmmm

I have had a thought. Maruks, can you tell me, does the audio injector open jack in full duplex mode (with input and output) ? Do the other sound cards open jack in half duplex output only mode ?

Hm. Yes the hifiberry doesn’t have Audio In.
How can I disable it so that the Audioinjector Zero is saving resources?
Is muting enough?
The comparison between hifiberry and ultra isn’t fair because ultra is set to 48k.

Just noting that upstream Linux is in the process of being patched for the issue 1 above.
This will make alsactl store work as expected.

Turns out it was a cs4265 linux codec driver bug.


https://patchwork.kernel.org/patch/10934433/

2 Likes

Thanks for the update, @flatmax!

Can I expect the change already when I do an rpi-update?

1 Like

@flatmax
I just tried, but an rpi-update didn’t solve it. Do I have to wait?
Are you informing us, when we can test again?

Cheers,
Markus

@flatmax
I just tested the Ultra with our first running buster image on a Raspi4…no :frowning: jack hasn’t been started.

Ok, I don’t know, what went wrong first. Now it works.
The alsastore issue is solved.
The pianoteq index is 17 and the first time in my life I don’t get any xruns…running raspi4…

So now I can officially say, that zynthian supports Audio Injector Ultra as well :slight_smile:

5 Likes
3 Likes

Please use this thread

fyi, there is currently a bug:

I think, it’s even located in the driver itself.
What is the best way to run a command during startup?
I could pick one of the raspbian ways. But is there a zynthian way as well?

Something I could configure in the webconf would be nice.

You need to run a mute every start…yes, mute, not unmute…I think, it’s reversed somewhere.

This is hardcoded in the update_zynthian_sys.sh, inside zynthian-sys/scripts. You can fix It there.

Regards

that is only called during update.
I added this line (which works when I run it manually)
amixer -c audioinjectorul sset ‘DAC’ mute
(note the bug…it means unmute)

But after restart it’s still mute.
I tried /etc/rc.local as well. But that is too early.
I tried to change the line in zynthian_engine_mixer but this only helps for the startup issue. When I change the volume in AudioMixer, it’s mute again.

It seems a bug in the mixer state restoring, but AFAIK, it only affects this soundcard.
A good place to run something like this would be the UI’s startup script, but it will be overwritten on every update. We should add a hook point to run a user script. Could you add a “Feature Request” on github?

Thanks!

I tried a line after startx already…that’s too early as well…btw.
In the end it’s a bug with the soundcard driver. I just need a hook for a temporary solution.
I am on testing branch now and at least the volume works, once I unmuted it.

@riban
zynthian_engine_mixer… is this still used with the new mixer?
I added this on top of get_mixer_zctrls:
check_output(“amixer -c 4 sset ‘DAC’ mute”, shell=True)
But still to no avail.
And Muting/Unmuting the layer didn’t work either.
The special layout of this soundcard is, that “DAC” is volume and pswitch. The original zynthian_engine_mixer code can’t cope with that and just handles it as volume. fyi

That is the UI for Audio Levels view, i.e. the control of the hardware levels and other configurations. It would be good to change the name of the class.

I figured out, that when I call the Audio Level screen, my soundcard mutes.
Where is the code for that panel, so that I can call the amixer command on display of that screen?

Sorry, just read your post…must be there.
when I change the amixer line from unmute to mute, it works…