enable alsa via kodi.desktop
#1
Question 
I just went from 14.04 to 16.04 and can not seem to get alsa working

I forgotten to backup my kodi.desktop link I used

AE_SINK=ALSA kodi via terminal is not working for me

and I actual used to use something stored inside the kodi.desktop that worked flawlessly with out creating any other scripts
I just can not work out what it was that I used for force alsa


any idea's what I might have done ? I have a feeling it went like
Exec=env AE_SINK=ALSA kodi
how ever I have noticed my sound drivers are screwed up ( no 5.1 ) so it might be something else not allowing alsa
it thinks its doing pass-through but the spdif has pulse audio still showing on the output


Image


/usr/share/applications/kodi-alsa.desktop

[Desktop Entry]
Version=1.0
Name=Kodi media center
GenericName=Media center
Comment=Manage and view your media
Exec=Exec=env AE_SINK=ALSA kodi
Icon=kodi
Terminal=false
Type=Application
Categories=AudioVideo;Video;Player;TV;

Actions=Fullscreen;Standalone;

[Desktop Action Fullscreen]
Name=Open in fullscreen
Exec=Exec=env AE_SINK=ALSA kodi -fs
OnlyShowIn=Unity;

[Desktop Action Standalone]
Name=Open in standalone mode
Exec=Exec=env AE_SINK=ALSA kodi --standalone
OnlyShowIn=Unity;
Reply
#2
How to disable PulseAudio without removing it

Note: The user account that you use to login to your Kodi box has to have sudo rights to do these edits.

I have found a way after searching on the web. I use this method on my Ubuntu box.

It is much safer than removing PulseAudio as it is a depedancy for a lot of packages on Ubuntu.

I have instructions for for all users (global) or just one user. Either way should do the job and can be reversed easily.

Disable PulseAudio for all users (global):

You can disable PulseAudio (stop it autospawning) by editing its global configuration file:

Open a terminal window or SSH into your Ubuntu computer.

Make a backup copy of the global configuration file just in case:

Code:
sudo cp /etc/pulse/client.conf /etc/pulse/client.confbackup

Next, edit the file with a text editor such as nano:

Code:
sudo nano /etc/pulse/client.conf

Scroll through the file then uncomment (remove the ; character) and edit the following line:

From:
Code:
; autospawn = yes

To:
Code:
autospawn = no

Save the file, then exit the text editor.

Finally, restart your Ubuntu computer.

PulseAudio should be turned off and ALSA will be used instead.

To disable PulseAudio for one user:

You can disable PulseAudio (stop it autospawning) by editing its local configuration file for a specific user:

Open a terminal window or SSH into your Ubuntu computer.

Copy the global configuration file to your user's local PulseAudio config directory:

Code:
cp /etc/pulse/client.conf /home/yourusername/.config/pulse

Where yourusername is the user account that you want to disable PulseAudio.

Next, make a backup copy of the global configuration file just in case:

Code:
cp /etc/pulse/client.conf /home/yourusername/.config/pulse/client.confbackup


Next, edit the file with a text editor such as nano:

Code:
nano /home/yourusername/.config/pulse/client.conf

Scroll through the file then uncomment (remove the ; character) and edit the following line:

From:
Code:
; autospawn = yes

To:
Code:
autospawn = no

Save the file, then exit the text editor.

Finally, restart your Ubuntu computer.

PulseAudio should be turned off and ALSA will be used instead.

Adapted from the following source: http://askubuntu.com/questions/8425/how-...pulseaudio
Reply
#3
The AE_SINK=ALSA Kodi start enables/forces ALSA and PulseAudio at the same time and will only cause problems
(refer to http://kodi.wiki/view/PulseAudio).

It is best to either use PulseAudio or ALSA as recommended in the Kodi Wiki.
Reply
#4
(2016-04-24, 17:20)J876 Wrote: How to disable PulseAudio without removing it

Note: The user account that you use to login to your Kodi box has to have sudo rights to do these edits.

I have found a way after searching on the web. I use this method on my Ubuntu box.

It is much safer than removing PulseAudio as it is a depedancy for a lot of packages on Ubuntu.

I have instructions for for all users (global) or just one user. Either way should do the job and can be reversed easily.

Disable PulseAudio for all users (global):

You can disable PulseAudio (stop it autospawning) by editing its global configuration file:

Open a terminal window or SSH into your Ubuntu computer.

Make a backup copy of the global configuration file just in case:

Code:
sudo cp /etc/pulse/client.conf /etc/pulse/client.confbackup

Next, edit the file with a text editor such as nano:

Code:
sudo nano /etc/pulse/client.conf

Scroll through the file then uncomment (remove the ; character) and edit the following line:

From:
Code:
; autospawn = yes

To:
Code:
autospawn = no

Save the file, then exit the text editor.

Finally, restart your Ubuntu computer.

PulseAudio should be turned off and ALSA will be used instead.

To disable PulseAudio for one user:

You can disable PulseAudio (stop it autospawning) by editing its local configuration file for a specific user:

Open a terminal window or SSH into your Ubuntu computer.

Copy the global configuration file to your user's local PulseAudio config directory:

Code:
cp /etc/pulse/client.conf /home/yourusername/.config/pulse

Where yourusername is the user account that you want to disable PulseAudio.

Next, make a backup copy of the global configuration file just in case:

Code:
sudo cp /etc/pulse/client.conf /home/yourusername/.config/pulse/client.confbackup


Next, edit the file with a text editor such as nano:

Code:
nano /home/yourusername/.config/pulse/client.conf

Scroll through the file then uncomment (remove the ; character) and edit the following line:

From:
Code:
; autospawn = yes

To:
Code:
autospawn = no

Save the file, then exit the text editor.

Finally, restart your Ubuntu computer.

PulseAudio should be turned off and ALSA will be used instead.

Adapted from the following source: http://askubuntu.com/questions/8425/how-...pulseaudio

Thank you so much for posting this clear and concise process - I have been dealing with issues where my audio config would stop working after switching types of source - ie, local video files played fine until I streamed NBCSN or other type of streaming add-on. Once I played a non-local source, my passthrough settings would be changed. It was pulseaudio messing things up. All is working well now!
Reply
#5
You are welcome! Hopefully this help others too.
Reply
#6
I have added a page to the Kodi Wiki on how to do this now:

Here is the link:

http://kodi.wiki/view/PulseAudio/HOW-TO:...for_Ubuntu
Reply
#7
change:
Exec=Exec=env AE_SINK=ALSA kodi

to:
Exec=pasuspender -- env AE_SINK=ALSA kodi

also for the -fs and --standalone entries
Reply
#8
and now problem is back again Kodi 17.5 and ubuntu 17.10

it says passthrough is working but no dts is been passed to sound system its been changed .. so its all muffled crap

I even built with pulseaudio off , buts its still their .. I need kodi to have nothing to do with pulse audio I don't want it


cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=wayland -DWAYLAND_RENDER_SYSTEM=gl -DENABLE_PULSEAUDIO=OFF -DENABLE_ALSA=ON


pasuspender -- env AE_SINK=ALSA ./kodi.bin


Ubuntu shows application kodi  ALSA plugin been used in the sound settings .. but passthrough should not allow volume change !!!
Reply
#9
one ! would have been enough. Kodi does not do any volume handling when PT is in use. When your keys are bound to what the window manager does, then there is absolutely nothing kodi could do to make that not happen (press + and - and you will see what I mean). You run kodi on a desktop, it uses what your desktop provides us.
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
enable alsa via kodi.desktop0