INTERACT FORUM

Please login or register.

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

Author Topic: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files  (Read 5192 times)

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 299

Hi,

Not sure if this should be here or in the PC hardware section.  Wondering if anyone can confirm that their Raspberry PI 4 is playing multi-channel FLAC / DSF files OK with the Linux version of JRiver MC (via HDMI to a receiver)?

I'm thinking of getting the model 4.  Currently using a low spec'ed machine with the windows version and it mostly copes with multi-channel FLAC (6 channel, 24bit, 96kHz)

Current set up is
  • MC (Linux) running as server on VM
  • Media files on NAS
  • MC (windows) as client on multiple PCs
  • multiple DLNA clients - which unfortunately do not do multi-channel FLAC
  • Controlled by JRemote / JRemote2 app on tablet]
Plan to add the PI4 as follows
  • 8GB version
  • MC (Linux) installed running as client
  • wired Ethernet connection
  • HDMI connection to receiver

Appreciate your input,

Steve
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7363
  • The color of Spring...
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #1 on: August 18, 2020, 04:35:17 am »

If you're converting DSD to PCM (which is the only option, since DSD via HDMI from a computer including a Pi isn't possible), then no a Pi 4 VERY likely isn't powerful enough to handle multichannel DSD to PCM conversions on-the-fly.

DSD to PCM conversions, especially multichannel, are one of the most resource (CPU) intensive tasks Media Center can do. Using a Pi for this task is a terrible choice, as even though the Pi 4 is a major improvement over the Pi 3B+, it still isn't powerful enough to handle those type of on-the-fly conversions (and Pis in general likely won't be for at least a few more years). I wouldn't be surprised if the Pi 4 would have lower performance than your current low spec'd Windows machine.
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | Topping D50s DAC | Edifier R2000DB Bookshelf Speakers

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 299
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #2 on: August 18, 2020, 05:50:40 pm »

thanks for the information on DSD conversion.

With regards to the PI4 doing multi-channel, does anyone know if the kernel is coded to handle multi-channel over HDMI?  See https://yabb.jriver.com/interact/index.php/topic,97510.0.html for information for a much earlier attempt at multi-channel using a PI (Model 2B).  @Hilton did an awesome job working out why the Pi Model 2B couldn't do it.

thx,

Steve
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #3 on: August 18, 2020, 08:36:36 pm »

thanks for the information on DSD conversion.

With regards to the PI4 doing multi-channel, does anyone know if the kernel is coded to handle multi-channel over HDMI?  See https://yabb.jriver.com/interact/index.php/topic,97510.0.html for information for a much earlier attempt at multi-channel using a PI (Model 2B).  @Hilton did an awesome job working out why the Pi Model 2B couldn't do it.

thx,

Steve
It is still not there yet. I don't know what the delay is in getting that support into ALSA since supposedly the chip can do it.
Logged

Kimota

  • Recent member
  • *
  • Posts: 22
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #4 on: August 18, 2020, 11:53:17 pm »

Hi,

Not sure if this should be here or in the PC hardware section.  Wondering if anyone can confirm that their Raspberry PI 4 is playing multi-channel FLAC / DSF files OK with the Linux version of JRiver MC (via HDMI to a receiver)?

I'm thinking of getting the model 4.  Currently using a low spec'ed machine with the windows version and it mostly copes with multi-channel FLAC (6 channel, 24bit, 96kHz)

Current set up is
  • MC (Linux) running as server on VM
  • Media files on NAS
  • MC (windows) as client on multiple PCs
  • multiple DLNA clients - which unfortunately do not do multi-channel FLAC
  • Controlled by JRemote / JRemote2 app on tablet]
Plan to add the PI4 as follows
  • 8GB version
  • MC (Linux) installed running as client
  • wired Ethernet connection
  • HDMI connection to receiver

Appreciate your input,

