mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
fa525c42e5
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
45 lines
1.2 KiB
Text
45 lines
1.2 KiB
Text
sndio on Linux works on top of ALSA (or OSS, if THAT is what you have).
|
|
|
|
Before you start using sndio, make sure to disable all other sound servers,
|
|
these include PulseAudio, PipeWire, Jack.
|
|
|
|
Default slackware installation ships with PulseAudio over ALSA, so you have to
|
|
disable PulseAudio. To disable PulseAudio, run the following lines as root:
|
|
|
|
```
|
|
# Disable pulseaudio.desktop:
|
|
if ! grep -q "^Hidden=true$" /etc/xdg/autostart/pulseaudio.desktop ; then
|
|
echo "Hidden=true" >> /etc/xdg/autostart/pulseaudio.desktop
|
|
fi
|
|
|
|
# Edit /etc/pulse/client.conf to disable autospawn:
|
|
sed -i "s/autospawn = yes/autospawn = no/g" /etc/pulse/client.conf
|
|
sed -i "s/allow-autospawn-for-root = yes/allow-autospawn-for-root = no/g" /etc/pulse/client.conf
|
|
```
|
|
|
|
Save the following as '~/.asoundrc':
|
|
|
|
```
|
|
# See https://www.alsa-project.org/wiki/Asoundrc for more details.
|
|
# Set default sound card to use.
|
|
pcm.!default {
|
|
type hw
|
|
card 0
|
|
}
|
|
|
|
# Set default sound cards to control via alsamixer.
|
|
ctl.!default {
|
|
type hw
|
|
card 0
|
|
}
|
|
```
|
|
|
|
To start sndiod at boot, append the following snippet to '/etc/rc.d/rc.local':
|
|
|
|
```
|
|
if [ -x /etc/rc.d/rc.libvirt ]; then
|
|
/etc/rc.d/rc.libvirt start
|
|
fi
|
|
```
|
|
|
|
And make sure that file is executable.
|