Linux 5.1 vs Dolby Pro Logic II output
#1
Hi all!

I've been using XBMC for a few years now, recently running Ubuntu 12.10 and XBMC 13.1, on a Zotac ND22 with a Pioneer VSX-1022-K receiver. However this Ubuntu release has gone out of support, so I'm redoing my installation with 14.04 so I can continue to get new releases Smile

I have a lot of content which is DPL2 encoded, and some which is full 5.1. Previously, when I played a stereo/DPL2 file, the receiver would recognize the stereo signal and allow me to choose a DPL2 decoder mode. When I played a 5.1 file, it would automatically jump into a surround-sound mode. This was great!

However, I've run into an audio issue with 14.04/13.2. In the Ubuntu system sound settings, I have to choose between Stereo or 5.1 for the HDMI output. It then seems to always be in this mode, regardless of what I play in XBMC. The problem is that if I enable the 5.1 support, then the receiver won't let me choose DPL2 anymore when I play a stereo file. Whereas if I choose the stereo mode, then I lose the back channels on 5.1 content.

My theory is that it is always emitting 5.1 but with empty back channels, but the receiver doesn't know the extra channels aren't actually in use to let me override them with DPL2. (I realize this is more of an Ubuntu issue since it reproduces with other players e.g. VLC, but I'm hoping media-savvy forum like this will know what's going on.)

How can I get back the old behavior where it would dynamically switch the number of channels in use to match the media content?

Thanks!
Reply
#2
This functionality can currently only be done with pure ALSA. Therefore start xbmc as follows:

Code:
AE_SINK=ALSA xbmc

This will bypass _your_ installed pulseaudio server and will make sever problems especially if an additional browser is running or something that else that wants to make sound.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
Just to clarify if I have the same issue...

Ubuntu 14.04.1 x64, Pulseaudio, HDMI 7.1 setup

Playback of the following sound tracks work with expected sound on speakers:
- DTS-MA HD, Flac etc.
- 5.1

What does not work is Dolby Digital 2.0. Before, I used to enable the ALSA sink and would pass the 2.0 sound onto my receiver as passthrough which would then decode the contained surround sound to 5.1.

Now after some Ubuntu update the ALSA sink option no longer works, I get totally garbage output, crackling sound. So then I decided to give that passthrough and just use Pulseaudio.

But now I'm stuck with a DD 2.0 sound going to my receiver and giving me left/right sound. Is that expected? I am honestly a bit astonished if that is the case. Why doesn't XBMC or Pulseaudio take such a DD 2.0 sound as input, check if it contains the surround sound encoding and if so decode it to 5.1 and then pass it on the receiver via LPCM? This decoding happens anyways for DTS-MA HD as well right - granted, there it's different as the 7.1 channels are all there in the stream and might not be as "challenging" to decode, but still... DD 2.0 is so damn old I'm astonished that there is no open-source implementation to decode it, even if not perfect?

And if I'm stuck with having to use ALSA - then what is the point of using Pulseaudio anyways? It doesn't do a good job imo - it lacks passthrough support, it lacks DD 2.0 decoding support...

Thanks!
Reply
#4
Most of what you said was plain wrong.

Pulseaudio can do passthrough, namely AC3 and DTS without touching the signal at all. See here: http://kodi.wiki/view/PulseAudio Especially take care of what happens when PA is used in multichannel mode.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
For reference, I mostly got working with the AE_SINK trick. I created a .desktop entry in /usr/share/xsessions which called a custom script which set the environment variable and started xbmc-standalone.

However, I later discovered this didn't completely disable Pulseaudio—the audio output devices advertised by XBMC were still referencing pulseaudio, and I got silence whenever I tried to use passthrough. Further, I've previously had to create an .asoundrc file to remap some surround channels which were swapped, and this worked with speaker-test, but I realized xbmc was not respecting the .asoundrc file.

So the final solution I found was to add 'pulseaudio --kill; sleep 4' to my script before it launches xbmc-standalone. Now XBMC offers ALSA audio outputs instead of pulse audio ones, respects my speaker mapping, and supports pass through of AC3 at least.
Reply
#6
Yeah, perhaps now you understand why I say: "Directly using ALSA with Pulseaudio besides it running is not good." ...

Would have been nice, if you could have tried setting PA devices to do AC3 though, then we could have tested out what went wrong. If you decide to do so, I need:

pactl list sinks and the xbmc.log when starting up.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#7
I seem to have this working on Kodi 14.2 on Xubuntu 15.04. It took some trial and error, for sure. Followed http://kodi.wiki/view/PulseAudio fairly closely. ("Passthrough Mode").
Reply
#8
Cool :-) thumbs up.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply

Logout Mark Read Team Forum Stats Members Help
5.1 vs Dolby Pro Logic II output0