forked from hifiberry/hifiberry-dsp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-dsptoolkit
45 lines (36 loc) · 1.02 KB
/
install-dsptoolkit
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
#!/bin/sh
sudo apt update
for p in python3-pip libasound2-dev libxslt1-dev libxml2-dev zlib1g-dev python3-lxml libxml2-dev libxslt-dev python3-dev; do
sudo apt install -y $p
done
sudo pip3 install --upgrade hifiberrydsp
for i in sigmatcp; do
sudo systemctl stop $i
sudo systemctl disable $i
done
sudo mkdir -p /var/lib/hifiberry
LOC=`which dsptoolkit`
sudo mkdir ~/.dsptoolkit
# Create systemd config for the TCP server
LOC=`which sigmatcpserver`
cat <<EOT >/tmp/sigmatcp.service
[Unit]
Description=SigmaTCP Server for HiFiBerry DSP
Wants=network-online.target
After=network.target network-online.target
[Service]
Type=simple
ExecStart=$LOC --alsa
StandardOutput=journal
[Install]
WantedBy=multi-user.target
EOT
sudo mv /tmp/sigmatcp.service /lib/systemd/system/sigmatcp.service
sudo systemctl daemon-reload
for i in sigmatcp; do
sudo systemctl start $i
sudo systemctl enable $i
done
cat /boot/config.txt | grep -v "dtparam=spi" >> /tmp/config.txt
echo "dtparam=spi=on" >> /tmp/config.txt
sudo mv /tmp/config.txt /boot/config.txt