Rockbox runs a minimal Logitech Media Server that any number of squeezelite clients can attach to. A Slim Protocol TCP server accepts connections; an HTTP PCM broadcast server serves the actual audio stream.Documentation Index
Fetch the complete documentation index at: https://rockboxzig.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Connecting clients
BroadcastReceiver cursor into the shared
buffer, so adding or removing clients never blocks the writer or interrupts
playback in other rooms.
Selecting a specific output device
How it stays in sync
Rockbox sends async packet to every client once per second so they all
align to the same playback clock. The DMA loop in
firmware/target/hosted/pcm-squeezelite.c paces output to real time using
CLOCK_MONOTONIC, which keeps the broadcast buffer from drifting against
the wall clock.
Buffer behaviour
| Property | Value |
|---|---|
| Capacity | 4 MB |
| Eviction | Oldest-first when full |
| Per-client cursor | Yes — each receiver tracks its own position |
| Lagging client policy | Skip forward (does not block the writer) |
Slim Protocol details
Internal — useful if you’re debugging or building your own client.- Framing:
- client → server:
opcode[4] + u32_t length BE + payload - server → client:
u16_t length BE + opcode[4] + payload(length excludes the 2-byte length field itself)
- client → server:
- STRM
's'points clients at the HTTP port (defaults to 9999). - STMt heartbeat from the client must be answered with
audg, otherwise squeezelite’s 36-second watchdog will tear down the session. - ASCII-encoded PCM fields in the STRM packet — squeezelite subtracts
'0'frompcm_sample_size,pcm_sample_rate,pcm_channelsandpcm_endianness. Correct values:'1'(16-bit),'3'(44 100 Hz),'2'(stereo),'1'(little-endian).