How to bitstream / passthrough 5.1 audio via HDMI?

Post fully complete "how to" guides and tutorials here. This is a great place to get feedback on stuff you might put in the wiki.

Moderators: MattKingUSA, khz

Post Reply
limuda
Posts: 1
Joined: Tue Jan 28, 2025 12:42 pm

How to bitstream / passthrough 5.1 audio via HDMI?

Post by limuda »

Hi everybody, I'm new here. This forum has been recommended to me on the openSUSE forum when I asked this exact question there. I hope I'm in the correct category here and that somebody will be able to help me.

I’m looking for a way to pass through 5.1 audio from an openSUSE Aeon computer to a Denon AV receiver via HDMI. The audio signal (be it stereo, Dolby Digital, or DTS) is supposed to not be decoded on the computer, but sent unchanged to the receiver - the receiver should then show the format it has recognised (i.e. stereo, Dolby Digital, or DTS) and do the decoding.

What happens right now, though, is that the signal is decoded on the computer and sent as (I’m guessing) PCM streams to the receiver, which shows “Multi In” (I had to first go to Gnome Settings > Sound > Output Device and change from the Stereo device to the 5.1 device to get that to work).

I have spent a fair bit of time on search engines and various forums, looking for an answer. But I don't see a consistent solution. And this seems to affect near-all Linux distros. All advice I found was to tinker with alsa, pulseaudio, pipewire, mpv, or vlc. Plus I read warnings about forward compatibility as well as breaking audio entirely. I would like to avoid that. :lol:

The Aeon system I’m trying this with currently, used to be a Windows 11 machine, and I remember from there that the desired behaviour only appeared after installing original AMD chipset and graphics drivers. Do I maybe need additional packages for this to work?

When starting out, I really thought it would just be about changing some setting or ticking the right box. In fact, I expected bitstream to be the standard behaviour, like on Windows (not that I'm tempted to go back there...).

Thanks for reading until here. I would be really helpful for any pointers.

User avatar
Impostor
Established Member
Posts: 1736
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 173 times
Been thanked: 489 times

Re: How to bitstream / passthrough 5.1 audio via HDMI?

Post by Impostor »

Disable ucm? How to do that depends on your audio server and/or version.

For example, pipewire with wireplumber v .5.7:
https://pipewire.pages.freedesktop.org/ ... properties

edit: I think I may have misunderstood your issue. This may be more relevant:
https://gitlab.freedesktop.org/pipewire ... nk-formats

User avatar
Linuxmusician01
Established Member
Posts: 1702
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 930 times
Been thanked: 176 times

Re: How to bitstream / passthrough 5.1 audio via HDMI?

Post by Linuxmusician01 »

I've been wanting to do this for a long time too. Did some testing today. Hold on to your hats, this is going to be confusing. :mrgreen:

tl;dr Use Kodi. :)

1. My very humble setup
I have a PC with HDMI out and a "surround" receiver capable of decoding Dolby Digital and DTS (dunno 'bout the newer formats, probably not). Been using it for ages w/ a Raspberry Pi w/ Kodi Media Center software and later Xbox One + Kodi. Works just fine with movies and surround sound.

However, that HDMI-out from my PC should work too. In the past, when my PC did not have HDMI yet, I used a soundcard w/ an S/PDif (Sony/Philips Digital Interface) output for that. Always with Kodi in pass through mode. But s/pdif is compressed and does not support pass through of multichannel uncompressed PCM (which must be just as good as Dolby or DTS pass thru as far as I know). My mediacenter software (Kodi) decodes the audio (should be lossless) to 5 PCM channels and sends a digital audio steam of the multiple PCM channels (should be lossless) to my amplifier. The amplifier converts the 5 digital streams to 5 analog streams for my 5 speakers (DAC).

2. To sound server or not to?
Anyway, I disabled the sound servers JackAudio and PulseAudio (PA). Especially PulseAudio since it plays stereo over 4 speakers. That is: you get each channel twice! And gone is your stereo spectrum. WHAT a piece of utter shite PA is! Unbelievable how amateurish! Dunno how PipeWire (PW) handles this.

So to test I used bare ALSA.

3. The test file(s) and players
I have a 5.1 FLAC audio file for Queen's "A Night At The Opera". But with VLC player I couldn't get that to play multichnnel: it would get down mixed to stereo or wouldn't play at al. With Audacity (or other software? I forgot) I converted the 5.1 FLAC files to a AC3 (= Dolby Digital, that old fashioned compressed 5.1 format) copy. That would pay w/ VLC.

Then I used Kodi mediacenter (it's in every distro's repo and available for Windows and Xbox (!) too). You must configure audio twice (!) in so-called "expert mode". You must choose your audio device (i.e. the HDMI port of your PC) once for audio in general en when you scroll down you can choose "Pass through". Under 'Pass through' you must choose the HDMI port of your PC for the second time (!!) . And you must choose what audio formats to pass tru and what to decode (to multichannel) uncompressed PCM.

So to play multi-chanel audio you need to pick your file format and player wisely!

HDMI and Kodi
Beware. HDMI sends all kinds of info on what is on the other end of the HDMI cable. This means that in Kodi my HDMI port was named different from ALSA. Kodi could "see" that I have a Sony amplifier so it called it "Sony HDMI" or something.

And lo and behold, that 5.1 FLAC file as well as the AC3 file would play multichannel. I could hear Queen sing "I think you should" at approx 2 minutes in 'Death On Two Legs' on the left rear speaker (when Queen asked "Do you feel like suicide?"). When I used PulseAudio I could hear that the stereo channel was played back through the rear speakers. So I could hear 4 speakers (or five, don't remember) but it was NOT 5.1 sound.

Lessons learned
Pfffff. What a lot of hassle. Lesson learned: disable sound servers like Pulse (ESPECIALLY Pulse) and Jack and use bare ALSA.

I may or may not use PipeWire in the future. But it'll be al ot of hassle to determine if that will pass through digital audio or if it decodes or spreads the 2 stereo channels over 5 speakers.

Another tip: if you have the Immersion Box Set of Pink Floyd's 'Dark Side Of The Moon' then you can use the beginning of "Money" to test multi channel. All four samples (the coins etc.) should play on their own speaker. The samples should "walk around your room".

P.S. HDMI hubs are not your friend! :wink:

Post Reply