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
Established Member
Posts: 6
Joined: Tue Jan 28, 2025 12:42 pm
Been thanked: 1 time

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: 1747
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 174 times
Been thanked: 495 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: 1725
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 960 times
Been thanked: 180 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 sound-card 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 multichannel: it would get down mixed to stereo or wouldn't play at al. I converted the 5.1 FLAC files to AC3 (= Dolby Digital, that old fashioned compressed 5.1 format). 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:

Last edited by Linuxmusician01 on Thu Feb 20, 2025 12:03 pm, edited 4 times in total.
User avatar
Linuxmusician01
Established Member
Posts: 1725
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 960 times
Been thanked: 180 times

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

Post by Linuxmusician01 »

medarda wrote: Thu Feb 20, 2025 4:09 am

Hi Limuda,
Have you checked if passthrough is enabled in PipeWire or PulseAudio settings, and do you see an option to allow exclusive control over the audio device?

I can't find an option in pavucontrol to enable pass through. And doesn't one enable pass through in one's audio applcation, e.g. Kodi, VLC, etc.?

limuda
Established Member
Posts: 6
Joined: Tue Jan 28, 2025 12:42 pm
Been thanked: 1 time

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

Post by limuda »

@Linuxmusician01 Thanks for the extensive report! Unfortunately, your experience kind of confirms my worry that payoff is not really worth the effort and risk - in my case. 5.1 seems to work fine for me. I would have liked passthrough to be able to verify the correct codec arrives at the receiver, but that's mostly a bonus, a cherry on top.

Having said that, I will definitely check out the Kodi settings you mentioned. Maybe that will lead me somewhere. Still, the main requirement is for Netflix to work via Firefox.

Linuxmusician01 wrote: Thu Feb 20, 2025 11:58 am

doesn't one enable pass through in one's audio applcation, e.g. Kodi, VLC, etc.?

Me personally, I would like this to be a system-wide setting. Receivers are built specifically to decode codecs and play them properly on the appropriate speakers. Why would one then meddle with application-specific settings that might lead to complications if one already has a device that's literally built to do this job? Or how do you see this?

Again, thanks for taking the time to dig into this!

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

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

Post by Linuxmusician01 »

limuda wrote: Mon Feb 24, 2025 2:55 pm

@Linuxmusician01 Thanks for the extensive report! Unfortunately, your experience kind of confirms my worry that payoff is not really worth the effort and risk - in my case. 5.1 seems to work fine for me. I would have liked passthrough to be able to verify the correct codec arrives at the receiver, but that's mostly a bonus, a cherry on top.

Having said that, I will definitely check out the Kodi settings you mentioned. Maybe that will lead me somewhere. Still, the main requirement is for Netflix to work via Firefox.

Does Netflix broadcast in 5.1 Dolby Digital? Some channels broadcast in Dolby Surround (a 2nd rate multi-channel audio version) which is encoded in the stereo signal. Only Netflix themselves can tell you if they really broadcast in Dolby Digital (or something like that). And if they support that via any browser...

limuda wrote: Mon Feb 24, 2025 2:55 pm
Linuxmusician01 wrote: Thu Feb 20, 2025 11:58 am

doesn't one enable pass through in one's audio applcation, e.g. Kodi, VLC, etc.?

Me personally, I would like this to be a system-wide setting. Receivers are built specifically to decode codecs and play them properly on the appropriate speakers. Why would one then meddle with application-specific settings that might lead to complications if one already has a device that's literally built to do this job? Or how do you see this?

Again, thanks for taking the time to dig into this!

Well... One should use only one application for audio/video playback: preferably Kodi. No VLC or other media players like that. Kodi has a plugin for Netflix (link). You can use a computer as a Media Center for movies and music.

P.S. Most internet browsers do not have audio settings available. They are hard coded to use PulseAudio (and probably PipeWire nowadays). They are not multimedia playback applications even though a lot of people and broadcasters (like Netflix) use 'm a such. People seem to have forgotten about the Dolby Digital multi-channel audio crazy on DVD of the early 2000's. For the full multi-channel audio experience one should still use Blu-Ray's or files on a PC I'm afraid.

P.S.2 The same goes, more or less, for Windows of course. :wink:

limuda
Established Member
Posts: 6
Joined: Tue Jan 28, 2025 12:42 pm
Been thanked: 1 time

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

Post by limuda »

Does Netflix broadcast in 5.1 Dolby Digital?

Yes, they do. There's a pretty good Firefox plugin called Netflux (https://addons.mozilla.org/en-US/firefo ... ent=search) that allows you to play the maximum quality that Netflix offers (even on Linux, which is normally restricted to 720p and stereo, I believe). It works really well. Using this setup on a Windows machine, I can confirm that Dolby Digital 5.1 arrives correctly at my Denon receiver.

Kodi has a plugin for Netflix

