I remember that I did something simliar under 14.04 ( as mentioned in this thread) to disable pulse-audio via the autospawn=no settings and made use of ALSA, but this time around I was having intermittant issues when rebooting and with Kodi (v17 - Krypton) so I opted to try and get pulse working with 5.1 output.
I found that the audio settings within Ubuntu in Linux Station did in fact see the connection to my amplifier but had it listed as HDMI2 / DisplayPort, and by default, Ubuntu / PulseAudio was selecting HDMI1; So I completed the following steps to define HDMI2 as my default audio device:
1. login to linux station, set audio device to preferred device using the audio settings GUI in Ubuntu.
2. Disabled the two audio startup scripts for Ubuntu (/usr/bin/qnap-audio and /var/lib/qnap/defualt-sink-handler.py)
2. Then open terminal and run
Code: Select all
$ aplay -l
3. Run
Code: Select all
$ pacmd list
Code: Select all
active profile: <output:hdmi-surround-extra1>
Code: Select all
### Make some devices default
#set-default-sink output
#set-default-source input
#.nofail
#.include /etc/pulse/qnap.pa
#.include /etc/pulse/default-sink
#.fail
Code: Select all
set-card-profile 0 output:hdmi-surround-extra1
Now audio should be working in Kodi; Note you may need to change the audio output from Defualt PulseAudio device to the actual default device you need.
This enabled 5.1 output using PulseAudio for me within Kodi and within Steam