Kristian8606/esp32-airplay2-surround

Hardware & IoT

Build wireless 5.1/7.1 AirPlay speakers from one ESP32-S3 board per speaker.

102
4
C++
4 days old

This project turns low-cost ESP32-S3 boards into AirPlay 2 receivers, one board per speaker, so an Apple TV can drive a wireless 5.1/7.1 surround setup without an AV receiver, hub, or speaker cables. Each board announces 5.1/7.1 support, receives the full multichannel stream, decodes only its assigned channel, and plays it on both outputs; timing comes from the Apple TV's PTP clock, so the boards never coordinate directly.

What changes in a real setup

Instead of one AV receiver driving eight wired speakers, you flash the same firmware to each board and set its position (Front Left, Centre, Subwoofer, Rear Right, etc.) in the web page, even during playback. Building the surround group is just adding boards to the Apple TV's AirPlay group; the centre is worth building early because it carries most dialogue. The author reports about 31–34% of one CPU core for one 7.1 speaker, made possible by a patched Fraunhofer FDK AAC decoder that synthesises only the selected channel technical details.

Requirements per speaker

Each position needs an ESP32-S3 board with 8 MB flash and 8 MB PSRAM (N8R8); boards without PSRAM, or with 2 MB, will not work because the stream buffer alone takes 6 MB. You also need an I2S amplifier (e.g. MAX98357A) or an I2S DAC (e.g. PCM5102A) plus any amplifier, one 4–8 Ω speaker or a woofer/tweeter pair, and a suitable power supply what you need. Wiring is five I2S wires, with GPIO defaults changeable in menuconfig assembly.

A 5.1 system uses six boards, 7.1 uses eight, and two or three is a valid start what you need. An Apple TV is required for surround; iPhone, iPad, and Mac send stereo only. The network must be 2.4 GHz, and every board receives the full stream, so signal quality at each speaker matters.

Setup and updates

Firmware is built with ESP-IDF v6.0.2 per Espressif's installation guide installation. After a first USB flash, later versions can be installed over Wi-Fi via the board's web page. Setup itself runs from a phone or laptop: join the board's ESP32-AirPlay-Setup access point, choose the Wi-Fi network, then name the board and pick its speaker position first start.

The web interface covers EQ and crossovers (up to 24 biquad filters per output), loudness, output latency, firmware updates, and live logs settings. Setting a Web UI admin password in menuconfig restricts firmware updates, restart, Wi-Fi and name changes, and the latency test to user admin settings.

Documented limits

This is experimental and tested with one Apple TV; multichannel has only been seen from the Apple TV limitations. There is no bass management: the Subwoofer position plays only the LFE channel, not other speakers' bass, so fronts must reproduce their own bass. Rear and side channels are often nearly silent in music. 7.1 Front/Side naming is not yet confirmed by listening test. Mono mix decodes all channels and may not keep up with 7.1. Switching 44.1↔48 kHz causes a short silence while I2S reconfigures.

Licensing

The FDK AAC component is a modified third-party library under the Fraunhofer FDK license; that license grants no patent rights, and AAC patent licenses are separate licenses. The rest of the repository has no license file, so no license is granted beyond viewing it on GitHub — a significant constraint if you plan to redistribute or build on the code.

Written by AI from the project's README, updated October 29, 2026. The project's own docs are the source of truth.