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:
@@ -0,0 +1,51 @@
|
||||
# Librespot (Spotify Connect) for ARM64
|
||||
# Multi-stage: cross-compile Rust app on x86_64 builder, ship slim runtime.
|
||||
# Audio output: PulseAudio (connect to audio-bridge via TCP localhost:4713).
|
||||
|
||||
FROM rust:1.85.1-bookworm AS builder
|
||||
|
||||
# Cross-compile toolchain for aarch64
|
||||
RUN rustup target add aarch64-unknown-linux-gnu
|
||||
RUN dpkg --add-architecture arm64 \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
gcc-aarch64-linux-gnu \
|
||||
libpulse-dev:arm64 \
|
||||
libasound2-dev:arm64 \
|
||||
libssl-dev:arm64 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Build librespot. Pin to a known tag.
|
||||
ARG LIBRESPOT_VERSION=v0.8.0
|
||||
RUN git clone --depth 1 --branch ${LIBRESPOT_VERSION} \
|
||||
https://github.com/librespot-org/librespot.git /src
|
||||
WORKDIR /src
|
||||
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
|
||||
RUN cargo build --release --target aarch64-unknown-linux-gnu --no-default-features --features="pulseaudio-backend"
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
RUN dpkg --add-architecture arm64 \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
libpulse0:arm64 \
|
||||
libasound2:arm64 \
|
||||
libssl3:arm64 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /src/target/aarch64-unknown-linux-gnu/release/librespot /usr/local/bin/librespot
|
||||
|
||||
# Cache dir for Spotify credentials
|
||||
VOLUME ["/var/cache/librespot"]
|
||||
|
||||
# PulseAudio bridge is at localhost:4713 (audio-bridge)
|
||||
ENV PULSE_SERVER=tcp:127.0.0.1:4713
|
||||
|
||||
CMD ["librespot", \
|
||||
"--name", "Klubhaus", \
|
||||
"--backend", "pulseaudio", \
|
||||
"--device", "alsa_output.default", \
|
||||
"--bitrate", "320", \
|
||||
"--enable-audio-cache", \
|
||||
"--cache", "/var/cache/librespot"]
|
||||
Reference in New Issue
Block a user