Hello all,
Just found how to allow XBMC / kodi to use ALSA for audio (not Pulse). This does not affect normal login (unity) but enables things like audio passthrough on XBMC sessions.
*This assumes your user is the default “ubuntu”
**this only works if only one user is on xbmc (probably best to have an xbmc user)
- create the fire in your home xbmc_custom_session_starter
nano ~/xbmc_custom_session_starter
and write the following to the file
#!/bin/bash
# Kill PulseAudio
echo autospawn = no > ~/.config/pulse/client.conf
killall pulseaudio
# Start Kodi
xbmc-standalone
# Start Pulse Audio
rm ~/.config/pulse/client.conf
pulseaudio --start
- enable execution of that file
chmod +x ~/xbmc_custom_session_starter
- create a new xesssion option
sudo nano /usr/share/xsessions/XBMC_Custom.desktop
and write the following to it
[Desktop Entry]
Name=Kodi (ALSA)
Comment=kodi (alsa)
Exec=/home/ubuntu/xbmc_custom_session_starter
TryExec=/home/ubuntu/xbmc_custom_session_starter
Type=Application
- reboot and you will have a new session option in ldm
I found most of this info around the internet so i cant claim the credit :)
Hope this helps someone !