Kodi Community Forum

Full Version: [LINUX] XBMC + Alsa + Passthrough (under Fedora)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I finally succeed to get the sound working under xbmc, with all users and with alsa under Fedora.

I would like to share my solution, and maybe it will help other users.

My goal is simple : Use passthrough under XBMC and Fedora. So i have to disable pulseaudio and use alsa instead (pulseaudio doesn't support passthrough)

Firstable, I disabled pulse during compilation

Code:
./configure --disable-vdpau --enable-goom --disable-pulse

But, the problems stay multiple :

1/ The sound works with root but i had no sound at all under non-root users.

- Check the rights on /dev/snd/*

Code:
root@home>ls -l /dev/snd/*
crw-rw----+ 1 root root 116,  0 janv.  4 00:32 /dev/snd/controlC0
crw-rw----+ 1 root root 116,  8 janv.  4 00:32 /dev/snd/midiC0D0
crw-rw----+ 1 root root 116, 24 janv.  4 11:06 /dev/snd/pcmC0D0c
crw-rw----+ 1 root root 116, 16 janv.  4 11:06 /dev/snd/pcmC0D0p
crw-rw----+ 1 root root 116, 17 janv.  4 00:32 /dev/snd/pcmC0D1p
crw-rw----+ 1 root root 116, 26 janv.  4 00:32 /dev/snd/pcmC0D2c
crw-rw----+ 1 root root 116, 18 janv.  4 11:25 /dev/snd/pcmC0D2p
crw-rw----+ 1 root root 116, 33 janv.  4 00:32 /dev/snd/timer

- When i change manually the rights to the non-user, it works. But when i reboot, the good rights are gone. To change the good rights permenantly, i edit the file /etc/security/console.perms.d/50-default.perms

Code:
<snd>=/dev/snd/*
...
<console>  0660 <snd>        0660 root.audio

And i added not-root users to the audio group

Code:
gpasswd -a notroot audio

2/ After these changes, i've sound in the interface of xbmc with all users, but non-root users have no sound during videos

In xbmc.log, i've this error :

Code:
ERROR: Initialize - pcm_open_lconf, alsa error: -16
xbmc pcm_dmix.c:1010:(snd_pcm_dmix_open) unable to open slave

As everything works fine under root i check who use the sound device :

Under root :
Code:
root@home>fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/pcmC0D2p:   root     26235 F...m xbmc.bin


Under notroot :
Code:
nonroot@home>fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/pcmC0D2p:   notroot     27925 F...m [color=red]pulseaudio[/color]

So, to disable pulseaudio :

- I removed alsa-plugins-pulseaudio

Code:
yum remove alsa-plugins-pulseaudio

- I removed the /etc/asound.conf file

Code:
mv /etc/asound.conf /etc/asound.conf.old

- I disabled all modules in /etc/pulse/system.pa & default.pa

And finally, everything is fine.

I hope this help.

(As you can read, english isn't my mother tongue, so be free to correct me if some of my sentences are incorrect or incomprehensible Wink )