INTERACT FORUM

Please login or register.

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

Author Topic: Raspberry Pi 5 hardware for music server  (Read 1855 times)

geoff2802

  • Recent member
  • *
  • Posts: 12
Raspberry Pi 5 hardware for music server
« on: March 15, 2024, 10:19:57 pm »

Hi all,
New to this forum.  I'm planning to set up a multi-channel music server using a Pi 5.  My existing setup is 7.1 with an AV processor supporting DTS HD-MA, Dolby TrueHD, PCM and other formats.  This provides DSP eg for room correction. 

Requirements:
1. Stream FLAC files stored on USB hard drive connected to my network router (already using this to stream 2 channel content to Sonos).
2. Audio channels: Up to 8.
3. Audio resolution of source files: Up to 24-bit at 96kHz.
4. Pass music to AV processor using HDMI.

Intended hardware is Pi 5 8GB running Bookworm O/S.

Questions...
- Is anyone using a Pi 5 (or earlier Pi) to stream 8 audio channel in a similar setup?  Any issues? 
- What is the easiest installation process now? I have some limited Linux experience on Red Hat.
- I saw some earlier discussion regarding limitations in an audio driver (ALSA?).  Is this still an issue for my use case? 

Appreciate any input.
Cheers, Geoff.
Logged

geoff2802

  • Recent member
  • *
  • Posts: 12
Re: Raspberry Pi 5 hardware for multi-channel music server
« Reply #1 on: March 17, 2024, 06:37:54 pm »

Hi again,

I see that the audio set up in Bookworm is different to the prior O/S:
"For this release, PulseAudio has been replaced with the newer PipeWire audio system. This builds on the features offered by PulseAudio, most importantly in providing better support for audio accompanying video. It reduces latency, which is important in many applications. It manages Bluetooth audio devices better, remembering which ones were in use at power-down, and automatically reconnecting them at boot. Finally, it is designed to operate better in the more secure Wayland environment, where applications are isolated from each other."
Source: https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/

Would this be relevant to running MC32 on Pi 5? 

Cheers, Geoff.
Logged

geoff2802

  • Recent member
  • *
  • Posts: 12
Re: Raspberry Pi 5 hardware for music server
« Reply #2 on: March 17, 2024, 06:53:45 pm »

Re: Channel count...  I found this update to Rasp Pi linux that apparently increased number of channels for PCM to 8 and updated channel mapping way back in 2015:
https://github.com/raspberrypi/linux/pull/1166
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7787
  • Autumn shade...
Re: Raspberry Pi 5 hardware for music server
« Reply #3 on: March 18, 2024, 05:37:01 am »

Would this be relevant to running MC32 on Pi 5?

No, PipeWire doesn't really make any difference. If you care about bit-perfect audio output you should avoid PulseAudio (and PipeWire) as they go through the system mixer and use one of the ALSA outputs that bypasses the system mixer (e.g. hw:, front:, etc.). The limitations you speak of were likely regarding PulseAudio, not ALSA.

Only thing about your requirements to keep in mind is if you plan on listening to DSD content, that DSD bitstreaming does not work over HDMI. You'd have to convert it to PCM (which would be very taxing on a relatively weak Pi 5, especially multichannel DSD content) or connect to the AV processor another way (e.g. USB) or avoid that content altogether.

Regarding install, just install Media Center via the installJRMC script, it makes it very easy.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

geoff2802

  • Recent member
  • *
  • Posts: 12
Re: Raspberry Pi 5 hardware for music server
« Reply #4 on: March 18, 2024, 06:24:29 pm »

Thanks Awesome - this is really helpful.

My only DSD content is a handful of SACDs.  I currently don't have any way to rip them so I plan to continue using my Oppo UDP-203 to play them.
I'm after the best possible audio quality and don't plan to use MC to do any DSP as my AV processor provides it.  To bypass PulseAudio / PipeWire do you select ALSA outputs in MC audio options or is there more involved? 
My only experience with MC is with the trial version I installed on my iMac yesterday.  Of course Mac has completely different audio drivers.

Thanks for the install tip.  A friend has a spare Pi 4 lying around so I'll install MC on that to try it out.  Obviously the 4 has a bit less horsepower than the 5 but will give me a good idea of performance and limitations for my use case.  Of course I'll share findings on this forum.

Cheers, Geoff.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7787
  • Autumn shade...
Re: Raspberry Pi 5 hardware for music server
« Reply #5 on: March 18, 2024, 07:01:18 pm »

You select the ALSA inputs that are direct like the hw: and front: outputs on the Pi you're planning on using.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

geoff2802

  • Recent member
  • *
  • Posts: 12
Re: Raspberry Pi 5 hardware for music server
« Reply #6 on: March 20, 2024, 12:09:36 am »

You select the ALSA inputs that are direct like the hw: and front: outputs on the Pi you're planning on using.

I installed Debian 12 and MC32 on a Pi 4.  Attached a hard drive with some multi-channel flac files.  Built library.  All good. 
The default audio driver uses ALSA with Pulse, which always sent 2 channels to the AV processor.
 I chose another audio device that uses ALSA but not Pulse, as suggested.  Now it outputs the same number of channels as the source content.  With 6 channel FLAC source I now get 6 channel PCM out.  All good. Will do some listening. 
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7787
  • Autumn shade...
