- Pulseaudio must be installed on the host and the
pulseaudio server
must be running on the host machine.
This can be checked through following command:
[root@nuc-jan ~]# ps -ef | grep pulseaudio
pulse 16123 16090 0 20:09 ? 00:00:00 /usr/bin/pulseaudio --daemonize=no
root 16475 16125 0 20:09 pts/0 00:00:00 grep --color=auto pulseaudio
[root@nuc-jan ~]#
- Pulseaudio must be run system-wide mode
For this the following line must be set in /etc/pulse/daemon.conf
system-instance = yes
- The pulse user needs to be in the audio and bluetooth groups in order to be able to use ALSA and bluetooth devices.
# adding user pulse to audio group
usermod -a -G audio pulse
- Specify location of unix pulseaudio socket and allow anonymous client access by updating following section in
/etc/pulse/system.pa
from :
### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix
into :
### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix auth-anonymous=true socket=/tmp/pulseaudio.socket
- Set pulseaudio unix socket for the pulse audio client and disable autospawn in
/etc/pulse/client.conf
as follows
The same socket location must be specified as set in point 3.
default-server = unix:/tmp/pulseaudio.socket
autospawn = no
- Assure that the pulseaudio-utils are installed.
- request the pulseaudio info
[root@nuc-jan pulse]# pactl info
Server String: unix:/tmp/pulseaudio.socket
Library Protocol Version: 32
Server Protocol Version: 32
Is Local: yes
Client Index: 0
Tile Size: 65472
User Name: pulse
Host Name: nuc-jan.borsbeek
Server Name: pulseaudio
Server Version: 11.1-rebootstrapped
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: auto_null
Default Source: auto_null.monitor
Cookie: 1a6b:a182
[root@nuc-jan pulse]#
- Request the pulseaudio modules,sinks, sources, clients.
[root@nuc-jan pulse]# pactl list
Module #0
Name: module-udev-detect
Argument:
...
- test speaker - for this assure alsa-utils is intalled.
# test pulseaudio play
paplay /usr/share/sounds/alsa/Front_Center.wav
# test alsa play (you can do this if previous command doesn't work).
aplay /usr/share/sounds/alsa/Front_Center.wav
- You can increase log level in
/etc/pulse/daemon.conf
. E.g. add following line:
log-level = debug
- Following command can then be used to see what is logged:
journalctl | grep pulseaudio
- Check if sound device is used:
lsof /dev/snd/*
fuser -v /dev/snd/*
- list cards using alsa
aplay -L
- list sinks/sources using pulseaudio
pactl list sinks
pactl list sources