potuz
Posts: 7
Joined: Sun Jul 23, 2017 10:47 am

RPi and surround sound over HDMI

Sat Nov 10, 2018 11:11 am

I'm having trouble getting 5.1 sound played natively. My setup is a little unorthodox due to the connectors my receiver takes. I have three ways of reproducing audio/video from the rpi (A Raspberry-Pi 2B running gentoo headless without X)
  • omxplayer via HDMI: The RPI HDMI output connects to a Samsung series 5 HDMI input. The TV's audio digital output connects via an optical TosLink cable to the Onkyo TX-SR504 receiver optical input.
  • DLNA via ethernet: The RPI runs Mediatomb and the TV pulls audio/video through the ethernet cable. The TV's audio digital output connects as above.
  • mpd via airport: This is a little trickier, since the HDMI output is already taken, I have an old first generation airport extreme https://en.wikipedia.org/wiki/AirPort_Express connected via ethernet to the network, the optical output of the airport is connected via a an optical TosLink cable to a second optical input of the receiver. I set up pulseaudio to have this as default sink, loaded with

    Code: Select all

    load-module module-raop-sink server=192.168.1.183 sink_name="name" protocol=UDP codec=ALAC
Notice that every connection from the RPI to the receiver is digital.

Every method works in that I can listen to the audio output through the speakers powered via my receiver. However, if I play natively an audio that is encoded with 5.1 sound the audio seems to be downgraded to 2 channels and then processed by the receiver to send to the 6 channels, which is not optimal at all. I can test this by playing a sound file like from here https://archive.org/details/5.1Surround ... 3MP4DTSWAV
And instead of listening to one speaker I hear from several at the same time but different volumes, which is typical from the receiver deciding where to send the output.

What I have tried to far is to have

Code: Select all

#/etc/pulse/daemon.conf
default-sample-channels=6
#/etc/pulse/default.pa
load-module module-combine channels=6 channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe
But this breaks the output from the raop-sink (mpd can't open the audio output) and just does not change anything via HDMI.

I'd appreciate any help in debugging/setting this. I can provide with logs from pulseaudio/mpd/alsa, etc if necessary.

Return to “Graphics, sound and multimedia”