Elk Audio OS 0.7.2 beta release (HiFiBerry support)

Hello, I’m considering getting a HifiBerry DAC+ ADC Pro for experimenting meanwhile you restock Elk Pi. I’m trying to find latency info specially roundtrip. I know Elk Pi claims 1ms. What about Hifiberry? I’ll be using Hifiberry DAC+ ADC Pro with a Raspberry PI 4B 2GB.
Best
Alex

I’ve measured the roundtrip on the DAC Pro (audio in → audio out) to be 2ms when using a buffer of 16, so the 1ms claims which I believe is only one way hold up pretty nicely :slight_smile:

It appears there’s no versions with a buffer of 8 available, which would shave off some ms fractions.
But it wouldn’t make a hughe difference anyway, so I’m satisfied.

Below is a sine wave burst measured going into the DAC Pro and coming out again. The plugin in use is the standard “no action” plugin that comes with ELK OS - don’t remember the name, but it just takes any input and routes it to the output.

Jesper, thanks for your precise answer. This seems to be very fair. I’ll give it a go.

2 Likes

Hi,
currently the HiFiBerry is configured with the ADC / DAC in high-quality mode and they add c.a. 1.3ms of latency (roundtrip).

In the next release we’ll have an option for the low-latency configuration of the codec bringing it down to 0.7ms, so you’ll be able to have a minimum analog-to-analog latency of (2 * 16) / 48000 + 0.7e-3 = 1.36ms.

On other systems we can go down to 8 samples buffer size but not on the Pi with direct codec access due to some internal FIFOs on the Broadcom SOC.

1 Like

Interesting

As fa as I recall from another post there’s an additional 4 samples to be added to the buffer size due to some internal book keeping?
Not that it matters a lot in the big picture…

Hello,

I had the same problem with the same hardware, until I install 0.7.1 (https://github.com/elk-audio/elk-pi/releases/download/0.7.1/elkpi-audio-os-image-raspberrypi3-v0.7.1.wic.bz2) then update with the 0.7.2.swu (https://github.com/elk-audio/elk-pi/releases/download/0.7.2/elkpi-update-raspberrypi3_v0.7.2.swu) with the url GUI interface (http://IP_adress:8080).

Now I struggle with my raspberry touchscreen (I want to launch sushi or other VST plugin at startup with GUI in order to play with my MIDI keyboard immediately)…

Hi everyone,
unfortunately with the current situation, none of our developers have a RPi 3B available at the moment to test.

We tested both 0.7.1 & 0.7.2 with RPi 3B+ & RPi 4B (all RAM variants).

We’ll try to get one available but it might not be immediate.

The touchscreen won’t work nicely with the RPi 3B / 3B+ as we don’t have HW GPU support for those (it is available on Pi4, though).

Best,
Stefano

I’m running the ELK Audio 0.7.2 image on RPi 4B with 2GB RAM and a HiFiBerry ADC DAC+ Pro. Everything works fine in Raspbian, but ELK doesn’t seem to recognize the HAT.

I followedthese instructions and rebooted, but running “aplay -l” gives me:

elk-pi:~$ aplay -l
aplay: device_list:272: no soundcards found...

dmesg shows the following so it seems like it took the config:

[    7.454985] audio_rtdm: hifi-berry-pro hat
[    7.466826] pcm1863-elk: codec configured
[    7.478425] pcm5122_config_codec: mode = 1
[    7.495800] pcm5122-elk: codec configured
[    7.610996] Elk hat: hifi-berry-pro
[    7.639139] audio_rtdm: driver initialized

Any ideas?

Thanks,
-Mike

Hi @miked,
aplay shows you the ALSA devices.

Elk Audio’s driver is not ALSA-based, you need to access it through either SUSHI (for running plugins) or the RASPA library.

Try one of the SUSHI examples, the last line in your dmesg looks promising.

Thanks, @Stefano. Any pointers on how to get Jack to work with it? I’m trying to use Elk Audio OS to run JackTrip. I was able to use the SDK to cross-compile Qt and JackTrip, and it runs and works OK with USB audio devices. I need it to work with HiFiBerry though, and this is blocking me from moving forward with Elk.

Hi @miked,
JACK would also not straightforward.

You would need to modify JACK itself to add RASPA (our ALSA-like userspace library to access the driver:

)

as one of the possible JACK audio backends. It’s theoretically doable but not very easy especially with JACK 2 due to how JACK handles task scheduling etc.

I can’t say much details but we already mentioned in a couple of places that we’re working on a sollution that’s very similar to jacktrip and we’re going to announce something soon… if you have a working setup with RPi4 and HiFIBerry, drop me a PM if you’re interested in doing some beta-testing.

Thanks, @Stefano. Yes, I’m extremely interested in starting right away. For reference, here is the work I’ve been doing lately. I pinged you on LinkedIn since I couldn’t figure out how to PM via website.

So embarrassed. I am keen to play but hardly get time to immerse so have had a few fractured starts.

I have the HiFiBerry DAC+ 2.6 and Elk 0.7.2 on a Pi4B.
No worries on install, wifi, ssh, etc.
As per the instructions, I set the option for the hat, buffer size, and then restart.

I get errors essentially because there is no directory
/sys/module/audio_rtdm

I hacked a few things to force sushi to run with the correct block size, but that gives a seg fault. At one time, playing with lines from the load_divers script I got a message about modprobe being unhappy.

I figure there is a step somewhere where the HiFiBerry is meant to be detected (modprobe i2c_dev) and without this detection the module/audio_rtdm is not turning up.

The closest I saw on the forum was a post that had similar errors, because the user did not have a hat yet. They added the HiFi Berry and were away (Nice CRO plots jesper). I have the hat but no joy.

Have I missed something obvious like not connecting up the power? Am I trying to fix something with software that is obviously a hardware fault?

Thanks for any thought put into it.

So, you know when you write the question, and start to really put down the facts… It really only struck me as being a hardware problem when posting above.

I swapped the DAC+ADC pro for a DAC+ and the /sys/modules/audio_rtdm magically appeared

Heading to sleep now, but things looking good.

Hi @Glenn,
no worries. It does seem as a HW issue since the DAC+ADC pro is actually the hat we’ve been testing the most.

If you really want to double-check that, you can also try the “standard” Linux distro provided by HiFiBerry and see if that works.

I’ve been using my hifiberry DAC+ for a number of years as my hifi/spotify daemon headless player, and have generally been pleased with it in this context. However I regularly try different OS’s usually with an aim of finding a solution for synths and pro audio, and my conclusion has always been “It’s, ok.”

Well, yesterday evening whilst getting up to date with JUCE, I learned of Elk Audio OS and it struck me as exactly what I had been looking for.

Installation was a breeze, setting up the hifiberry was straight forward and running JX10; WOW! I have got no further than this partly because it was late, but mostly because I could not stop playing. Despite only having access to the first preset at this point it is clear that in terms of sonic clarity, and boot times, Elk Audio OS is not only the winner, but in reality, the only one that truly crosses the finish line. Playing has an immediacy to it that genuinely feels like a hardware device; something I find can be lacking even on full pc’s.

Further to this, the fact that the remaining GPIO allows me to realise my own designs is of obvious benefit that no PC can match; unless you count the Udoo stuff, but they still rely on clunky OS’s.

In it’s current form my set up is this:

Raspberry PI3B
HifiBerry DAC+
Emagic Unitor 8 mk11 8 x 8 usb midi interface. (Although I will probably add a MIDI in to the PI’s UART now that it seems worthwhile)

I’m happy with this for now, at least while I get used to the inner workings of EAOS, but I’m also keen to explore Elks hardware, should stock become available, or possibly new products??? :wink:

I also have an iqaudio dac, that I could try to make work, with the possibility of doing some budgetscience A/B comparisons, but that’s for another time.

3 Likes

Thanks a lot for you very nice post @OhmGroan!

As much as we are currently focused on Aloha, we are still working on the next release of Elk Audio OS which will have major updates on various sides (lots of changes in SUSHI and on the system side). I’d recommend to get a Pi4, though, as supporting the Pi3 is getting harder and we are considering dropping support for it or at least not providing binary builds anymore.

Regarding availability of Hardware units such as Elk Pi: we are still waiting for a new production run to start but there might be some new HW coming out from our side that could be a nice alternative, keep an eye here and on our website.

Best regards,
Stefano

Thanks @Stefano.

I guessed that Aloha was your current focus, under the circumstances you are absolutely right to give it your attention. Real time collaboration was merely a “want” for most folk this time last year, but it has quickly become a “Need” for many artists.

RpI4’s are certainly on my shopping list, although admittedly not a high priority at this time; but that’s ok, for the time being I will be enjoying getting familiar with the inner workings of your incredible OS.

Thanks so much for your response and all your great work.

Further credit to the devs and admins of the forum and documentation pages, look and feel is excellent; it kinda feels like the good old days, but with a shiny new paint job, wiring, plumbing and glazing.

1 Like

I have a few simple questions for which I couldn’t find the answer here…

Are all HiFiBerry boards supported by Elk Audio OS, including the newer ones with headphone support (like the DAC2 Pro) or only a specific subset of HiFiBerry boards?

And would there be any advantage is selecting a HiFiBerry board with an integrated low-jitter clock or is that completely ignored by Elk Audio OS?

Hi @ro5,

we wrote the driver for the ADCs / DACs used in the ADC+DAC and ADC+DAC Pro. But it turns out that those same codecs are used also on most other HiFiBerry boards (and even some clones from other companies) so some people have had success running Elk on those boards.

For the hats that have an integrated low-jitter clock (like e.g. the ADC+DAC Pro), Elk will use it and it should be possible to configure the sampling frequency when starting the driver.