Playing AAC-HE & AAC-LC 5.1 surround sound

Hi All,

I’ve tried playing some files which contain AAC-HE and AAC-LC multichannel audio over HDMI, but only left and right channels can be heard. Centre, surround and subwoofer remain silent. Is this a hardware limitation of ATV, lack of driver capability, or is it a Kodi setting I haven’t found yet?

How have you configured your audio channels? Are they set to 5.1? It could also be an EDID issue. Have you tried booting the ATV with the TV switched on? I have no experience with ATV but maybe there is a way to show the EDIDyour display/AVR is reporting. Another option you might try is transcoding to AC3 (if that is possible on the ATV).

Thank you nrosier,

Yes, I have configured the OSMC audio to 5.1 channels. The ATV is connected to my AVR using HDMI and the AVR is connected to the speakers with straight through configuration (it maps the input audio channels from the ATV source to the corresponding output speakers).

I have had the TV also switched on during these tests.

The AVR is reporting a 2 channel input only, so the remaining channels are not being processed/decoded by ATV/OSMC.

Playing transcoded files to AC3 and with the OSMC set to enable Passthrough in the audio settings the AVR is reporting 3/2/.1 as input and plays 5.1 multichannel audio.

So, I’m guessing the ATV does not decode AAC-HE or AAC-LC multichannel containers to PCM … but I don’t know why or how I could make this happen.

I think it’s Kodi that should convert AAC to PCM. This works AFAIK on my Vero4k; don’t use AAC much.

It still might be a EDID issue. Have a look here:

EDID is used only for graphics information. My TV displays video produced by the ATV and fed to it via the AVR with HDMI cables just fine. The problem is with multichannel audio, which does not seem to be decoded correctly or fully for some reason. It is not as if ATV downmixes it to stereo. It completely drops all other audio channels except for Front Left and Front Right. I’m perplexed why this happens, or how to overcome it.

E-EDID is used for both video and audio

Please make sure EDID reports it supports 5.1 PCM. You can do a grab-logs -z to verify what is supported; this is mine:

====================== Audio Cap =================== k3dRrf31
CodingType MaxChannels SamplingFreq SampleSize
PCM, 2 ch, 32/44.1/48/88.2/96/176.4/192 kHz, 16/20/24 bit
PCM, 8 ch, 32/44.1/48/88.2/96/176.4/192 kHz, 16/20/24 bit
AC-3, 6 ch, 32/44.1/48 kHz, bit
DTS, 7 ch, 44.1/48/88.2/96 kHz, bit
OneBitAudio, 6 ch, 44.1 kHz, bit
Dobly_Digital+, 8 ch, 44.1/48 kHz, bit
DTS-HD, 8 ch, 44.1/48/88.2/96/176.4/192 kHz, 16 bit
MAT, 8 ch, 44.1/48/88.2/96/176.4/192 kHz, bit

I beg your pardon nrosier, you’re right EDID contains audio information too!

The AVR seems to not feed back to the ATV any EDID information … here is my logs which appear to be full of errors:

On the other hand, Xorg.0.log shows it reads EDID info from the TV … via the AVR.

[ 25.742] (–) NVIDIA(0): Valid display device(s) on GeForce Go 7300 at PCI:1:0:0
[ 25.742] (–) NVIDIA(0): TV-0
[ 25.742] (–) NVIDIA(0): SONY TV *00 (DFP-0) (connected)
[ 25.742] (–) NVIDIA(0): TV-0: 400.0 MHz maximum pixel clock
[ 25.742] (–) NVIDIA(0): TV encoder: Unknown
[ 25.742] (–) NVIDIA(0): SONY TV *00 (DFP-0): 165.0 MHz maximum pixel clock
[ 25.742] (–) NVIDIA(0): SONY TV *00 (DFP-0): Internal Single Link TMDS
[ 25.742] () NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[ 25.742] (
) NVIDIA(0): device SONY TV *00 (DFP-0) (Using EDID frequencies has
[ 25.742] (**) NVIDIA(0): been enabled on all display devices.)
[ 25.742] (II) NVIDIA(0): Mode Validation Overrides for SONY TV *00 (DFP-0):
[ 25.742] (II) NVIDIA(0): NoVertRefreshCheck
[ 25.742] (II) NVIDIA(0): NoVesaModes
[ 25.742] (II) NVIDIA(0): NoXServerModes
[ 25.751] (==) NVIDIA(0):
[ 25.751] (==) NVIDIA(0): No modes were requested; the default mode “nvidia-auto-select”
[ 25.751] (==) NVIDIA(0): will be used as the requested mode.
[ 25.751] (==) NVIDIA(0):
[ 25.751] (II) NVIDIA(0): Validated MetaModes:
[ 25.751] (II) NVIDIA(0): “DFP-0:nvidia-auto-select”
[ 25.751] (II) NVIDIA(0): Virtual screen size determined to be 1920 x 1080
[ 25.756] (–) NVIDIA(0): DPI set to (45, 44); computed from “UseEdidDpi” X config
[ 25.756] (–) NVIDIA(0): option
[ 25.756] (–) Depth 24 pixmap format is 32 bpp

