Files
shairport-sync/INSTALL.md
T
Mike Brady 1704916a47 Squashed commit of the following:
commit 85fae473bb
Merge: bf91d35 854942d
Author: Mike Brady <mikebrady@eircom.net>
Date:   Tue Jun 4 22:15:37 2019 +0100

    Merge pull request #860 from joerg-krause/patch-2

    Debug requested period size value

commit 854942df92
Author: Jörg Krause <joerg.krause@embedded.rocks>
Date:   Tue Jun 4 20:47:43 2019 +0200

    Debug requested period size value

commit bf91d35bfb
Author: Mike Brady <mikebrady@eircom.net>
Date:   Tue Jun 4 15:33:30 2019 +0100

    Update RELEASENOTES-DEVELOPMENT.md

commit 3ca3408255
Author: Mike Brady <mikebrady@eircom.net>
Date:   Tue Jun 4 15:32:10 2019 +0100

    Fix error message for invalid standby mode choice

commit 4bafe1c982
Author: Mike Brady <mikebrady@eircom.net>
Date:   Mon Jun 3 10:03:54 2019 +0100

    quieten a compilation warning

commit 9d96906402
Author: Mike Brady <mikebrady@eircom.net>
Date:   Sun Jun 2 18:05:40 2019 +0100

    Update configure.ac

commit 0c5c4bfe3f
Author: Mike Brady <mikebrady@eircom.net>
Date:   Sun Jun 2 18:04:51 2019 +0100

    Update RELEASENOTES-DEVELOPMENT.md

commit 85cc1bdd97
Author: Mike Brady <mikebrady@eircom.net>
Date:   Sun Jun 2 17:56:47 2019 +0100

    Fix the dither calculation -- it was 12 dB too high, really noticable on the U8 setting.

commit 25f0fbc24d
Author: Mike Brady <mikebrady@eircom.net>
Date:   Sun Jun 2 13:42:19 2019 +0100

    Update INSTALL.md

commit d91e41d976
Author: Mike Brady <mikebrady@eircom.net>
Date:   Wed May 29 17:26:44 2019 +0100

    Add missing support for S32_LE, S32_BE, S24_LE and S24_LE formats.

commit 7f2e6b1aac
Author: Mike Brady <mikebrady@eircom.net>
Date:   Wed May 29 16:18:51 2019 +0100

    Add support for S32_LE, S32_BE, S24_LE and S24_BE wqhen generating frames of dithered silence

commit 76ad4e6a73
Author: Mike Brady <mikebrady@eircom.net>
Date:   Wed May 29 16:00:47 2019 +0100

    enable specification of specific formats and/or speeds to turn off automatic format/speed selection, fixing a bug. Clarify some of the warnings. Fix a few typos in the configuration file sample.

commit a8222e3f85
Merge: c677006 19fbede
Author: Mike Brady <mikebrady@eircom.net>
Date:   Mon May 27 09:30:57 2019 +0100

    Merge pull request #855 from idcrook/conf_mqtt_port

    mqtt port config changes – fix error in the configuration file and check port number for sanity.
    Many thanks, David. It'll find it's easy into the next release.

commit 19fbededcf
Author: David Crook <idcrook@users.noreply.github.com>
Date:   Sat May 25 13:01:22 2019 -0600

    mqtt port config changes

    1. update example shairport-sync.conf file
    2. update config file mqtt port parsing

    Signed-off-by: David Crook <idcrook@users.noreply.github.com>

commit c677006541
Merge: 744c595 3c4a878
Author: Mike Brady <mikebrady@eircom.net>
Date:   Fri May 24 17:37:26 2019 +0100

    Bring into line with master 3.3
2019-06-05 15:02:26 +01:00

3.8 KiB
Raw Blame History

Simple Installation Instructions

Here are simple instructions for building and installing Shairport Sync on a Raspberry Pi B, 2B, 3B or 3B+. It is assumed that the Pi is running Raspbian Stretch Lite – a GUI isn't needed, since Shairport Sync runs as a daemon program. For a more thorough treatment, please go to the README.md page.

In the commands below, note the convention that a # prompt means you are in superuser mode and a $ prompt means you are in a regular non-priviliged user mode. You can use sudo ("SUperuser DO") to temporarily promote yourself from user to superuser, if permitted. For example, if you want to execute apt-get update in superuser mode and you are in user mode, enter sudo apt-get update.

Configure and Update

Do the usual update and upgrade:

# apt-get update
# apt-get upgrade

(Separately, if you haven't done so already, consider using the raspi-config tool to expand the file system to use the entire card.)

Turn Off WiFi Power Management

If you are using WiFi, you should turn off WiFi Power Management:

# iwconfig wlan0 power off

WiFi Power Management will put the WiFi system in low-power mode when the WiFi system considered inactive, and in this mode it may not respond to events initiated from the network, such as AirPlay requests. Hence, WiFi Power Management should be turned off. (See TROUBLESHOOTING.md for more details.)

Reboot the Pi.

Remove Old Copies

Before you begin building Shairport Sync, it's best to search for and remove any existing copies of the application, called shairport-sync. Use the command $ which shairport-sync to find them. For example, if shairport-sync has been installed previously, this might happen:

$ which shairport-sync
/usr/local/bin/shairport-sync

Remove it as follows:

# rm /usr/local/bin/shairport-sync

Do this until no more copies of shairport-sync are found.

Build and Install

Okay, now let's get the tools and sources for building and installing Shairport Sync.

First, install the packages needed by Shairport Sync:

# apt-get install build-essential git xmltoman autoconf automake libtool \
    libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev

Next, download Shairport Sync, configure it, compile and install it:

$ git clone https://github.com/mikebrady/shairport-sync.git
$ cd shairport-sync
$ autoreconf -fi
$ ./configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd
$ make
$ sudo make install

By the way, the autoreconf step may take quite a while on a Raspberry Pi -- be patient!

Now to configure Shairport Sync. Here are the important options for the Shairport Sync configuration file at /etc/shairport-sync.conf:

// Sample Configuration File for Shairport Sync on a Raspberry Pi using the built-in audio DAC
general =
{
  volume_range_db = 60; 
};

alsa =
{
  output_device = "hw:0";
  mixer_control_name = "PCM";
};

The volume_range_db = 60; setting makes Shairport Sync use only the usable part of the built-in audio card mixer's attenuation range.

The next step is to enable Shairport Sync to start automatically on boot up:

# systemctl enable shairport-sync

Finally, either reboot the Pi or start the shairport-sync service:

# systemctl start shairport-sync

The Shairport Sync AirPlay service should now appear on the network with a service name made from the Pi's hostname with the first letter capitalised, e.g. hostname raspberrypi gives a service name Raspberrypi. You can change the service name and set a password in the configuration file.

Connect and enjoy...