Using asoundrc file for sound output (dolby prologic 2 encoding)

Hi everyone,
I have recently acquired a 5.1 home cinema system but it only has stereo inputs (with dolby prologic 2 decoding). I found this topic: Dolby Pro Logic II configuration

And have created this asoundrc file:

confdir:pcm/dpl.conf

pcm.!default {
type plug
slave.pcm {
type upmix
slave.pcm “dpl2:hw:0”
channels 6
}
}

This works with the alsa speaker test, I get sound out of all speakers (except the subwoofer but I think that’s normal with prologic 2…)
The problem is that this setup doesn’t work with kodi, I still just get stereo out… It seems that kodi ignores the asoundrc file…

Does anyone have an idea of how to get kodi to work with my setup?

Thanks,
Seb.

Just set two channels in Kodi. Disable passthrough.
Prologic will handle the rest (at the AV level) after getting 2.0 PC

Thread referenced is not appropriate for Pi.

No need for asoundrc tweaking.

Thanks for replying,
But unfortunately in that case prologic is just upmixing stereo. I have films with 6 discrete channel’s and I want to matrix them into stereo not downmix them. The asoundrc above does exactly that, I can send sound to the surround speakers individually. I have tried what you suggested above and despite having the amp set to decode prologic I only get stereo because thats all that kodi is sending it…

Try selecting ALSA HDMI output in Kodi.

Sam

I have the following in tha audio output settings:
PI:HDMI
PI:Analogue
PI:HDMI and Analogue
ALSA:Playback/recording through the PulseAudio sound server
ALSA:PulseAudio Sound Server

I am using the HDMI output but I can’t get it to work…
If I select 5.1 channels I just loose center/Sleft/Sright
If I select 2 channels I get the surround channels out of the front speakers

Seb

I think you’ve installed experimental Bluetooth improvements.
I’m not sure it will work with this.

After re-reading your post, it looks like you’re trying to get multi-channel audio via HDMI with ALSA. I don’t believe that’s possible. The only way to get multi-channel PCM is with omxplayer which does not use ALSA.

Sam

I’m not trying to get multichannel audio out of hdmi, I’m trying to get matrixed stereo out (which does work with speaker-test). But I need kodi to output multichannel to the asoundrc device which then converts it to matrixed stereo and outputs it via hdmi.
Is there a way to force kodi to use this config file?

Thanks,
Seb.

And those alsa options ouput sound but add a delay. They don’t seem to work for what I want either unfortunately.
Seb

You could try /etc/asound.conf. But I believe Kodi’s AudioEngine evaluates HW params, and Raspberry Pi’s kernel probably only reports support for 2 channels.

I have tried that file as well, doesn’t seem to make a difference…
Seb.

I found the solution. Kodi uses pulseaudio by default, I followed this post: enable alsa via kodi.desktop
To disable pulseaudio and kodi now uses alsa so consequently my asoundrc file. I have surround sound with dolby prologic 2. Success!
Thanks for the ideas earlier sam!
Seb.

Avoid PulseAudio for now. We will allow it to work with Kodi for BT streaming without interfering with things in the future

Sam