INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to multichannel on Linux (RPi)  (Read 394 times)

Mitchco

  • MC Beta Team
  • World Citizen
  • *****
  • Posts: 182
How to multichannel on Linux (RPi)
« on: March 26, 2025, 03:35:30 pm »

Hello,

I have JRiver setup for playing 5.1 multichannel and trying to get that output to my Motu mk5 DAC. The DAC shows the correct number of channels, but I can't seem to get JRiver to output anything greater than stereo.

Using the latest version of JRiver along with pipewire as it seems to be the default now on Linux and RPi. Latest RPi release as well.

I also use qpwgraph as it is an easy way to visualize the connections and save them.

Maybe someone more knowledgeable about Linux can point me in the right direction. Thanks!

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5280
  • "Linux Merit Badge" Recipient
Re: How to multichannel on Linux (RPi)
« Reply #1 on: March 26, 2025, 09:53:07 pm »

So it looks like Mediacenter is outputting six channels in your picture but maybe pipewire isn't sending it on, which is odd?  It looks like maybe your pipewire is configured to downmix to stereo?

I haven't tried to use pipewire for multichannel yet (although it works quite nicely for stereo).  All my multichannel systems are still running direct ALSA hardware outputs. Have you tried any of the hardware direct audio device outputs in JRiver instead of using pipewire as a test? 

Other thoughts: 

You may also want to check and see what the system sound mixer settings are (in the audio widget) as those can also affect things when using pipewire. 

Also does any other software play multichannel correctly using pipewire? 

As a final thought, I'd suggest running pavucontrol (or installing it if it's not currently installed) and having a look at what you can see there.  It used to come preinstalled on Pi's, but it may not be anymore.  It's an older audio control panel built for pulseaudio, but it works just fine with pipewire and it sometimes exposes some audio configuration options that I haven't seen surfaced in the native pipewire gui apps.  Worth a shot for diagnostics if nothing else.
Logged

syndromeofadown

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 822
Re: How to multichannel on Linux (RPi)
« Reply #2 on: March 28, 2025, 12:50:32 am »

I am not an expert on linux or surround but I have gotten 2 setups going recently with linux and surround sound.

I do not have a Pi with me now, but going from memory when I set up the Pi running raspberry pi os with MC I did the following:

In MC/Options/Audio/Audio Device choose the correct device for your dac, there will be many options with "motu" in the name. The one that works for me is “Plughw:....[ALSA]... Hardware device with all software conversions” Where I have dots you should have the DAC name. Make sure it starts with Plughw, and ends with All Software Conversions.

In MC/Options/Audio/DSP & output format set your channels to 5.1. Be careful, sometimes this reverts back to stereo if you play something to that zone with the dac disconnected.

In raspberry pi os right click the volume thing by the clock in the taskbar and choose Device Profiles. For your motu dac change it from stereo to Pro Audio (I believe it Pro Audio, it obviously shouldn't be stereo though). Also make sure the motu is selected as default device there. You could turn off the other devices.

When I first setup the Pi I had no sound. Switching from Pro Audio to Stereo, then back to Pro Audio fixed it.

That's it.

If you still have issues you could use VLC to troubleshoot. This could let you know if it is an MC setting issue, or a linux/dac issue. I don't use VLC much but, but from memory, adding the dac it is essentially the same as MC. In VLC check the box to show advanced settings, then choose the sound device and set to 5.1.

I have never messed with pipewire, pulse audio, or ALSA. I just use whatever is included in the OS and things work. I have used Kubuntu, Raspberry Pi OS, and Fedora KDE for surround, with miniDSP Flex HTx, HiFiBerry DAC8x, Behringer U-Phoria UMC1820 USB Audio Interface (UMC1820d1), and ASUS Xonar U7 Sound Card.
Logged

Mitchco

  • MC Beta Team
  • World Citizen
  • *****
  • Posts: 182
Re: How to multichannel on Linux (RPi)
« Reply #3 on: March 28, 2025, 11:50:44 am »

Thanks mwillems and syndromeofadown

I managed to get JRiver to output MCH (not sure how :-) and the Motu is in Pro Audio mode. But the Motu only sees 2 channels and not 5.1. So I will be reaching out to Motu support to see what the issue is.

I tried several JRiver outputs to the device, but got the not supported dialog from JRiver. Maybe you can see in the list of one I should try? Probably related to the Motu issue above...

Thanks again for your help!

 

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5280
  • "Linux Merit Badge" Recipient
Re: How to multichannel on Linux (RPi)
« Reply #4 on: March 28, 2025, 12:19:01 pm »

About Audio Devices:

I'd suggest trying the output that starts with surround51:CARD=Ultralitemk5.  That's a hardware direct connection to the Motu as a six channel device with no intermediate software tinkering.  It will bypass pipewire entirely, and if it works it should be rock solid.  Depending on how the hardware reports its capabilities it may error instead, in which case I'd suggest using the plughw:CARD=UltraLitemk5 output.  Both are hardware direct outputs, but the latter permits conversions (i.e. it will try to match channels up and if it can't set the sample rate on the device will resample, etc.).

Worth trying both for testing to see if the outputs show up as expected or if there's still some trouble on the Motu side.  If you successfully get six channel output with these devices, there's something going wrong at the intermediate software layer (i.e. pipewire).  If JRiver shows six channels going out with either of the above devices, but the Motu still is only playing stereo, it's more likely a hardware/driver issue IMO.  If neither of the above devices work at all (i.e. no playback/"something went wrong with playback" errors), then something else is going on.

About pipewire:

I notice that there are no pipewire devices listed in your sound device options, only pulse audio options?  And your default audio option shows pulseaudio instead of pipewire.  Pipewire is a drop in replacement for pulse, but if you're actually using pipewire you should see one or more pipewire devices in your audio device options.  I know this sounds like a dumb question, but are you positive you actually have pipewire configured to be the system sound server and not pulseaudio? 

To be clear, with a correctly configured pipewire installation, I see *both* pipewire and pulse audio device options (because pipewire impersonates pulseaudio for compatibility), but it's odd that you have only pulseaudio outputs and no pipewire outputs.  See the attached image for an example of how my audio devices look on a system running pipewire.  If you don't actually have pipewire setup as your sound server then all the pipewire configuration and graph utilities are probably just leading you astray (i.e. it's possible that none of it is "plugged in" and you actually need to configure pulseaudio instead).

If you type "pactl info" into a terminal, what do you see under "Server Name"? It should say something like "Server Name: PulseAudio (on PipeWire 1.4.1)"  If it instead just says "pulseaudio" you're not actually running pipewire.
Logged

syndromeofadown

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 822
Re: How to multichannel on Linux (RPi)
« Reply #5 on: March 28, 2025, 05:59:55 pm »

I am curious if the motu is confirmed to work in multichannel with linux. There are topics on Audio Science Review (ASR) forum with many owners. You could ask there if anyone got it working.

I think of this because today I am using a Tascam US-2x2HR interface. When I bought it I was actually going to get a motu, but went with Tascam for linux comparability.

One could also try it on Ubuntu or similar, just for troubleshooting and confirming compatibility.
Logged

Mitchco

  • MC Beta Team
  • World Citizen
  • *****
  • Posts: 182
Re: How to multichannel on Linux (RPi)
« Reply #6 on: March 29, 2025, 02:30:51 pm »

Thanks guys, appreciate your help!

Yah, when I installed pavucontrol, it somehow messed up my pipewire install. So I reverted back and now pipewire is working as per screen shot below.

I have checked ASR and the mk5 should be working, but for now, I installed the DAC8xPro HiFiBerry Hat and indeed JRiver outputs multichannel with these three profiles.

But if I set JRiver to use pipewire ALSA, still says 2 channels. I am pretty sure that this is some sort of pipewire config issue that I need to sort out. The reason I want to do it this way is I want to intercept the stream to add some processing. But this is not a JRiver issue as it works fine directly to the DAC. So issue resolved for JRiver MCH output. Thanks again.

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5280
  • "Linux Merit Badge" Recipient
Re: How to multichannel on Linux (RPi)
« Reply #7 on: Yesterday at 10:27:14 am »

Mitch, I don't have first hand knowledge on bending pipewire to route multichannel correctly, but in my research notes I found this link:

https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Virtual-Devices#virtual-sinks

It talks about how to create a pipewire virtual device (a sink) that addresses a specific subset of the channels on a pro audio sound device, and would probably let you specify a 5.1 channel sink.  The examples are for splitting a multichannel device into multiple stereo sinks, but the same format and syntax should work for configuring a larger number of channels as an addressable virtual device. 

Happy hunting!
Logged
Pages: [1]   Go Up