Last active
October 4, 2021 01:37
-
-
Save mdubb86/cb6ec7d0c599158f8c8bb439ba304881 to your computer and use it in GitHub Desktop.
Setup and configure shairport-sync and hifiberry amp+ on raspberry pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Shairport-sync: https://github.com/mikebrady/shairport-sync | |
# HiFiBerry AMP+: https://support.hifiberry.com/hc/en-us/articles/205377651-Configuring-Linux-4-x-or-higher | |
# Install shairport-sync dependencies | |
sudo apt-get update && sudo apt-get install -y \ | |
build-essential git xmltoman \ | |
autoconf automake libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev \ | |
avahi-daemon libavahi-client-dev \ | |
libssl-dev vim | |
# Build and install shairport-sync | |
git clone https://github.com/mikebrady/shairport-sync.git | |
cd shairport-sync/ | |
autoreconf -i -f | |
./configure --sysconfdir=/etc --with-alsa --with-avahi --with-ssl=openssl --with-metadata --with-systemd | |
make | |
getent group shairport-sync &>/dev/null || sudo groupadd -r shairport-sync >/dev/null | |
getent passwd shairport-sync &> /dev/null || sudo useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null | |
sudo make install | |
# Remove the driver from onboard sound | |
sudo sed -i 's/dtparam=audio=on/#dtparam=audio=on' /boot/config | |
# Add the hifiberry-amp driver | |
echo 'dtoverlay=hifiberry-amp' | sudo tee -a /boot/config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment