audio: add PipeWire+BT audio-bridge, mopidy (Qobuz+local), librespot (Spotify Connect)
- audio-bridge: alpine + pipewire + pipewire-pulse + wireplumber + bluez + dbus + tini Routes audio from librespot/mopidy/phone-BT to USB DAC (Q5K) via ALSA. Privileged + host network for bluetoothd HCI access. - mopidy: built from python:3.12-slim-bookworm + pip (no ghcr.io dep). Qobuz (auth from developer.qobuz.com) + local files. PA bridge to audio-bridge. - librespot: built from rust:1.85.1 on RPi (cross-compile too slow under qemu). Spotify Connect target named 'Klubhaus'. PA bridge to audio-bridge. Both mopidy and librespot build locally to avoid ghcr.io auth/rate-limit issues. PEQ stays on Q5K side (Qudelix app, 20 bands) for source-independent EQ.
This commit is contained in:
@@ -78,4 +78,71 @@ services:
|
||||
FLASH_DURATION_SECONDS: "14"
|
||||
TZ: America/Los_Angeles
|
||||
|
||||
# Audio router: PipeWire + WirePlumber + PulseAudio bridge + BlueZ.
|
||||
# Routes audio from librespot / mopidy / phone-Bluetooth to USB DAC (Q5K)
|
||||
# via ALSA. Falls back to RPi 3.5mm / HDMI if no USB DAC.
|
||||
# PEQ is applied on the DAC side (Q5K's Qudelix app, 20 bands), not here.
|
||||
audio-bridge:
|
||||
build: ./audio-bridge
|
||||
container_name: audio-bridge
|
||||
restart: unless-stopped
|
||||
privileged: true
|
||||
network_mode: host
|
||||
devices:
|
||||
- /dev/snd:/dev/snd
|
||||
volumes:
|
||||
- /run/dbus:/run/dbus # system DBus (bluetoothd, wireplumber)
|
||||
- /run/user/0:/run/user/0 # PipeWire runtime dir
|
||||
cap_add:
|
||||
- SYS_ADMIN # bluetoothd needs CAP_SYS_ADMIN for HCI
|
||||
- NET_ADMIN
|
||||
|
||||
# Spotify Connect: phone's Spotify app shows "Klubhaus" as a Connect target.
|
||||
# Outputs audio to audio-bridge via PulseAudio (localhost:4713).
|
||||
# Built locally on RPi (cross-compile is too slow under qemu).
|
||||
librespot:
|
||||
build: ./librespot
|
||||
image: infra-librespot:latest
|
||||
container_name: librespot
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- audio-bridge
|
||||
network_mode: host
|
||||
command: >
|
||||
--name "Klubhaus"
|
||||
--backend pulseaudio
|
||||
--bitrate 320
|
||||
--initial-volume 100
|
||||
--enable-audio-cache
|
||||
--cache /var/cache/librespot
|
||||
volumes:
|
||||
- librespot_cache:/var/cache/librespot
|
||||
|
||||
# Mopidy: Qobuz + local files + internet radio. Web UI on http://rpi:6680.
|
||||
# Outputs audio to audio-bridge via PulseAudio (localhost:4713).
|
||||
# Get Qobuz app_id + secret from https://developer.qobuz.com/api/v1/oauth
|
||||
# Built locally from python:3.12-slim + pip install (no ghcr.io image).
|
||||
mopidy:
|
||||
build: ./mopidy
|
||||
image: infra-mopidy:latest
|
||||
container_name: mopidy
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- audio-bridge
|
||||
network_mode: host
|
||||
ports:
|
||||
- "6680:6680"
|
||||
volumes:
|
||||
- ./mopidy/data:/var/lib/mopidy
|
||||
- ./mopidy/music:/music # drop FLACs in infra/mopidy/music/
|
||||
environment:
|
||||
TZ: America/Los_Angeles
|
||||
QOBUZ_APP_ID: "${QOBUZ_APP_ID:-}"
|
||||
QOBUZ_APP_SECRET: "${QOBUZ_APP_SECRET:-}"
|
||||
QOBUZ_USERNAME: "${QOBUZ_USERNAME:-}"
|
||||
QOBUZ_PASSWORD: "${QOBUZ_PASSWORD:-}"
|
||||
|
||||
volumes:
|
||||
librespot_cache:
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user