That plugin unfortunately is broken, according to the GitHub page (https://github.com/CastagnaIT/plugin.video.netflix), which actually is one of the reasons I ended up posting here on this forum :) :

DUE TO CHANGES TO THE WEBSITE THAT PREVENT THE PROPER PLAYBACK OF VIDEOS, THE DEVELOPMENT OF THE ADD-ON HAS BEEN SUSPENDED. THE VIDEO PLAYBACK, WHEN IT WORKS, IS LIMITED TO SD QUALITY AND ONLY ON SOME LINUX/ANDROID DEVICES.

You can use a computer as a Media Center for movies and music.

Yes! That's what I'm doing! Just trying to iron out the kinks...

Most internet browsers do not have audio settings available. They are hard coded to use PulseAudio (and probably PipeWire nowadays).

That's one of the reasons I believe a system-wide solution to audio passthrough would be the better solution than manipulating various apps separately.

For the full multi-channel audio experience one should still use Blu-Ray's or files on a PC I'm afraid.

I disagree. Using Kodi, Jellyfin, Netflix on Firefox, etc. all work flawlessly to deliver 5.1 audio. In fact, I am getting 5.1 audio even now. It's just that it's 6 separate PCM streams, and I would prefer the stream to be untouched to be decoded by my receiver. But still, 5.1 audio - with all 5.1 codecs - work well from my experience.

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

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

Post by Linuxmusician01 »

@limuda: Thank you for the post above from which I learned a lot. :)

I didn't know that there's a Firefox Netflix plugin (thanks for the tip). I don't have Netflix so I can't test it. I don't know how it works on Windows but I'm pretty sure that Firefox uses PulseAudio which is an utter piece 'o crap when it comes down to multichannel audio (it copies the stereo signal to the rear speakers). I don't have a system w/ PipeWire yet so I don't know if FF uses that nowadays. But if it does, I think one still needs to set pass-tru on in FF itself. I agree w/ you that that should be possible system-wide (again: in Windows this is also a problem).

I didn't know that the Netflix plugin in Kodi is broken, ha ha. :oops: Sorry man. Useless tip from me. Netflix is closed software/codec so we may run into that every few years when they update their technology.

Maybe a PW user here knows if a PW configure tool supports setting pass through on system-wide.

I'd like my receiver to decode the audio stream rather than the software on my PC too. when I use Kodi then the dig. audio is neatly passed through to my receiver and I can see what codec is used on my receiver. However, for me personally it's not a deal breaker if the PC sends 6 digital (high quality) PCM streams. I think the only problem is Netflix on Linux at the moment.

limuda
Established Member
Posts: 6
Joined: Tue Jan 28, 2025 12:42 pm
Been thanked: 1 time

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

Post by limuda »

@Linuxmusician01 I think together we have learnt a lot despite not having solved the problem at hand. :lol:

My system is a pipewire system (OpenSUSE Aeon, which is based on OpenSUSE Tumbleweed). But the concept of that system is to be immutable. You're not really supposed to manipulate anything, it aims to be a "Just Works Machine", which is exactly what I wanted for my home theatre pc. Tumbleweed would be the tinkering counterpart - but my Tumbleweed system is my work machine, which I really do not want to break. And also, like you, having 6 PCM streams is not the end of the world. So all in all, I'll leave things the way they are right now.

Unless some other user can shed some light on pipewire or other aspects of all this?

limuda
Established Member
Posts: 6
Joined: Tue Jan 28, 2025 12:42 pm
Been thanked: 1 time

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

Post by limuda »

@Linuxmusician01 A little update: I tried your Kodi settings in two spots to enable passthrough, but can't get it to work. The moment I switch Kodi from the default setting (Alsa Pulseaudio - which in my case is actually pipewire in the background) to HDMI 2, audio stops entirely. The audio passthrough toggle further down doesn't have any effect.
EDIT: turns out, audio stopped because it was the wrong HDMI port after all. See more info in my next post.

One good thing is that I found the setting to switch Kodi from 2.0 to 5.1 (under "Number of channels"). So my Jellyfin-provided 5.1 files now finally also work properly in Kodi - still as decoded PCM streams, but that's good enough.

Last edited by limuda on Thu Mar 06, 2025 12:10 am, edited 1 time in total.
limuda
Established Member
Posts: 6
Joined: Tue Jan 28, 2025 12:42 pm
Been thanked: 1 time

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

Post by limuda »

Another update: I managed to get passthrough to work in Kodi, but that breaks multichannel output from Firefox (which I need for Netflix). So I can't use that approach.

Here's how I got Kodi to work:

  • go to Gnome sound settings and choose the analog output > this frees the HDMI port to be used by Kodi
  • in Kodi, choose the now available HDMI port as the output device, enable passthrough, and select the same HDMI port for passthrough.
  • Kodi is golden.
  • Unfortunately, now Firefox is stuck with the analog out. So I undid everything again.

Interesting tidbit: there's a pavucontrol flatpak, which means I can use it nicely on my immutable OpenSUSE Aeon system. Unfortunately, it did not help me solve the problem.

An interesting page with lots of Kodi-specific passthrough and multichannel info: https://kodi.wiki/view/PulseAudio

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

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

Post by Linuxmusician01 »

@limuda Thanks for the link to the Kodi Wiki about PulseAudio. And yes: I forgot to mention that I've set my setup to "5.1" in Kodi's settings. Have fun listening to multichannel audio! :)

Post Reply