Steve
I have a Pi 4 with 4GB memory running Linux, and I can confirm that it can play back multi-channel DSF and send multi-channel 5.1 Surround PCM over HDMI. It's NOT in native DSD format over HDMI, however. The MC26 converts the bits into PCM before sending it over HDMI. I've also been able to play back DVD-Audio and Blu-ray 5.1 Surround Sound Audio I've ripped from disks ("The Yes Album" and "Fragile"). However, I have NOT tried playing back multi-channel FLAC files.

I just now was listening to these DSF files I ripped from SACD: "Life in the Fast Lane" from the Eagles ("Hotel California") and "Walk Between Raindrops" by Donald Fagen ("The Nightfly"). They have really nice instrument separation that makes the stereo versions sound flat in comparison.

A couple notes on my set up:
  • The Pi 4 is hooked up to a 2TB music file disk directly via USB 3.0
  • The MC26 is acting as the NAS and DLNA server so I can hook other apps (like MC26 I have running on my Mac) up to the Pi 4 server
  • I use JRemote on an iPhone and iPad to control MC26

So, in my opinion, if you have a robust hardwired network, I would guess that the Pi 4 will be able to handle the decoding and playback over HDMI.
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 299
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #5 on: August 20, 2020, 04:22:30 am »

Bob and Kimota - thanks for the updates
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #6 on: August 20, 2020, 09:46:33 am »

I have a Pi 4 with 4GB memory running Linux, and I can confirm that it can play back multi-channel DSF and send multi-channel 5.1 Surround PCM over HDMI. It's NOT in native DSD format over HDMI, however. The MC26 converts the bits into PCM before sending it over HDMI. I've also been able to play back DVD-Audio and Blu-ray 5.1 Surround Sound Audio I've ripped from disks ("The Yes Album" and "Fragile"). However, I have NOT tried playing back multi-channel FLAC files.

I just now was listening to these DSF files I ripped from SACD: "Life in the Fast Lane" from the Eagles ("Hotel California") and "Walk Between Raindrops" by Donald Fagen ("The Nightfly"). They have really nice instrument separation that makes the stereo versions sound flat in comparison.

A couple notes on my set up:
  • The Pi 4 is hooked up to a 2TB music file disk directly via USB 3.0
  • The MC26 is acting as the NAS and DLNA server so I can hook other apps (like MC26 I have running on my Mac) up to the Pi 4 server
  • I use JRemote on an iPhone and iPad to control MC26

So, in my opinion, if you have a robust hardwired network, I would guess that the Pi 4 will be able to handle the decoding and playback over HDMI.
Would you mind running
/usr/lib/jriver/Media\ Center\ 26/alsacap
and posting the output here?
Mine doesn't show more than 2 channel support over HDMI.
Also the kernel version would be nice to know
cat /proc/version

Thanks.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #7 on: August 20, 2020, 10:12:27 am »

Would you mind running
/usr/lib/jriver/Media\ Center\ 26/alsacap
and posting the output here?
Mine doesn't show more than 2 channel support over HDMI.
Also the kernel version would be nice to know
cat /proc/version

Thanks.
Oh hang on, you are still using the Dolby Output encoding, right?
Logged

Kimota

  • Recent member
  • *
  • Posts: 22
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #8 on: August 20, 2020, 10:33:34 am »

Oh hang on, you are still using the Dolby Output encoding, right?
Yes! I'm using the Dolby Digital Surround 5.1 encoding. That was the only way I got it to work. So that makes me think that all the decoding/encoding is being done by the SW engine. It's pretty surprising to me that the Pi 4 has the horsepower to do all that!

Check out the driver option and DSP output setup I used, and let me know what you think is happening to make the multi-channel playback work (see attached images).
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #9 on: August 20, 2020, 11:20:19 am »

You should be able to use the hw: audio output device 2 lines above the one you are using (no conversions) since you are encoding everything to 48k dolby digital anyway but it likely doesn't matter since the plughw one shouldn't be doing any conversions in this case.

