Kodi Community Forum

Full Version: no pcm5.1 through HDMI stereo
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Configuration:
 Kodi 18.3
 Ubuntu 18.04 LTS
 The computer is connected through HDMI directly to AV (DN860) which comes with 5.1 speakers

I use FLAC 5.1 from the samples page. In order to enable HDMI passthrough (DTS,DD), the sound profile in Ubuntu sound settings is set to HDMI Stereo (although there are other options like HDMI 5.1). When I play the FLAC 5.1 sample, AV switches to PCM 2.0 mode. I checked the enclosed logs. I think kodi detects properly the PULSE device as having only 2 channels (selected HDMI Stereo profile), thus downmixes the referred FLAC file. However, it should enforce PCM 5.1 mode. It's possible as, when I call:

$speaker-test -c 6 -D hw:0,3
I hear sound from all 6 separate speakers and AV properly switches to PCM 5.1 mode.

I am looking for a confirmation that it's a bug (to send a bug report) and not misconfiguration on my side.
(2019-08-21, 02:30)adrianf0 Wrote: [ -> ]Configuration:
 Kodi 18.3
 Ubuntu 18.04 LTS
 The computer is connected through HDMI directly to AV (DN860) which comes with 5.1 speakers

I use FLAC 5.1 from the samples page. In order to enable HDMI passthrough (DTS,DD), the sound profile in Ubuntu sound settings is set to HDMI Stereo (although there are other options like HDMI 5.1). When I play the FLAC 5.1 sample, AV switches to PCM 2.0 mode. I checked the enclosed logs. I think kodi detects properly the PULSE device as having only 2 channels (selected HDMI Stereo profile), thus downmixes the referred FLAC file. However, it should enforce PCM 5.1 mode. It's possible as, when I call:

$speaker-test -c 6 -D hw:0,3
I hear sound from all 6 separate speakers and AV properly switches to PCM 5.1 mode.

I am looking for a confirmation that it's a bug (to send a bug report) and not misconfiguration on my side.

This is a limitation of PulseAudio. See the notes on the Kodi PulseAudio wiki. If PulseAudio is configured in passthrough, it will only do stereo PCM. There is no passthrough of FLAC, so it gets decoded to LPCM. Alternatively, you can set Kodi to transcode it to AC3 to get 5.1, but that is lossy.

The speaker-test command you gave is using a different ALSA device, not PulseAudio. If you disable PulseAudio and use ALSA, you can use that HDMI device instead. Then, you will get LPCM 5.1 and passthrough.
(2019-08-21, 14:01)yasij Wrote: [ -> ]
(2019-08-21, 02:30)adrianf0 Wrote: [ -> ]Configuration:
 Kodi 18.3
 Ubuntu 18.04 LTS
 The computer is connected through HDMI directly to AV (DN860) which comes with 5.1 speakers

I use FLAC 5.1 from the samples page. In order to enable HDMI passthrough (DTS,DD), the sound profile in Ubuntu sound settings is set to HDMI Stereo (although there are other options like HDMI 5.1). When I play the FLAC 5.1 sample, AV switches to PCM 2.0 mode. I checked the enclosed logs. I think kodi detects properly the PULSE device as having only 2 channels (selected HDMI Stereo profile), thus downmixes the referred FLAC file. However, it should enforce PCM 5.1 mode. It's possible as, when I call:

$speaker-test -c 6 -D hw:0,3
I hear sound from all 6 separate speakers and AV properly switches to PCM 5.1 mode.

I am looking for a confirmation that it's a bug (to send a bug report) and not misconfiguration on my side.

This is a limitation of PulseAudio. See the notes on the Kodi PulseAudio wiki. If PulseAudio is configured in passthrough, it will only do stereo PCM. There is no passthrough of FLAC, so it gets decoded to LPCM. Alternatively, you can set Kodi to transcode it to AC3 to get 5.1, but that is lossy.

The speaker-test command you gave is using a different ALSA device, not PulseAudio. If you disable PulseAudio and use ALSA, you can use that HDMI device instead. Then, you will get LPCM 5.1 and passthrough.   
Thank you for your answer. Solution with
pasuspender -- env KODI_AE_SINK=ALSA kodi
from Kodi PulseAudio wiki  works like a charm. It's what I have been looking for. Moreover, it gave a possibility to play formats not supported by PulsuAudio (TrueHD, DTS-HD, etc.). Thanks!