-
Notifications
You must be signed in to change notification settings - Fork 36
/
install-dsptoolkit
49 lines (39 loc) · 1.1 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
46
47
48
49
#!/bin/sh
sudo apt update
for p in python3-pip libasound2-dev libxslt1-dev libxml2-dev zlib1g-dev libxml2-dev libxslt-dev python3-dev git gcc alsa-utils; do
sudo apt install -y $p
done
cd
git clone https://github.com/hifiberry/hifiberry-dsp
cd hifiberry-dsp
sudo python3 ./setup.py install
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 --localhost --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