I'm using a similar setup to you in the one case where I have to output multichannel out a Optical port and it works fine. I'm doing it on an Intel NUC though (an Id). I've not tried in on a Pi.
What's your cpu load on the Pi when it's doing the conversion to Dolby from the multichannel DSF files?
Logged

Kimota

  • Recent member
  • *
  • Posts: 22
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #10 on: August 20, 2020, 12:53:19 pm »

You should be able to use the hw: audio output device 2 lines above the one you are using (no conversions) since you are encoding everything to 48k dolby digital anyway but it likely doesn't matter since the plughw one shouldn't be doing any conversions in this case.

I'm using a similar setup to you in the one case where I have to output multichannel out a Optical port and it works fine. I'm doing it on an Intel NUC though (an Id). I've not tried in on a Pi.
What's your cpu load on the Pi when it's doing the conversion to Dolby from the multichannel DSF files?
Thanks for the feedback, Bob!

I tried the HW audio device you suggested, but it doesn't give me any playback. It just sits there when I hit the "play" button.

The load on the CPU during playback is around 20% using 355MB of memory out of 4GB decoding a DSF 6-channel file and converting to 5.1 Dolby Digital Surround Sound PCM. See the attached screenshot.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #11 on: August 20, 2020, 01:02:24 pm »

Thanks for the feedback, Bob!

I tried the HW audio device you suggested, but it doesn't give me any playback. It just sits there when I hit the "play" button.

The load on the CPU during playback is around 20% using 355MB of memory out of 4GB decoding a DSF 6-channel file and converting to 5.1 Dolby Digital Surround Sound PCM. See the attached screenshot.
Thanks for the reply,
I'm going to try that setup here... I'm really interested why the hw: device didn't work.
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 299
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #12 on: February 13, 2021, 06:50:31 am »

performed an adhoc search for kernel updates for the Pi and the ability for it to handle multi-channel via HDMI and looks like it may have been addressed on the Model 3B & perhaps the Model 4
 
Posts from DIYaudio on multichannel via HDMI

& from github

Will pull out my old model 3B, update it and report back.  Have purchased a Model 4.  Will work out how to update the kernel to raspberrypi:rpi-5.9.y and test there too.

Given my lack of skill in this area - it'd be great if others would also review


thanks,

Steve
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 299
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #13 on: February 14, 2021, 08:21:53 pm »

Found the model 3B.  updated it, updated the kernel to Linux raspberrypi 5.10.14-v7+

It is able to do multichannel audio over HDMI - 16bit 48000hz. 
  • some crackling on rear channels.
  • think channel mapping is wrong

updated .asoundrc with entry to correct channel mapping.  Test file is now OK, but cannot play MC to that device

Will upgrade PI to MC 27, test and post on the v27 board.  Have not started testing with the model 4 yet

regards,

Steve
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #14 on: February 15, 2021, 09:22:14 am »

Found the model 3B.  updated it, updated the kernel to Linux raspberrypi 5.10.14-v7+

It is able to do multichannel audio over HDMI - 16bit 48000hz. 
  • some crackling on rear channels.
  • think channel mapping is wrong

updated .asoundrc with entry to correct channel mapping.  Test file is now OK, but cannot play MC to that device

Will upgrade PI to MC 27, test and post on the v27 board.  Have not started testing with the model 4 yet

regards,

Steve
Can't play to the hdmi: device??
Run /usr/lib/jriver/Media\ Center\ 27/alsacap and post the results here please.
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 299
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #15 on: February 16, 2021, 03:34:10 pm »

Hi Bob,

MC can play to the HDMI device, but not the virtual device I created.  I believe the .asoundrc entries I created are incorrect (1st time playing with ALSA).  Channel mapping appears to be correct though (issuing command speaker-test -Dplug:lpcm6ch -c6 -twav)

The PI Model B is still running MC v22.  I'll upgrade, reattempt entries in .asoundrc and post back in a couple of days

