File: install-dsptoolkit

package info (click to toggle)
hifiberry-dsp 0.21-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 22,456 kB
  • sloc: xml: 6,099; python: 4,248; sh: 70; makefile: 2
file content (43 lines) | stat: -rw-r--r-- 1,053 bytes parent folder | download
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
#!/bin/sh
sudo apt-get update
sudo apt-get install -y python3-pip libasound2-dev libxslt1-dev libxml2-dev zlib1g-dev python3-lxml python-lxml libxml2-dev libxslt-dev python-dev
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 --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