What now?

Make sure everything is switched on (AVR/TV…) when running the command. When I run it with my AVR off I get the same errors. If it still does not show anything you might be able to fix it with method 3 of the previous link I sent:

Just thinking some more. Don’t think would do anything with audio. Still would be nice to know what the AVR is reporting back to the ATV. What does aplay -l return? See this post from Sam: HD Freeview audio problem in OSMC on ATV1 - #9 by sam_nazarko

If you read the entire thread it looks like a HW limitation of the ATV1…

Maybe it’s time to take advantage of the Valentine’s day sale :slight_smile:

Thanks nrosier,

As far as I know xorg only manages the display. The thread you linked to is useful although confusing in its conclusion. fritsch_xbmc mentions a kernel and driver limitation (at least back in 2016) and Sam states a hardware limitation.

Meanwhile, aplay reports the following:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC889A Analog [ALC889A Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC889A Digital [ALC889A Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


$ aplay -L
    Discard all samples (playback) or generate zero samples (capture)
    HDA Intel, ALC889A Analog
    Default Audio Device
    HDA Intel, ALC889A Analog
    Default Audio Device
    HDA Intel, ALC889A Analog
    Front speakers
    HDA Intel, ALC889A Analog
    2.1 Surround output to Front and Subwoofer speakers
    HDA Intel, ALC889A Analog
    4.0 Surround output to Front and Rear speakers
    HDA Intel, ALC889A Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
    HDA Intel, ALC889A Analog
    5.0 Surround output to Front, Center and Rear speakers
    HDA Intel, ALC889A Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    HDA Intel, ALC889A Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    HDA Intel, ALC889A Digital
    IEC958 (S/PDIF) Digital Audio Output
    HDA Intel, HDMI 0
    HDMI Audio Output
    HDA Intel, ALC889A Analog
    Direct sample mixing device
    HDA Intel, ALC889A Digital
    Direct sample mixing device
    HDA Intel, HDMI 0
    Direct sample mixing device
    HDA Intel, ALC889A Analog
    Direct sample snooping device
    HDA Intel, ALC889A Digital
    Direct sample snooping device
    HDA Intel, HDMI 0
    Direct sample snooping device
    HDA Intel, ALC889A Analog
    Direct hardware device without any conversions
    HDA Intel, ALC889A Digital
    Direct hardware device without any conversions
    HDA Intel, HDMI 0
    Direct hardware device without any conversions
    HDA Intel, ALC889A Analog
    Hardware device with all software conversions
    HDA Intel, ALC889A Digital
    Hardware device with all software conversions
    HDA Intel, HDMI 0
    Hardware device with all software conversions

Although aplay shows a multichannel audio capabilty, a speaker test does not look very promising:

$ speaker-test -c 6

speaker-test 1.0.28

Playback device is default
Stream parameters are 48000Hz, S16_LE, 6 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 8192
Period size range from 1024 to 1024
Using max buffer size 8192
Periods = 4
was set period_size = 1024
was set buffer_size = 8192
 0 - Front Left
 1 - Front Right
 2 - Unused
 3 - Unused
 4 - Unused
 5 - Unused
Time per period = 17.764955

Yes, a new modern device like Vero would overcome all these problems and more, but this ATV hardly sees enough action other than mostly playing stereo music files, to justify replacing it at this stage. Hence, I was looking at maximising its capability and getting more mileage out of it. I was thinking of updating the kernel, but if it is a hardware limitation I’m not sure it would be of benefit.

I fully understand. I’ve also got some old devices I try to re-purpose :slight_smile:

Might be worth contacting @sam_nazarko directly to see if he can shed some more light on this.