aka Multiroom AirPlay audio. Multiroom/мультурум. Distributed sound беспроводные распределённые колонки на /rpi zero, выкл по уходу, вкл по приходу, + в ванной

Music, Sound, Multiroom, Raspberry Pi

Linux/rpi AirPlay client: Shairport-sync

Audio distribution with Raspberry Pi

Распределенный музыкальный плейер на Raspberry Pi

Установка и настройка AirPlay-приемника на Raspberry Pi 3

Написано про переключение драйвера и встроен Shairport для «улучшения звука»


apply conf

/etc/shairport-sync.conf (не забыть раскоментить!)

general = {
  // ...
  name = "Kitchen — %H"
  volume_range_db = 40; // <https://github.com/mikebrady/shairport-sync/issues/525>
sessioncontrol = {
  allow_session_interruption = "yes"; // set to "yes" to allow another device to interrupt Shairport — <https://github.com/mikebrady/shairport-sync/issues/599>

//	"active" state starts when play begins and ends when the active_state_timeout has elapsed after play ends, unless another play session starts before the timeout has fully elapsed.
	active_state_timeout = 30.0;

// log_verbosity = 2;

mqtt =
	enabled = "yes"; // set this to yes to enable the mqtt-metadata-service
	hostname = ""; // Hostname of the MQTT Broker
	port = 1883; // Port on the MQTT Broker to connect to
//	username = "username"; //set this to a string to your username in order to enable username authentication
//	password = "password"; //set this to a string you your password in order to enable username & password authentication
	topic = "shairport"; //MQTT topic where this instance of shairport-sync should publish. If not set, the general.name value is used.
//	publish_raw = "no"; //whether to publish all available metadata under the codes given in the 'metadata' docs.
	publish_parsed = "yes"; //whether to publish a small (but useful) subset of metadata under human-understandable topics
	publish_cover = "yes"; //whether to publish the cover over mqtt in binary form. This may lead to a bit of load on the broker
//	enable_remote = "no"; //whether to remote control via MQTT. RC is available under `topic`/remote.

sudo systemctl restart shairport-sync

rpi volume

amixer cset numid=1 -- 100 # 100% volume (с hifiberry надо как-то по другому, можно через alsamixer)

sudo alsactl store # save volume and etc settings

add bins: vol, get-vol (rpi-bins)