PulseAudio network receiving in 5.1 on RPi2

  • Hello,

    I want to use my RPi2 as 5.1 output device on my AV receiver and want to be able to send audio from my Arch Linux computer running PulseAudio in 5.1 to the surround system. The 5.1 output on the RPi seems to be unfinished but with LibreELEC’s applied patches I get full surround sound playing videos with the UI, nice! Now, I want to leverage this hardware support (had no luck with Xubuntu and none with Raspbian) to use the PulseAudio networking feature, good documented in the LibreELEC wiki.

    But here comes the problem: "pactl list short sinks" lists only this:
    0 auto_null module-null-sink.c s16le 2ch 44100Hz RUNNING

    And guess what, it’s really a null device, I checked. ;) So, any way to get the 5.1 output established to PulseAudio? Thank you!

    • Official Post

    So in the same wiki page that you posted you missed the part that we don't load the required modules by default

    Code
    systemctl stop kodi
    pactl load-module module-udev-detect
    systemctl start kodi

    Notice that this will require you to change your audio device in kodi and will also make audio performance suffer.

  • Hey, thank you. But of course did I run the whole chain of commands:

    Code
    LibreELEC:~ # systemctl stop kodi
    LibreELEC:~ # pactl load-module module-udev-detect
    16
    LibreELEC:~ # pactl list short sinks
    0       auto_null       module-null-sink.c      s16le 2ch 44100Hz       SUSPENDED

    Before and after, I can choose between four audio devices in LibreELEC‘s settings: "PI: HDMI", "PI: Analogue", "PI: HDMI and Analogue", "PULSE: Default, Bluetooth Audio (PULSEAUDIO)". It makes no difference what I choose, even before the commands above, "pactl list short sinks" still shows me only "auto_null".

    It seems I‘m not the only one with this problem.

    Edited once, last by frumble (July 17, 2017 at 10:32 PM).

  • Okay, now "pactl list short sinks" lists:

    Code
    1       alsa_output.platform-soc_audio.analog-stereo    module-alsa-card.c      s16le 2ch 44100Hz       RUNNING

    I can play on this from my computer but it‘s just stereo like the name suggests (strangely, it isn’t "analog-stereo", since I get it over HDMI audio). On native Kodi UI though, I can play 5.1 material in 5.1 (no passthrough used, just PCM). So, the 5.1 option is still missing in PulseAudio‘s exposed interfaces.

  • frumble did you enable the 5.1 profile in pulseaudio? I'm not sure if this is possible (don't have rpi handy)

    but something like this

    Code
    pactl list cards

    will show something like

    then do something like

    Code
    pactl set-card-profile 0 output:analog-surround-40

    the "0" being the card number as given by "pactl list cards."

  • Ah, you have to load the modules in config.txt

    Code
    mount -o remount,rw /flash
    nano /flash/config.txt

    paste in at the bottom

    Code
    dtparam=audio=on

    then reboot

    hi, i had the same problem. adding dtparam=audio=on fixed the first problem but now bluetooth is completely disabled and i have to remove this line to reable that puts me on the start of the problem