aboutsummaryrefslogtreecommitdiff
path: root/board/pulseaudio.sh
blob: 8b1186c30f1e94249ec950349a0e40e94903e395 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
##############################
#                            #
#  Pulseaudio configuration  #
#                            #
##############################

# Create the directory where pulseaudio store its files and put it in tempfs
create_missing_dir "/var/lib/pulse"
if ! grep -qE '/var/lib/pulse' "${TARGET_DIR}/etc/fstab"; then
    cat << __EOF__ >> "${TARGET_DIR}/etc/fstab"
tmpfs /var/lib/pulse tmpfs rw 0 0
__EOF__
fi

if ! grep -qE '^load-module module-native-protocol-tcp' "${TARGET_DIR}/etc/pulse/system.pa"; then
    cat << __EOF__ >> "${TARGET_DIR}/etc/pulse/system.pa"
load-module module-bluetooth-policy
load-module module-bluetooth-discover
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24;2a01:e35:8ac8:0e00::/64 auth-anonymous=1
__EOF__
fi