Listening to Apple Music with passive speakers
By Patineboot

I am watching the water flows downstream through the bush.
Abstract
- Audio System
- Install Shairport Sync into Raspberry Pi OS
- Add Apple Home system
- Configure Shairport Sync
- Misc
- Reference
Audio System

Yamaha NS-BP200 and Fosi Bluetooth 5.0 Amplifier connected.
Hardware List:
- Raspberry Pi 4B 2GB made by Raspberry Pi Foundation.
- Fosi Audio Bluetooth 5.0 Amplifier(Model: ZK1002D) made by Fosi Audio.
- NS-BP200 constructed by Yamaha Corporation.
- A USB cable with type A to type Micro-B
Software List on Raspberry Pi:
- Raspberry Pi OS (64-bit) 2023-05-03
- Shairport Sync 4.1.1-5
Shairport Sync is an AirPlay audio player for Linux and FreeBSD. - NQPTP 1.1-dev-173
nqptp is a daemon that monitors timing data from any PTP clocks.
Install Shairport Sync into Raspberry Pi OS
Shairport Sync provides a building guide.
See the Build and Install Shairport Sync page.
According to a building guide, you will install NQPTP, see README on NQPTP for installing NQPTP, before installing Shairport Sync.
Note: you may use the sudo
command with make install
.
Add Apple Home app
Shairport Sync provides help to add your device to Apple Home app.
See the Adding to Home page.
Configure Shairport Sync
Shairport Sync outputs sound to the earphone device by default on Raspberry Pi. You change the sound output of Shairport Sync to Fosi Audio Bluetooth.
Show audio devices on the Raspberry Pi:
$ aplay -l
card 1: BR21 [JieLi BR21], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
You found the ‘BR21’ name of the audio device.
Set the “plughw:BR21” device name to the output_device variable in the /etc/shairport-sync.conf.
/etc/shairport-sync.conf:
alsa =
{
output_device = "plughw:BR21";
}
Note: a ‘plughw’ tag may be a ‘hw’ tag like ‘hw:BR21’.
Misc
Show audio devices on the Raspberry Pi with the command shairport-sync
.
$ shairport-sync -h
(snip)
hardware output devices:
"hw:BR21"
"hw:Headphones"
"hw:vc4hdmi0"
"hw:vc4hdmi1"
References
-
Shairport Sync: AirPlay and AirPlay 2 audio player
- Author: Mike Brady
- URL: https://github.com/mikebrady/shairport-sync
- Summary: Shairport Sync is an AirPlay audio player for Linux and FreeBSD.
-
nqptp: Not Quite PTP
- Author: Mike Brady
- URL: https://github.com/mikebrady/nqptp
- nqptp is a daemon that monitors timing data from any PTP clocks ā up to 64 ā it sees on ports 319 and 320.
-
Raspberry Pić§AirMac Expressć®ä»£ęæćē®ęć (AirPlayć®å°å „ć¾ć§)
- Author: @hebereke
- URL: https://qiita.com/hebereke/items/1d0bbee951845f85732e
- a making the AirPlay2 device which is made from Webmin, Shairport Sync, Docker, Portainer, and more.