Linux AC3 / dolby in ubuntu 18.04?
#1
I have an Intel NUC with ubuntu and with a s/pdif (toslink) connector to my dolby amplifier. I have no problems to play dolby 5.1 videos with mpv player.
But when I start kodi, the sound settings always change. Sometimes it switches to HDMI, sometimes S/PDIF and sometimes Lineout.
So kodi does not take what is set in ubuntu. With kodi the result is always random.
Why is this?
Reply
#2
Same as always: https://kodi.wiki/view/PulseAudio
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
AC3 works on my system and sometimes in Kodi. But the output settings in Kodi always change. For example output is SPDIF with AC3 working and 5 minutes later is LineOut without AC3 or it is HDMI.
I quit Kodi then and I find that the pavucontrol settings have changed and point to HDMI. So Kodi does change the system settings. Other programs don't do that.
Reply
#4
No kodi does not. It cannot do that ... Most likely you use Refreshrate switching in kodi which reenumerates the sinks ... so disable refreshrate switching and all fine.

And: without a Debug Log no one can help you.

From the known-issues, that I just linked:
Quote:Audio devices are disappearing with pulseaudio 8.0 (Ubuntu 16.04 or later) especially while running kodi and while using Adjust Refreshrate to match video. This is an issue with the module-switch-on-port-available module and will be fixed with pulseaudio 9.0, the fix sadly won't probably make it into Ubuntu 16.04. As a workaround please disable that feature by editing /etc/pulse/default.pa and commenting or removing load-module module-switch-on-port-available and reboot the system.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
(2018-05-21, 10:16)fritsch Wrote:  Most likely you use Refreshrate switching in kodi which reenumerates the sinks ... so disable refreshrate switching and all fine.
 Thanks, that was the problem and that fixed it.
Also, the hints in https://help.ubuntu.com/community/DigitalAC-3Pulseaudio allow ubuntu to run with AC3, but they fix the rate to 48000 and passthru in kodi will not work.
One last thing: you have to close the pavucontrol/sound settings window, else the rate cannot be changed.

If I use a52 and set pulseaudio to SPDIF 5.1 and the receiver shows it is in AC3 mode all the time, can kodi use this multichannel mode and send Dolby 5.1 to my receiver? Is it the same as with HDMI 5.1?
Reply
#6
Yes, kodi can do that: Set channels to 2.0 enable AC3 and enable Dolby Transcoding.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#7
Ok I made the test: I switched the system to SPDIF AC3 mode as described herein: https://help.ubuntu.com/community/DigitalAC-3Pulseaudio

Then in Kodi I selected 2 channel mode. (There was no choice for dolby transcoding, only for DSP processing).
Playing channel_check.vob, the sound only comes from the front speakers.

Then I switched kodi to 5.1 mode and played channel_check: everythink ok, the rear left (BL) and rear right (BR) speakers work.
But if I enable DSP processing, I hear FR,FL,C, but not BL and BR.

So switching the system to AC3 mode, setting Kodi to 5.1 channels SPDIF and disabling DSP processing works fine.

Maybe we can put this in https://kodi.wiki/view/PulseAudio ?
Reply
#8
SPDIF can only transport 2.0 channels in PCM mode. What your output is doing: take 6 channel PCM and make ac3 from it. It doubles what kodi could do.  For Dolby Transcoding to be visible, you must have a passthrough capable device and "Expert" settings level enable.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
When I switch pulseaudio to AC3 mode, passthru is lost:
Quote:18:36:57.121 T:140049902040256  NOTICE: Enumerated PULSE devices:
18:36:57.121 T:140049902040256  NOTICE:     Device 1
18:36:57.122 T:140049902040256  NOTICE:         m_deviceName      : Default
18:36:57.122 T:140049902040256  NOTICE:         m_displayName     : Default
18:36:57.122 T:140049902040256  NOTICE:         m_displayNameExtra: Default Output Device (PULSEAUDIO)
18:36:57.122 T:140049902040256  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
18:36:57.122 T:140049902040256  NOTICE:         m_channels        : FL,FR
18:36:57.122 T:140049902040256  NOTICE:         m_sampleRates     : 5512,8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,176400,192000,384000
18:36:57.122 T:140049902040256  NOTICE:         m_dataFormats     : AE_FMT_U8,AE_FMT_S16NE,AE_FMT_S24NE3,AE_FMT_S24NE4,AE_FMT_S32NE,AE_FMT_FLOAT
18:36:57.122 T:140049902040256  NOTICE:         m_streamTypes     : No passthrough capabilities
18:36:57.122 T:140049902040256  NOTICE:     Device 2
18:36:57.122 T:140049902040256  NOTICE:         m_deviceName      : alsa_output.pci-0000_00_0e.0.iec958-ac3-surround-51
18:36:57.122 T:140049902040256  NOTICE:         m_displayName     : Built-in Audio Digital Surround 5.1 (IEC958/AC3)
18:36:57.122 T:140049902040256  NOTICE:         m_displayNameExtra: Built-in Audio Digital Surround 5.1 (IEC958/AC3) (PULSEAUDIO)
18:36:57.122 T:140049902040256  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
18:36:57.122 T:140049902040256  NOTICE:         m_channels        : FL,FR,BL,BR,FC,LFE
18:36:57.122 T:140049902040256  NOTICE:         m_sampleRates     : 5512,8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,176400,192000,384000
18:36:57.122 T:140049902040256  NOTICE:         m_dataFormats     : AE_FMT_U8,AE_FMT_S16NE,AE_FMT_S24NE3,AE_FMT_S24NE4,AE_FMT_S32NE,AE_FMT_FLOAT
18:36:57.122 T:140049902040256  NOTICE:         m_streamTypes     : No passthrough capabilities
 
Reply
#10
Yes! obviously.

Quote:m_deviceType      : AE_DEVTYPE_PCM
m_channels        : FL,FR,BL,BR,FC,LFE

And 
Quote:m_streamTypes     : No passthrough capabilities

Just follow the wiki please. There is no need for additional hacks or something.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#11
When setting Kodi to 5.1 channels, it works and I'm happy. I guess it is some kind of passthrough. Every-single-channel-passthrough.
Reply

Logout Mark Read Team Forum Stats Members Help
AC3 / dolby in ubuntu 18.04?0