-
Notifications
You must be signed in to change notification settings - Fork 13
/
debian-setup.sh
51 lines (43 loc) · 1.17 KB
/
debian-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
set -e
echo "Setting up ALSA bridge..."
# Install pulse plugins for ALSA
apt-get update
apt-get install -y --no-install-recommends libasound2-plugins
rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
# Set PulseAudio as the default output plugin for ALSA
mkdir -p /usr/share/alsa/
cat << EOF > /usr/share/alsa/pulse-alsa.conf
# This file is referred to by /usr/share/alsa/pulse.conf to set pulseaudio as
# the default output plugin for applications using alsa when PulseAudio is
# running.
pcm.!default {
type pulse
hint {
show on
description "Playback/recording through the PulseAudio sound server"
}
}
ctl.!default {
type pulse
}
EOF
mkdir -p /etc/alsa/conf.d/
cat << EOF > /etc/alsa/conf.d/99-pulse.conf
# PulseAudio alsa plugin configuration file to set the pulseaudio plugin as
# default output for applications using alsa when pulseaudio is running.
hook_func.pulse_load_if_running {
lib "libasound_module_conf_pulse.so"
func "conf_pulse_hook_load_if_running"
}
@hooks [
{
func pulse_load_if_running
files [
"/usr/share/alsa/pulse-alsa.conf"
]
errors false
}
]
EOF
echo "ALSA bridge configured correctly!"