Skip to content

airplay: sync the volume both ways and light the ring on connect - #21

Merged
yawaflua merged 1 commit into
stagefrom
airplay-volume-sync
Oct 31, 2026
Merged

yawaflua merged 1 commit into
stagefrom
airplay-volume-sync

Conversation

@yawaflua

Copy link
Copy Markdown
Owner

On speakers without capsule-mini-tweaker the AirPlay bundle leaves shairport-sync without metadata and with its own software volume. The airplay plugin then sees nothing: the ring stays dark, and the phone's slider attenuates the stream inside shairport-sync while the speaker's volume (shown on the display and in the panel) never changes.

  • install: after the bundle's installer, enable the metadata pipe (/tmp/shairport-sync-metadata) and ignore_volume_control in /etc/shairport-sync.conf, then restart shairport-sync. An already tuned config is left alone.
  • agent: send speaker plugins a new volume event (level, muted) on every volume change: voice, keys, panel, plugins. Plugins subscribe by kind, so existing ones are unaffected; documented in README and sdk/README.
  • airplay plugin (1.2.0):
    • phone slider → volume.set on the speaker (pvol metadata, −30…0 dB ↔ 0…100%, −144 = mute);
    • speaker volume → phone slider via shairport-sync's SetAirplayVolume (dbus-send), without echoing a change back to where it came from;
    • dim ring while a phone has the speaker chosen but is silent;
    • with /run/capsule-controls.sock present the bundle's ap2-bridge already syncs the volume, so the plugin only lights the ring. Works together with agent: optional Capsula Mini volume via capsule-ipc #15.

Tests: installer config tuning, dB ↔ level round trip for every level, echo suppression, the bridged case. gofmt, go vet, go test -race, node --check pass.

Not tested on a real speaker yet.

@yawaflua
yawaflua merged commit 2efb48e into stage Oct 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant