• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

RPI4 as multi-purpose audio device : network streamer & digital audio mixer?

rcstevensonaz

Active Member
Joined
Nov 27, 2020
Messages
183
Likes
147
My context is a home office stereo listening environment. I am a bit unusual in that I want all audio channels always active and devices able to barge-through — hence focus on 'mixer' rather than 'selector'. Audio sources include work PC, personal PC, Echo, Squeezebox, Allo, turntable, microphone, etc. In my case, if I say "Alexa", I want to just have it start talking to me. If I kick off a YouTube in Facebook, I want it to just start playing. If I queue up an album on Squeezebox, I want it to play; but I still want to hear my PC beep to alert me that I need to jump onto a call (while I reach for the Squeezebox remote to pause playing), etc. Put different: I control what I hear by using Play, Pause, Stop, and Mute on the source devices themselves, instead of using a selector switch that "force mutes" everything else. [Thanks @ctbarker32 for pointing out I forgot to include context... hope this helps].

Question: Does an RPI4(1GB) + HAT — such as an Allo DigiOne Signature Player — have enough processing capability that it could simultaneously serve the following functions at the same time?

1. Network Streamer. Essentially, the reason most people purchase an Allo DigiOne Signature Player. Provide user interface*, receive streamed network audio, and route the audio stream out the Coax S/PDIF ports (and potentially also to an internal driver for direct feed to the mixer as well)​
2. Digital Audio Mixer (e.g. Reaper, Non Mix, etc.). Connect to the ADI-2 Pro FSR device via USB port (6/8 multi-channel mode) to provide digital audio mixing (DAM) to mix the RME's 3 outgoing stereo streams into one or more output stereo stream, apply volume control, and route out the output back to the ADI-2 Pro FSR across the RME's 4 incoming stereo channels.​
3. Room Correction (e.g., Dirac). Could the same RPI not only mix the audio, but also provide multi-band room correction using software such as REW or Dirac Live? And to do that, would I also need a DSP HAT card for the RPI4, or is ARM processor sufficient?​
Originally, I thought I would need three different devices: Allo DigiOne (e.g., Roopie), Allo USBRIDGE (e.g., Reaper), and a MiniDSP DDRC (for Direc Live). But I'm wondering if I can just use a single device for all functions.

My instinct is that power and speed of the latest ARM chip, combined with the improved network port / USB separation of the latest RPI4 board design, should be sufficient for all of those tasks to run concurrently. Essentially, the RPI4 would be an integrated network streamer target, audio mixer, and effects processor for up to four stereo-in by four stereo-out (8x8 channels).

Yes, I know I could spend time experimenting; and eventually I will. But, time is precious so hoping to cut off a chunk of "dead end" learning curve since I suspect many others are already well aware of the capabilities & limitations of the latest RPI4 for audio.

* The User Interface (media server) portion could move off to a separate server; not need for that to be on the PRI.
 
Last edited:

ctbarker32

Member
Joined
Mar 15, 2019
Messages
87
Likes
157
Not clear what you are trying to accomplish? Are you setting up a stereo listening rig or trying to create a recording studio (Reaper)?

RPi devices have long been the diy goto product for creating streaming audio clients. If you have a USB DAC you can just use the RPi alone with a streamer distro of your choice such as picorePlayer, Roipeee, MPD (Volumio, etc. Or, you can add a DAC HAT such as HifiBerry, Allo, and use S/PDIF or Analog out.

As far as DSP, your best bet for a standalone stereo audiophile rig would be the built in DSP provided by Roon. Or the DSP functions in the RME ADI-2 you mentioned.
 

Honken

Senior Member
Joined
Mar 10, 2020
Messages
339
Likes
602
Location
Scania
Well, I'm doing 1 & 3 on my Raspberry 4 with an Okto Research dac8PRO. The RPi does not boost beyond its 600MHz baseline frequency while streaming over AirPlay and applying ~35 filters of DSP (mixing/PEQ/XO) to four channels (subwoofers and mains).

I assume that mixing would be more intensive, if you're thinking of using a DAW directly on the RPi itself. However I assume that applying DSP in software on an incoming signal would work fine, but I have no experience of doing this - or with the ADI-2 Pro hardware.
 
OP
R

rcstevensonaz

Active Member
Joined
Nov 27, 2020
Messages
183
Likes
147
Not clear what you are trying to accomplish? Are you setting up a stereo listening rig or trying to create a recording studio (Reaper)?
Home office stereo with all sources always active. Thanks for pointing out I forgot to provide context :rolleyes:

RPi devices have long been the diy goto product for creating streaming audio clients. If you have a USB DAC you can just use the RPi alone with a streamer distro of your choice such as picorePlayer, Roipeee, MPD (Volumio, etc. Or, you can add a DAC HAT such as HifiBerry, Allo, and use S/PDIF or Analog out.
The question is, can I then also run Reaper (USB to ADI-2 Pro) on the same RPI device while it is separately running picocorePlayer (Coax S/PDIF to ADI-2 Pro)? Both services (network streamer, digital mixer) are very sensitive to timers, so the underlying hardware has to be able to keep both processes running fast enough to eliminate internal jitter.[/QUOTE]

As far as DSP, your best bet for a standalone stereo audiophile rig would be the built in DSP provided by Roon. Or the DSP functions in the RME ADI-2 you mentioned.
That was my starting assumption (miniDSP DDRC24). But, I've seen reference to just running Dirac Live as software on a Window's machine, which caused me to wonder if a powerful RPI4 had a powerful enough CPU to function instead of a dedicated device with custom DSP chip. Or, if perhaps there is already a DSP HAT designed for RPI4.

Separately, I won't be a Roon user :)
 
OP
R

rcstevensonaz

Active Member
Joined
Nov 27, 2020
Messages
183
Likes
147
Well, I'm doing 1 & 3 on my Raspberry 4 with an Okto Research dac8PRO. The RPi does not boost beyond its 600MHz baseline frequency while streaming over AirPlay and applying ~35 filters of DSP (mixing/PEQ/XO) to four channels (subwoofers and mains).

Thanks. That is pretty similar to what I am planning on. Key addition is that I want to combine (mix) multiple sources into the same stereo stream before applying the DSP room corrections.

Which software do you use for the DSP transformations?
 

Honken

Senior Member
Joined
Mar 10, 2020
Messages
339
Likes
602
Location
Scania
Thanks. That is pretty similar to what I am planning on. Key addition is that I want to combine (mix) multiple sources into the same stereo stream before applying the DSP room corrections.

Which software do you use for the DSP transformations?
Right, I'm a bit confused by your wording however - are you talking about multiple programs sending output at once, or using multiple physical inputs to your RME? Or both at once?

The former is easy and is what I do, I use this aptly named program to apply DSP to one output (the Okto) from multiple source programs (shairplay-sync and MPD in my case).

For the latter, there's a program called `alsa-loop` that comes with ALSA that you probably could use to loop input from your RME to the synthetic DSP device. I haven't checked the CPU usage on my Pi using alsa-loop, but on my laptop it resulted in ~3% CPU usage at 800MHz. In other words, it should work just fine on a Pi. You'd probably have to tune the settings a bit to prevent underruns, but as long as you don't have a hard realtime requirement I'm sure you'd find some setting that would work well for you.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,682
Likes
2,962
The question is, can I then also run Reaper (USB to ADI-2 Pro) on the same RPI device while it is separately running picocorePlayer (Coax S/PDIF to ADI-2 Pro)? Both services (network streamer, digital mixer) are very sensitive to timers, so the underlying hardware has to be able to keep both processes running fast enough to eliminate internal jitter.
I guess you mean squeezelite rather than piCorePlayer. There's no reason you couldn't send the output of squeezelite into the mix directly. It generally has a very low cpu usage.

Have you confirmed that the RME's multi-channel mode is available in linux?

From the pure audio side I expect the Pi 4 to have more than enough capability. The issues are more likely to be on the user interface side, and whether you can do the necessary configuration as it's somewhat unusual, and there are several possible approaches.
 

abdo123

Master Contributor
Forum Donor
Joined
Nov 15, 2020
Messages
7,425
Likes
7,940
Location
Brussels, Belgium
Well, I'm doing 1 & 3 on my Raspberry 4 with an Okto Research dac8PRO. The RPi does not boost beyond its 600MHz baseline frequency while streaming over AirPlay and applying ~35 filters of DSP (mixing/PEQ/XO) to four channels (subwoofers and mains).

I assume that mixing would be more intensive, if you're thinking of using a DAW directly on the RPi itself. However I assume that applying DSP in software on an incoming signal would work fine, but I have no experience of doing this - or with the ADI-2 Pro hardware.

Do you mind explaining how you got the Pi to do active crossover?

Do you play turn tables or use your speakers for a TV? If so, how do all these things play out?
 

ctbarker32

Member
Joined
Mar 15, 2019
Messages
87
Likes
157
That was my starting assumption (miniDSP DDRC24). But, I've seen reference to just running Dirac Live as software on a Window's machine, which caused me to wonder if a powerful RPI4 had a powerful enough CPU to function instead of a dedicated device with custom DSP chip. Or, if perhaps there is already a DSP HAT designed for RPI4.

Separately, I won't be a Roon user :)
HifiBerry in fact has a DSP HAT: HiFiberry DSP
 
OP
R

rcstevensonaz

Active Member
Joined
Nov 27, 2020
Messages
183
Likes
147
Right, I'm a bit confused by your wording however - are you talking about multiple programs sending output at once, or using multiple physical inputs to your RME? Or both at once?
Yea, it is a bit confusing as I am working through what is possible. The answer is potentially both In & Out.

At a minimum, I want to level-balance and mix the incoming stereo channels.

But, I am also potentially interested in being able to apply different DSP corrections on the multiple output streams—e.g., different DSP "room" correction for the stream that will be use for the desktop monitors vs. the stream that will be sent to the headphone jacks. That said, separate processing on the outbound streams is lowest on the priority.
 

Honken

Senior Member
Joined
Mar 10, 2020
Messages
339
Likes
602
Location
Scania
Do you mind explaining how you got the Pi to do active crossover?

Do you play turn tables or use your speakers for a TV? If so, how do all these things play out?
I use the aforementioned dsp program. No magic to it, but it is very... DIY. This part of my config would do it it, it's a LR8 at 100Hz (mentally changing the whitespaces to newlines might help parsing it):
Code:
effects_chain=remix 0 1 0 1 :0,1 highpass 100 0.5412 highpass 100 1.307 highpass 100 0.5412 highpass 100 1.307 :2,3 highpass 20 0.5412 highpass 20 1.307 highpass 20 0.5412 highpass 20 1.307 lowpass 100 0.5412 lowpass 100 1.307 lowpass 100 0.5412 lowpass 100 1.307
It results in this:
xo.png

To be clear, I don't really recommend my approach - but it is very flexible and it would support more unusual setups, such as applying DSP from capture devices. There are multitudes of system wide DSP programs for Linux if you want alternatives, check out this excellent resource by @Doodski:
https://www.audiosciencereview.com/...ows-linux-macos-ios-ipados-and-android.18450/
 

Honken

Senior Member
Joined
Mar 10, 2020
Messages
339
Likes
602
Location
Scania
Yea, it is a bit confusing as I am working through what is possible. The answer is potentially both In & Out.

At a minimum, I want to level-balance and mix the incoming stereo channels.

But, I am also potentially interested in being able to apply different DSP corrections on the multiple output streams—e.g., different DSP "room" correction for the stream that will be use for the desktop monitors vs. the stream that will be sent to the headphone jacks. That said, separate processing on the outbound streams is lowest on the priority.
Either is possible with the approach I'm using. You could set up multiple DSP configs tied to separate virtual devices, and then send the virtual devices with any program / capture device you like.

@somebodyelse raises an excellent point however (as always), have you tested the RME at all under Linux? As I mentioned, I don't have one of these boxes so I don't know what functionality it would expose to the OS.
 
OP
R

rcstevensonaz

Active Member
Joined
Nov 27, 2020
Messages
183
Likes
147
I guess you mean squeezelite rather than piCorePlayer. There's no reason you couldn't send the output of squeezelite into the mix directly. It generally has a very low cpu usage.

Have you confirmed that the RME's multi-channel mode is available in linux?

From the pure audio side I expect the Pi 4 to have more than enough capability. The issues are more likely to be on the user interface side, and whether you can do the necessary configuration as it's somewhat unusual, and there are several possible approaches.
Good point on verifying there is a linux driver that can work with RME's USB output.

And thanks for insight on the software -- I have not yet figured out all of the details for migrating from my current LMS server (VM on ESXi)+ Squeezebox Classic v3 end-points an RPI-base solution; including whether to collapse to an all-in-one on an RPI, or keep the server and the player separate. From your point, it seems the RPI processor would be able to easily handle both duties. Would there be any need for more than 1GB RPI4 if I am running server on it?
 

Honken

Senior Member
Joined
Mar 10, 2020
Messages
339
Likes
602
Location
Scania
Well, if you are selfhosting VMs on ESXi I'm going to assume that you are somewhat technically inclined, and thus fiddling with ALSA/DSP should be doable with any general purpose OS on the Pi. An audio playback oriented OS might get more in the way than simplifying things.

What does your LMS use in your current setup? It ought to be a good indication of what you can expect on another PC. Besides, can you even find the 1GB model where you live? The smallest model is 2GB these days.

No matter your choice in DSP, it shouldn't consume any considerable amount of memory. My setup consumes a whopping 65MB in total.
 
OP
R

rcstevensonaz

Active Member
Joined
Nov 27, 2020
Messages
183
Likes
147
Well, if you are selfhosting VMs on ESXi I'm going to assume that you are somewhat technically inclined, and thus fiddling with ALSA/DSP should be doable with any general purpose OS on the Pi. An audio playback oriented OS might get more in the way than simplifying things.

What does your LMS use in your current setup? It ought to be a good indication of what you can expect on another PC. Besides, can you even find the 1GB model where you live? The smallest model is 2GB these days.

No matter your choice in DSP, it shouldn't consume any considerable amount of memory. My setup consumes a whopping 65MB in total.
Current environment consists of (a) Vortexbox running LMS, and (b) FreeBSD-based NAS4Free file server. Popping around in some variation of a headless Unix is no issue; and easier if I can fire up an image of Emacs. Been around Unix since 1981, and I've never run Unix with a desktop environment :)). That said, there is a lot to be said for simplicity of tools that offer easy UI.

My current RPI4 is whatever was shipped with the Allo Digi Signature Player; their website says 1GB, but it might be the 2GB. In terms of mixing & DSP processing, I wouldn't expect them to consume much space at all. It is once I start firing up databases associated with the music server that would start to worry about recommended minimum RAM. But, the media server can easily be offloaded if needed; it was the network player, multi-channel mixing, and DSP combo that I was hoping to combine to avoid proliferation of RPI devices. And, based insight from you and others, seems that it is doable. Much thanks.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,682
Likes
2,962
I think Doodski's thread on EQ programs has been avoiding crossover software unless it's something that can do both like BruteFIR. There's a lot of overlap, but I think a few things like Pulseaudio Crossover Rack were left out.

If you're looking to run headless you can probably do almost all of what you want in the asoundrc config. Between the plugin docs and this annotated example asoundrc you should get a good idea of how most of it works and how you can chain things. If you need to be able to adjust the LADSPA plugin controls instead of having them fixed you can use the alsaequal plugin - see its advanced config options. I suspect BruteFIR or CamillaDSP could do most/all of it too. BruteFIR does have an interface for live config changes but I don't think I've seen it used. CamillaDSP has a similar interface, with related projects to give it a web interface.

JACK and Pulseaudio are probably out as so far as I can tell they both expect to run inside a user sesson. If you were running something with a desktop they'd be good. Pipewire may be just about usable now too - it's intended to be a drop-in replacement for both JACK and PulseAudio.
 

Honken

Senior Member
Joined
Mar 10, 2020
Messages
339
Likes
602
Location
Scania
@rcstevensonaz Nice, I didn't touch anything *nix until almost two decades later in the late nineties. Well, I'm sure using some COTS-OS like Moode is great if your setup is "simple", but from what little I have seen they do get in the way once you stray from the happy path. Applying DSP to digital inputs is definitely one such case. Good luck, and let us know how it goes!

@somebodyelse Well, I'm using dsp for a reason, it really does seem like the most flexible solution if one is willing to use the CLI. You can use different convolvers as well as high/lowpass settings for XO with it. Zita runs fine with it on a Pi if one wants to use a convolver. Not sure why one would use a DSP program that doesn't offer basic functionality.

Not sure if Jack offers anything of value over Pulse in a non-realtime scenario. Haven't tried Pipewire yet.

As for Pulse, one can use a system session with a unit file like so (assuming one uses systemd of course - if not just look at the ExecStart line):
[Unit]
Description=Sound Service

[Service]
ExecStart=/usr/bin/pulseaudio --daemonize=no --disable-shm=yes --disallow-exit --disallow-module-loading --system
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
Restart=on-failure
RestrictNamespaces=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
Type=notify
UMask=0077

[Install]
WantedBy=multi-user.target

You'd then add the following to `/etc/pulse/system.pa`:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1

When all is said and done, you can either set the location of the PA server by configuration directly (MPD and shairport-sync allows this for example), but otherwise programs ought to pick it up if you set the `PULSE_SERVER` environment variable for your service (systemds concept of overrides does come in handy here).

I used to use PA and have no complaints about it, it offers some niceties like a network based volume control (require some additions to system.pa) and a wide selection of resampling algorithms (no reason to use anything but sox-vhq I reckon). But when using custom sinks and source plugins Pulse does not handle unplugging and then replugging the hardware that those plugins depend on as gracefully as straight ALSA does. When directing players to plughw with ALSA, players simply block until the plughw becomes available - but with Pulse you have to reload the module manually if your hardware that your custom sink/source depended on was removed. YMMV.
 
Top Bottom