RPI3 + HifiBerry / HiFiDigi passtrought 5.1 ???

  • Hi All!

    I used my RPI 3 (Libreelec 7.0.2) with an HiFiDigi+ SPDIF soundcard which is a HifiBerry replication. I used it with my Samsung HW-F355 2.1 Soundbar.
    It worked perfect. But now i bought a Samsung HW-K550 + Rearkit soundbar, which is an 5.1 sound system.

    I changed my audio settings in kodi to 5.1, 5.1 passtrough, and etc. But it didn't work right. I downloaded some 5.1 channel test video, and i always hear the same. When i must hear just the front right, i hear front and rear right, when i must hear the front left i hear front and rear left... and when i must hear subwoffer in the channel test... there isn't any sound....:(

    Is someone who tell me what could i do to wokrking the 5.1 with HifiBerry? Or am i misunderstanding, and HifiBerry doesn't have ability to 5.1 sound, or 5.1 passtrough??

    A cheked another option: RPI3 (Soundcard HDMI 5.1)--> HDMI cable-- > Samsung HW-K550 --> HDMI cable (ARC) - Samsung TV
    But it was the same, i didn't get any true 5.1 sound, when i play the channel test videos.

    In SSH i get this:
    LibreELEC (official) Version: 7.0.2
    TOTI-RPI:~ # speaker-test -D plughw:0,0 -c2

    speaker-test 1.1.1

    Playback device is plughw:0,0
    Stream parameters are 48000Hz, S16_LE, 2 channels
    Using 16 octaves of pink noise
    Rate set to 48000Hz (requested 48000Hz)
    Buffer size range from 16 to 131072
    Period size range from 8 to 65536
    Using max buffer size 131072
    Periods = 4
    was set period_size = 32768
    was set buffer_size = 131072
    0 - Front Left
    1 - Front Right
    Time per period = 2.757435

    TOTI-RPI:~ # speaker-test -D plughw:0,0 -c6

    speaker-test 1.1.1

    Playback device is plughw:0,0
    Stream parameters are 48000Hz, S16_LE, 6 channels
    Using 16 octaves of pink noise
    Rate set to 48000Hz (requested 48000Hz)
    Buffer size range from 16 to 131072
    Period size range from 8 to 65536
    Using max buffer size 131072
    Periods = 4
    Unable to set hw params for playback: Invalid argument
    Setting of hwparams failed: Invalid argument
    TOTI-RPI:~ # aplay -L
    null
    Discard all samples (playback) or generate zero samples (capture)
    default:CARD=sndrpihifiberry
    snd_rpi_hifiberry_digi,
    Default Audio Device
    sysdefault:CARD=sndrpihifiberry
    snd_rpi_hifiberry_digi,
    Default Audio Device

    Is someone have some ide, what could i do?

    Thanks Best Regards.....


  • I changed my audio settings in kodi to 5.1, 5.1 passtrough, and etc. But it didn't work right. I downloaded some 5.1 channel test video, and i always hear the same.

    Don't do that. Number of channels *must* be set to 2.0 when using spdif/toslink.
    Number of channles is only used for multichannel PCM, which is a HDMI feature.
    Passthrough will still work with number of channels set to 2.0.

  • Don't do that. Number of channels *must* be set to 2.0 when using spdif/toslink.
    Number of channles is only used for multichannel PCM, which is a HDMI feature.
    Passthrough will still work with number of channels set to 2.0.

    Thanks for your answer. Now i realise, my downloaded video was Dolby Digital Plus, and my soundbar is only working with Dolby Digital.
    So if i set RPI3 --> HDMI (5.1, passtrough, ac3 /Dolbi Digital/) --> Soundbar --> TV and i downloaded free soround music from this site: Free surround music download - 5.1 Dolby Digital "5.1 Surround Test File" and i hear the channels sound in the right places. Front Left --> Font Left.. etc. So the HDMI 5.1 is working now. DONE.

    But the spdif... So i missed some details in my first post. In my Libreelec / Kodi settings i couldn't set the channel numbers when is use spdif (HifiDigi+).
    I could set if i want to passtrough or not. So is that you said is meaning, i can't passtrough 5.1 channel sound in spdif ?? Or i still don't understand, the whole things? Because i hear the sound with this version: (Sound connection): RPI3 --> Spdif(HifDigi+, passtrough, without ace3 /if i set this option, there is no sound/) --> Soundbar, (Video connection): RPI3 --> HDMI --> TV . But this version i just hear 2.0 sound on my 6 speaker.

    Spdif = 2.0 ?

  • What is the hifiberry purpose in your system?
    You can send 5.1 digital audio through HDMI cable: RPI3 -> HDMI -> soundbar -> HDMI -> tv.
    With this setup you can get also multichannel and HD audio, not only DD and DTS.

  • I suspect you have the PiFi Digi+(blue pcb with an infrared sensor)? I have it too and it took a while before I had it working.
    I remember I had to put some lines in the RPI3 config file under bootloader configuration:
    dtoverlay=pi3-disable-bt
    dtparam=audio=off
    dtoverlay=hifiberry-digi
    dtoverlay=lirc-rpi,gpio_in_pin=26
    dtdebug=0

    not sure if this is all still needed or even what it does but it worked for me.
    The gpio and bluetooth ones are for the infrared to work I believe.

  • Hello Allarick,

    Leon Buitendam from Holland has suggested the following configuration for the RPi2 and PiFi DAC 2.0 :

    mount /flash -o remount,rw
    nano /storage/.config/modules-load.d/hifiberry.conf
    snd_soc_bcm2708_i2s
    bcm2708_dmaengine
    snd_soc_wm8804
    snd_soc_hifiberry_dacplus
    nano /storage/.config/modprobe.d/disable-lirc.conf
    blacklist lirc_rpi
    nano /flash/config.txt
    dtoverlay=hifiberry-dacplus
    dtdebug=1
    sync
    reboot

    Your advice is kindly sought if this would also work well for the above setup.
    Thank you.