Can you suggest a source for test files?  looking for 5.1 in 16bit and 24bit  at rates 48000hz, 96000hz and 192000hz.  If I can get 16bit working OK, then I'll update the kernel and attempt 24bit

aplay and alsacap results

Code: [Select]
pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
pi@raspberrypi:~ $ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
lpcm6ch
sysdefault:CARD=b1
    bcm2835 HDMI 1, bcm2835 HDMI 1
    Default Audio Device
dmix:CARD=b1,DEV=0
    bcm2835 HDMI 1, bcm2835 HDMI 1
    Direct sample mixing device
dsnoop:CARD=b1,DEV=0
    bcm2835 HDMI 1, bcm2835 HDMI 1
    Direct sample snooping device
hw:CARD=b1,DEV=0
    bcm2835 HDMI 1, bcm2835 HDMI 1
    Direct hardware device without any conversions
plughw:CARD=b1,DEV=0
    bcm2835 HDMI 1, bcm2835 HDMI 1
    Hardware device with all software conversions
sysdefault:CARD=Headphones
    bcm2835 Headphones, bcm2835 Headphones
    Default Audio Device
dmix:CARD=Headphones,DEV=0
    bcm2835 Headphones, bcm2835 Headphones
    Direct sample mixing device
dsnoop:CARD=Headphones,DEV=0
    bcm2835 Headphones, bcm2835 Headphones
    Direct sample snooping device
hw:CARD=Headphones,DEV=0
    bcm2835 Headphones, bcm2835 Headphones
    Direct hardware device without any conversions
plughw:CARD=Headphones,DEV=0
    bcm2835 Headphones, bcm2835 Headphones
    Hardware device with all software conversions
pi@raspberrypi:~ $ /usr/lib/jriver/Media\ Center\ 22/alsacap
*** Scanning for playback devices ***
Card 0, ID `b1', name `bcm2835 HDMI 1'
  Device 0, ID `bcm2835 HDMI 1', name `bcm2835 HDMI 1', 4 subdevices (4 available)
    1..8 channels, sampling rates 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000 Hz
    Sample formats: U8, S16_LE
      Subdevice 0, name `subdevice #0'
      Subdevice 1, name `subdevice #1'
      Subdevice 2, name `subdevice #2'
      Subdevice 3, name `subdevice #3'
Card 1, ID `Headphones', name `bcm2835 Headphones'
  Device 0, ID `bcm2835 Headphones', name `bcm2835 Headphones', 4 subdevices (4 available)
    1..8 channels, sampling rates 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000 Hz
    Sample formats: U8, S16_LE
      Subdevice 0, name `subdevice #0'
      Subdevice 1, name `subdevice #1'
      Subdevice 2, name `subdevice #2'
      Subdevice 3, name `subdevice #3'
pi@raspberrypi:~ $


.asoundrc entries
Code: [Select]
pi@raspberrypi:~ $ cat .asoundrc
pcm.!default {
        type hw
        card 0
}

pcm_slave.sl3 {
        pcm "hw:0,0"
        format S16_LE
        channels 6
        rate 48000
}

pcm.lpcm6ch {
        type plug
        slave sl3
        ttable.0.0 1
        ttable.1.1 1
        ttable.2.4 1
        ttable.3.5 1
        ttable.4.3 1
        ttable.5.2 1
}

ctl.!default {
        type hw
        card 0
}
pi@raspberrypi:~ $

thanks,

Steve
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #16 on: February 16, 2021, 04:26:28 pm »

https://www.jensign.com/bdp95/7dot1voiced/index.html

Just 48k but you could resample them in MC's conversion routine.

BTW, no matter what you should be able to enable the dolby encoder in MC. I use that out the Optical port on my Id but it works on HDMI too.
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 299
Re: Raspberry Pi4 8GB - does it handle multi-channel FLAC / DSF files
« Reply #17 on: February 16, 2021, 10:43:25 pm »

thx Bob
Logged
Pages: [1]   Go Up