5.1 sound over HDMI as PCM? (S912)

I’ve recently stepped up to CoreElec on a S912 after struggling with audio on a Fire TV (won’t passthrough some formats) and AndroidTV on the S912 box (ATVxperience - restricted to 2.0 even over HDMI)

With CoreElec (9.0.1) if I try to play something with 5.1 AAC it is decoded to PCM and sent as 7.1 over HDMI - with 2 silent channels. My 7.1 receiver therefore just drops out the two rear speakers (I’d expect it to use its processing to create something to go there). Presumably even a 5.1 receiver would also have problems as it would mix the silence back in to the surround speakers and end up playing surround at reduced volume, so I’d imagine this affects everyone playing 5.1 AAC with a surround setup.

My current workaround is to set Kodi to 2.0 and use transcoding. This isn’t ideal as it means I need to manually change back to 7.1 if I want to play something that actually has 7.1 AAC (luckily most of my 7.1 stuff has a passthrough-able codec)

I gather this is because current amlogic software only allows either 2 or 8 audio sinks to be opened.

The OSMC guys had a similar issue and appear to have solved it by opening 8 sinks but sending an HDMI message to the AVR to ignore the extra two channels: https://discourse.osmc.tv/t/testing-improved-lpcm-output-for-vero-4k/70867

Presumably that code isn’t in CoreElec? If it is, is there any way to turn it on?

Or is there any way to persuade Kodi to pass through AAC? (my receiver at least can handle it, though I gather it was removed as most receivers can’t)

Or are there any other workarounds? Presumably this is affecting a lot of people (perhaps without them knowing)

Does anyone know if this is fixed in mainline?

thanks for any help!

The box I’m running CoreElec on (and having 5.1PCM output as 7.1 with two silent channels) is an S912 (H96 Pro). It used to run AndroidTV (atvxperience) and before that Android.

The Fire TV is an entirely separate device running Amazon’s OS with its own issues; I’m not after any help with that - I gather Amazon has deliberately chosen not to pass through certain codecs.

I’m hoping with the S912 that in the future mainline will allow 6 audio sinks to be set up (rather than the current 2/8 restriction) - but the OSMC approach seems interesting, though I presume that code isn’t in CoreElec. In the meantime I’m transcoding, and changing audio setup to 7.1 (if I remember!) when playing 7.1 AAC sources.

(edited OP to make it a bit clearer, sorry for causing confusion!)

What happens in transcoding to Dolby? Does it neglect the 2 back channels or does it mix them in the surround?

As far as I can tell, with a 5.1 source transcoding works fine (though presumably the quality declines slightly). With a 7.1 source I don’t know if it mixes channels together to create a 5.1 output or just drops two.

The real issue is for anyone playing 5.1 as PCM (over HDMI), where the two silent channels will result in unused speakers (in a 7.1 system) or potentially reduced surround volume (in a 5.1 one)

Is it safe for me to presume you have another audio device with an HDMI port connected to the HDMI port on the S912 TV Box and the output of the audio device connected to speakers? If so, may I know the brand/model of the audio device?

The S912 box connects to an AVR - the Denon X4500H. I gather that the issue though is with the amlogic code that only allows 2 or 8 audio sinks - so when Kodi tries to open 6 for 5.1 it ends up with 8, and 2 silent channels. The OSMC guys apparently worked around this by sending HDMI messages to tell the AVR to ignore the extra two channels.

I’m surprised I haven’t seen more about this issue, as I’d assume it will affect anyone playing 5.1 AAC content over HDMI - they’ll either get two silent speakers (if they have 7.1) or quiet surround (if they have 5.1)

I used to see this in my AVR as 3/4/.1 but I thought it is mistaken and Kodi is correct. Now that you have told me I feel that transcoding is the best way to go for now as most aac bit rates are lower than Dolby anyway so it is not going to affect the sound quality too much but having half the volume in surround channels is a much bigger issue.

Hello all,

of course this is one and a half years old, but I have still this issue with my WetekHub running current CoreElec 9.2.5.
Has a solution to this problem been considered in the meantime or is there any hope that this workaround

will be implemented?