Re: Raspberry Pi 5 hardware for music server
« Reply #7 on: March 20, 2024, 06:09:42 am »

Indeed, if you use the Pulse output, it goes through the system mixer. Choosing one of the hw: or front: outputs it's direct, bypassing the system mixer. Sounds like it's going well so far, happy listening! :)
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

geoff2802

  • Recent member
  • *
  • Posts: 12
Re: Raspberry Pi 5 hardware for music server
« Reply #8 on: March 21, 2024, 07:30:40 pm »

I've tried the direct audio output choices and I get an error in MC when trying to play content.  I tried playing both 6-channel and 2-channel content. 

My MC settings are:
- All boxes unchecked in DSP Studio.
- Volume Disabled.
- PCM Output Format: Auto.

Attachments show selected output and the MC error that is shown when I initiate playback.

I've set my AV Processor to its Direct mode. 

Any idea whether the error is arising from a limitation in the Pi 4 hardware, HDMI cable or my AV processor?  Appreciate any help.

---
BTW, when I select an audio output device that apparently use the mixer (ie *not* one of the hw: or front: ones), I do get audio playback but the channel mappings are wrong eg dialogue comes from the left surround channel instead of the front channels.  I can post photos if that would help.   
Logged

geoff2802

  • Recent member
  • *
  • Posts: 12
Re: Raspberry Pi 5 hardware for music server
« Reply #9 on: March 21, 2024, 07:51:14 pm »


Attached is the list of all available audio output devices in MC. 

When changing between these, I stopped and restarted playback. 
Logged

geoff2802

  • Recent member
  • *
  • Posts: 12
Re: Raspberry Pi 5 hardware for music server
« Reply #10 on: March 23, 2024, 06:00:34 pm »

Hi all,

Any ideas why MC is reporting 32-bit output?  I’ve switched off / disabled every setting that looks like it might use the mixer / DSP. 
Has anyone using MC on Linux found the same behaviour? 
I would like to resolve and purchase licence. 

Cheers, Geoff. 
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7787
  • Autumn shade...
Re: Raspberry Pi 5 hardware for music server
« Reply #11 on: March 23, 2024, 06:07:08 pm »

If you're referring to something like this and the output...



This is normal, as MC pads the bit-depth with zeroes on-the-fly to the max supported bit-depth the output device (DAC, receiver, etc.) reports that it supports. Take a 16-bit or 24-bit file and let's say your DAC/Receiver/etc. supports up to 32-bit, MC detects this and when you play back either type of file it basically just adds zeroes to the header during playback to make it appear to the DAC/Receiver/etc. as a 32-bit file, even though it's still a 16-bit or 24-bit file, if that makes sense. It's done this way for things like DSP and better overall compatibility. Do note it isn't dithering or resampling nor is it actually making any changes to the audio, it's just reporting it as 32-bit to the output, so nothing to worry about there. And before it's asked there's no way to disable the behaviour (it's this way on all platforms) as it's not harmful to the audio in any way.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

geoff2802

  • Recent member
  • *
  • Posts: 12
Re: Raspberry Pi 5 hardware for music server
« Reply #12 on: March 24, 2024, 06:20:55 am »

Thanks for the explanation Awesome - this is appreciated.

I’ve done some digging and the issue seems to be a mismatch between the audio channels in the flac files and ALSA’s channel assignments.  When I use the speaker-test utility the test tones come from the correct speaker., so the Linux side of things seems fine in isolation   When I play a flac file using MC, the channels are not right.  I’m working on a change to the ALSA config to switch the channels around using a pcm route.   
Logged

geoff2802

  • Recent member
  • *
  • Posts: 12
Re: Raspberry Pi 5 hardware for music server
« Reply #13 on: March 26, 2024, 08:27:47 pm »

Returning with some findings...
The symptoms when playing 6-channel FLAC content were as follows:
- No audible output from centre channel.
- Centre channel content appeared to be output to left surround speaker. 
- Sub seemed to be receiving full range signal, not just LFE. 
- No audible output from RS.  Perhaps LFE was being sent to this speaker.

I understand Linux' channel assignments to be:
0 - FL
1 - FR
2 - SL
3 - SR
4 - Centre
5 - LFE
I'm aware that some other O/S's use different channel assignments. 

Question: Does MC on Linux re-route channels in FLAC files when sending to PCM output?  Or does it pass straight-through?

Based on my observations, I re-mapped the channels by configuring an ALSA PCM route as follows:
- Swapped channels 2 and 4.  This should route the signal that was coming from SL to Centre and vice versa. 
- Swapped channels 3 and 5.  This should route the signal that was coming from SR to the Sub. (thinking that LFE signal would be inaudible on my surround speaker).
Results:
-  Still no audio from Centre speaker.  When I listen to the original source disc, I receive clear signal from this speaker.
- Some LFE audible from sub. 
Logged

geoff2802

  • Recent member
  • *
  • Posts: 12
Re: Raspberry Pi 5 hardware for music server
« Reply #14 on: April 08, 2024, 10:47:24 pm »

Bad news:  I couldn’t resolve the issue.
Good news:  I bought a Mac Mini for this purpose. 
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13841
Re: Raspberry Pi 5 hardware for music server
« Reply #15 on: April 12, 2024, 11:03:40 am »

Saw this late but in parametric equalizer 2 you can reorder the channels.
Logged
Pages: [1]   Go Up