[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-105306":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":8,"pushedAt":8,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},105306,"esp32-airplay2-surround","Kristian8606\u002Fesp32-airplay2-surround","Kristian8606",null,"C++",135,7,4,1,0,10,20,40,2.71,false,"main",true,[],"2026-11-02 02:04:45","\u003Cp align=\"center\">\n  \u003Cb>Enjoying this project?\u003C\u002Fb> It is built and tested in my free time. A small\n  donation helps buy test hardware and keeps the development going. Thank you! ❤️\n  \u003Cbr>\u003Cbr>\n  \u003C!-- DONATION LINK: replace the # in href=\"#\" below with your donation link -->\n  \u003Ca href=\"#\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDonate-Support%20this%20project-ff5e5b?style=for-the-badge&logo=githubsponsors&logoColor=white\" alt=\"Donate\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"images\u002Fairplay-surround-dark.png\">\u003Cimg src=\"images\u002Fairplay-surround-dark.png\" alt=\"ESP32 AirPlay 2 Surround 7.1\" width=\"100%\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n# ESP32 AirPlay 2 Surround 7.1\n\n**Wireless 5.1 \u002F 7.1 surround sound from an Apple TV, built from low-cost\nESP32-S3 boards: one board per speaker.**\n\nEvery board is a full **AirPlay 2 receiver**. It receives the complete\nsurround stream from the Apple TV, decodes **only its own channel**\n(Front Left, Centre, Subwoofer, Rear Right, …) and plays it through any\namplifier and speaker you like. The Apple TV keeps all boards in sync\nthrough AirPlay 2's **PTP clock**, the same way it drives its own HomePods.\nNo cables between the speakers, no AV receiver, no hub.\n\n- 🎬 **5.1 and 7.1 AAC** (Apple Music Dolby Atmos, films and series from the\n  Apple TV apps).\n- 🎵 **Stereo** too: ALAC 44.1 kHz\u002F16-bit and **lossless 48 kHz\u002F24-bit**, AAC\n  44.1 \u002F 48 kHz. With a stereo source every board simply plays stereo.\n- 🔀 **Format changes on the fly**: the Apple TV can switch between stereo and\n  surround from track to track; the board follows without reconnecting.\n- 🎛️ **Web interface** for everything: speaker position, 2 × 24-band\n  parametric EQ \u002F crossover, loudness, latency, Wi-Fi, firmware updates, live\n  logs.\n- ⚡ About **a third of one CPU core** for one speaker of 7.1, thanks to a\n  patched Fraunhofer FDK AAC decoder that synthesises just one channel.\n\n> [!NOTE]\n> **The project is under active development.** Features, defaults and wiring\n> may still change, and this README is updated with every change. Tested with\n> an Apple TV; see [Limitations](#limitations).\n\n## Contents\n\n- [Gallery](#gallery)\n- [How it works](#how-it-works)\n- [What you need](#what-you-need)\n- [Assembly and wiring](#assembly-and-wiring)\n- [Installation](#installation)\n- [First start](#first-start)\n- [Settings](#settings)\n- [Technical details](#technical-details)\n- [Limitations](#limitations)\n- [Troubleshooting and logs](#troubleshooting-and-logs)\n- [Licenses and credits](#licenses-and-credits)\n\n## Gallery\n\nClick an image to open it full size.\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd align=\"center\" width=\"50%\">\n      \u003Ca href=\"images\u002Fwiring-max98357a.png\">\u003Cimg src=\"images\u002Fwiring-max98357a.png\" alt=\"ESP32-S3 + MAX98357A I2S amplifier + speaker\" width=\"100%\">\u003C\u002Fa>\n      \u003Cbr>\u003Csub>\u003Cb>Simplest build:\u003C\u002Fb> ESP32-S3 + MAX98357A I2S amplifier + one speaker\u003C\u002Fsub>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"50%\">\n      \u003Ca href=\"images\u002Fwiring-pcm5102a-2way.jpg\">\u003Cimg src=\"images\u002Fwiring-pcm5102a-2way.jpg\" alt=\"ESP32-S3 + PCM5102A DAC + 2-channel amplifier, woofer and tweeter\" width=\"100%\">\u003C\u002Fa>\n      \u003Cbr>\u003Csub>\u003Cb>Active 2-way build:\u003C\u002Fb> ESP32-S3 + PCM5102A DAC + 2-channel amplifier, woofer + tweeter\u003C\u002Fsub>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"center\" colspan=\"2\">\n      \u003Ca href=\"images\u002Fairplay-surround-light.png\">\u003Cimg src=\"images\u002Fairplay-surround-light.png\" alt=\"Surround setup around a TV\" width=\"60%\">\u003C\u002Fa>\n      \u003Cbr>\u003Csub>One board in every speaker, all fed wirelessly by the Apple TV\u003C\u002Fsub>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n## How it works\n\nThe Apple TV can send surround sound over AirPlay 2, but only to receivers\nthat say they accept it. When it does, **every receiver in the group gets the\nwhole multichannel stream**, and all of them play each sample at the same\nmoment because they share one PTP clock.\n\nThis project builds on exactly that:\n\n1. **Every board announces 5.1 and 7.1.** The Apple TV then sends the\n   multichannel stream to all boards in the group.\n2. **Every board decodes only its own channel.** One ESP32-S3 cannot decode\n   all eight channels in real time, and it does not need to.\n3. **Every board plays that channel on both outputs** of its DAC or amplifier\n   (L = R), so you can drive one speaker, two drivers (woofer + tweeter) or a\n   subwoofer amplifier.\n4. **The boards never talk to each other.** Timing comes from the Apple TV,\n   so adding a speaker is just adding one more board to the AirPlay group.\n\nYou choose each board's position (Front Left, Centre, Subwoofer, …) in its\nweb page, even while music is playing. Start with two or three speakers and\nadd the rest later.\n\n```\n                 Apple TV  (5.1 \u002F 7.1 AAC over Wi-Fi, PTP clock)\n                     │\n   ┌─────────┬───────┼───────┬─────────┬─────────┐\n   ▼         ▼       ▼       ▼         ▼         ▼\n ESP32     ESP32   ESP32   ESP32     ESP32     ESP32   (… up to 8)\n Front L   Centre  Front R  Sub      Side L    Side R\n   │         │       │       │         │         │\n  amp       amp     amp     amp       amp       amp\n   │         │       │       │         │         │\n speaker  speaker speaker  subwoofer speaker  speaker\n```\n\n## What you need\n\n### Per speaker (one set for every position)\n\n| Part | Notes |\n|---|---|\n| **ESP32-S3 board with 8 MB flash and 8 MB PSRAM** (N8R8), e.g. ESP32-S3-DevKitC-1 N8R8 | PSRAM is required: the stream buffer alone takes 6 MB. Boards without PSRAM (or with 2 MB) will not work. |\n| **Audio output**, one of: | |\n| &nbsp;&nbsp;• an **I2S amplifier** such as **MAX98357A** | Simplest: digital in, speaker out, about 3 W. Good for small satellites and surrounds. |\n| &nbsp;&nbsp;• an **I2S DAC** such as **PCM5102A** + **any analogue amplifier** | Any size: mini (PAM8403, 2 × 3 W), medium or powerful (TPA3110 \u002F TPA3116, TDA7498, a plate amplifier for a subwoofer…), **one- or two-channel**. |\n| **Speaker(s)**, 4–8 Ω | One full-range driver, or a woofer + tweeter pair (see [Option B](#option-b--dac--any-amplifier)). |\n| **Power supply** | 5 V USB (≥ 1 A) for the ESP32-S3; a separate supply for a larger amplifier (e.g. 12 V ≥ 2 A, as your amplifier requires). |\n| **Enclosure** | 3D-printed, wooden or an existing speaker box. |\n| Jumper wires or a small PCB | 5 wires for the I2S connection. |\n\n### Number of boards\n\n| System | Boards | Positions |\n|---|---|---|\n| 5.1 | 6 | Front L, Front R, Centre, Subwoofer, Side L, Side R |\n| 7.1 | 8 | the 5.1 positions + Rear L, Rear R |\n| Start small | 2–3 | e.g. Front L + Front R (+ Centre) |\n\nA channel without a board is simply not played. The **centre carries most of\nthe dialogue**, so build it early.\n\n### Sender and network\n\n- An **Apple TV** (surround is sent only by the Apple TV; an iPhone, iPad or\n  Mac sends stereo to these boards).\n- A **2.4 GHz Wi-Fi** network with good coverage at every speaker (the\n  ESP32-S3 has no 5 GHz radio). Each board receives the full surround stream,\n  so a solid signal matters more than with a single speaker.\n\n## Assembly and wiring\n\n> [!NOTE]\n> The GPIOs below are the defaults and can be changed in `menuconfig`\n> (see [Installation](#installation)). Wiring options may be extended in\n> future versions; this section will be updated.\n\n### Option A — I2S amplifier (MAX98357A)\n\n\u003Ca href=\"images\u002Fwiring-max98357a.png\">\u003Cimg src=\"images\u002Fwiring-max98357a.png\" alt=\"MAX98357A wiring\" width=\"420\" align=\"right\">\u003C\u002Fa>\n\n| ESP32-S3 | MAX98357A |\n|---|---|\n| GPIO 5 | BCLK |\n| GPIO 6 | LRC (WS) |\n| GPIO 4 | DIN |\n| 5V | VIN |\n| GND | GND |\n\n- Speaker to **SPK+ \u002F SPK−** (4–8 Ω).\n- Leave **SD** and **GAIN** unconnected (default: (L+R)\u002F2 output, 9 dB gain).\n  Because both I2S slots carry the same channel, the result is that channel\n  at full level.\n- At full volume the amplifier draws up to ~1 A from 5 V: use a good USB\n  supply and short power wires.\n\n\u003Cbr clear=\"right\">\n\n### Option B — DAC + any amplifier\n\n\u003Ca href=\"images\u002Fwiring-pcm5102a-2way.jpg\">\u003Cimg src=\"images\u002Fwiring-pcm5102a-2way.jpg\" alt=\"PCM5102A wiring with a 2-channel amplifier\" width=\"420\" align=\"right\">\u003C\u002Fa>\n\n| ESP32-S3 | PCM5102A |\n|---|---|\n| GPIO 5 | BCK |\n| GPIO 6 | LCK (LRCK \u002F WS) |\n| GPIO 4 | DIN |\n| 5V | VIN |\n| GND | GND |\n| — | SCK: not used (connect to GND, or close the module's SCK bridge) |\n\nOn the common purple PCM5102A module check the solder jumpers on the back:\n**FLT = L, DEMP = L, XSMT = H** (otherwise the DAC stays muted), **FMT = L**\n(I2S).\n\nThe DAC's **L OUT** and **R OUT** carry the same speaker channel, which lets\nyou use **any amplifier, small or powerful, one- or two-channel**:\n\n| Amplifier | Connection | Setup on the EQ page |\n|---|---|---|\n| **One channel** (mono amp, a single side of a stereo amp, a subwoofer plate amp) | L OUT → amp input | nothing; for a subwoofer add a low-pass filter if the amp has none |\n| **Two channels, one full-range speaker** | L OUT → amp, use one channel | nothing |\n| **Two channels, active 2-way (woofer + tweeter)** | L OUT → CH1 → **woofer**, R OUT → CH2 → **tweeter** | a crossover: low-pass on the **Left output**, high-pass on the **Right output** |\n| **Powered speaker \u002F active subwoofer** | L\u002FR OUT → its line input | nothing |\n\n**Active 2-way crossover** (one example, adjust to your drivers):\n\n1. Open `http:\u002F\u002F\u003Cboard-ip>\u002Feq` and tick **Enable EQ and preamp**.\n2. **Left Output Filters** (woofer): two **LP** filters at the crossover\n   frequency (e.g. 2500 Hz), **Q 0.707** each. Two stacked Butterworth\n   filters make a 24 dB\u002Foct Linkwitz-Riley slope.\n3. **Right Output Filters** (tweeter): two **HP** filters at the same\n   frequency, **Q 0.707** each.\n4. Tweeters are usually louder: lower the **Right preamp** until both\n   drivers sound balanced. Add peak or shelf filters to correct each\n   driver's response.\n5. **Apply & Save**: the change is live and stored, no restart needed.\n\n> [!WARNING]\n> Always set the tweeter's high-pass **before** playing loud. Full-range\n> bass destroys a tweeter in seconds. The per-output **Mute** buttons on the\n> EQ page help while setting up.\n\n**Power:** the ESP32-S3 and the DAC run from USB 5 V; a larger amplifier gets\nits own supply (e.g. 12 V ≥ 2 A). Connect the grounds of the DAC and the\namplifier (the signal ground), and keep the amplifier's power wires away\nfrom the I2S wires.\n\n\u003Cbr clear=\"right\">\n\n### Optional extras\n\n| Function | Default GPIO | Notes |\n|---|---|---|\n| Amplifier enable \u002F standby | 21 | switches the amplifier on while AirPlay plays; active high or low |\n| WS2812 RGB VU LED | 38 | the on-board LED of many DevKitC boards |\n| Buttons: play\u002Fpause, next, previous, volume − \u002F + | disabled | any free GPIO |\n| Wired latency measurement (ADC loopback) | 7 | DAC output → coupling capacitor + bias divider → ADC pin |\n\n## Installation\n\n### 1. Install ESP-IDF\n\nThe firmware is built with **ESP-IDF v6.0.2**. Follow Espressif's\n[installation guide](https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesp-idf\u002Fen\u002Flatest\u002Fesp32s3\u002Fget-started\u002Findex.html),\nthen open a terminal with the ESP-IDF environment loaded\n(`source ~\u002Fesp-idf\u002Fexport.sh`, or the path where you installed it).\n\n### 2. Get the code\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FKristian8606\u002Fesp32-airplay2-surround.git\ncd esp32-airplay2-surround\n```\n\n### 3. Configure (optional)\n\n```bash\nidf.py set-target esp32s3\nidf.py menuconfig\n```\n\n| Menu | What you can set |\n|---|---|\n| **I2S Playout** | BCLK \u002F LRCK \u002F DATA \u002F MCLK GPIOs, output latency of your DAC |\n| **Multichannel Experiment** | surround on\u002Foff, default speaker position |\n| **AirPlay Receiver** | setup Wi-Fi name and password, hardware buttons |\n| **Amplifier Power Control** | amplifier enable GPIO and level |\n| **RGB Audio\u002FVU LED** | LED on\u002Foff and GPIO |\n| **AirPlay Logs and Diagnostics** | log detail, web admin password |\n\nThe speaker position can also be changed later in the web page, so every\nboard can run the same firmware.\n\n### 4. Build and flash\n\nConnect the board over USB and run:\n\n```bash\nidf.py build\nidf.py -p \u002Fdev\u002Fcu.usbmodem* flash monitor\n```\n\nOn Windows the port is `COMx`, on Linux usually `\u002Fdev\u002FttyACM0`. Repeat the\nflash step for every board.\n\n### 5. Updates\n\nLater versions can be installed **over Wi-Fi**: on the board's main page,\n**Firmware Update** → choose `build\u002Fairplay-esp32_\u003Cversion>.bin` →\n**Upload Firmware**. The web interface is part of the firmware and is updated\nwith it.\n\n## First start\n\n1. **Connect to Wi-Fi.** A new board opens the access point\n   **`ESP32-AirPlay-Setup`**. Join it with a phone or laptop; the setup page\n   opens by itself (or go to `http:\u002F\u002F192.168.4.1\u002F`). Choose your network,\n   enter the password, **Connect to WiFi**.\n2. **Name the board.** Find its IP address in your router (or the serial log),\n   open `http:\u002F\u002F\u003Cboard-ip>\u002F` and set **AirPlay Device Name**, e.g.\n   *Surround Front Left*. Clear names make the Apple TV list easy to read.\n3. **Choose the position.** Open `http:\u002F\u002F\u003Cboard-ip>\u002Feq`, card\n   **Surround speaker (5.1 \u002F 7.1)**, pick the position. It is saved and\n   applies immediately.\n4. **Add the boards on the Apple TV.** Open Control Center on the Apple TV,\n   select the **AirPlay \u002F audio output** icon and **tick every board**. They\n   now play together as one group.\n5. **Play** something in surround (Apple Music Dolby Atmos or a film). Each\n   board's EQ page shows what it is playing right now, e.g.\n   *AAC-LC · 48 kHz · 7.1 · Front Left*.\n\n> [!TIP]\n> Other AirPlay speakers can stay in the group. In our tests the Apple TV\n> still sends 5.1 \u002F 7.1 to these boards when a HomePod is in the group too;\n> it decides the format for each receiver separately.\n\n### Speaker positions\n\n| Position | Where to put it | Notes |\n|---|---|---|\n| Front Left \u002F Right (L \u002F R) | ~30° left \u002F right of the screen | main pair; music and effects |\n| Centre (C) | above or below the screen | most of the dialogue |\n| Subwoofer (LFE) | anywhere low, often near a corner | only the low-frequency effects channel |\n| Side Left \u002F Right (Ls \u002F Rs) | beside the listener, ~90–110° | the surround pair of 5.1 |\n| Rear Left \u002F Right (Lrs \u002F Rrs) | behind the listener, ~135–150° | 7.1 only; with a 5.1 stream they play Side L \u002F R |\n| Mono mix | anywhere | every channel except LFE in one speaker; uses the most CPU |\n\n> [!IMPORTANT]\n> The **Subwoofer** position plays only the LFE channel (the extra bass\n> effects of films), **not** the bass of the other speakers. There is no bass\n> management, so the front speakers should reproduce reasonable bass on their\n> own. With music the LFE channel is often silent; with films it is busy.\n\n## Settings\n\nEverything is configured in the browser at `http:\u002F\u002F\u003Cboard-ip>\u002F`.\n\n### Main page\n\n| Card | What it does |\n|---|---|\n| **Playback** | play\u002Fpause, next, previous and volume of the current AirPlay sender |\n| **WiFi Network** | scan and change the network |\n| **Device Settings** | the AirPlay name |\n| **Output Latency** | delay of your hardware after the ESP (DAC, DSP), so all speakers stay in sync; *Measure* runs a wired loopback test |\n| **Firmware Update** | OTA update with a `.bin` file |\n| **System** | IP, MAC, memory, firmware, uptime, reset reason, Wi-Fi signal and channel; restart |\n| **Audio EQ \u002F System Logs \u002F WiFi Speedtest** | links to the pages below |\n\n### Audio EQ page (`\u002Feq`)\n\n| Card | What it does |\n|---|---|\n| **Surround speaker (5.1 \u002F 7.1)** | position of this board; shows the current format and channel |\n| **Source** | stereo \u002F mono \u002F left \u002F right routing for stereo sources (no effect on surround: both outputs carry the chosen speaker) |\n| **Loudness** | ISO 226 loudness compensation: restores bass and treble at low volume |\n| **Left \u002F Right Output Filters** | two independent chains of up to **24 biquad filters** each: peak, low-pass, high-pass, band-pass, notch, low shelf, high shelf; a **preamp** and a **mute** button per output |\n| **Apply & Save** | applies live and stores in flash |\n\n### Other pages\n\n- **`\u002Flogs`**: live log of the board over WebSocket.\n- **`\u002Fspeedtest`**: ping, download and upload between the browser and the\n  board, to check Wi-Fi at the speaker's position.\n\n**Security:** with a **Web UI admin password** set in `menuconfig`, firmware\nupdates, restart, Wi-Fi and name changes and the latency test require the\nuser `admin` and that password.\n\n## Technical details\n\n### Audio formats\n\nThe receiver advertises these formats and the Apple TV chooses one per\nstream:\n\n| Transport | Codec | Rate | Channels | Frames \u002F packet |\n|---|---|---|---|---|\n| Realtime UDP (type 96) | ALAC 16-bit | 44.1 kHz | 2 | 352 |\n| Buffered TCP (type 103) | ALAC 16-bit | 44.1 kHz | 2 | 352 |\n| Buffered TCP (type 103) | ALAC 24-bit (lossless) | 48 kHz | 2 | 352 |\n| Buffered TCP (type 103) | AAC-LC | 44.1 \u002F 48 kHz | 2 | 1024 |\n| Buffered TCP (type 103) | AAC-LC | 48 kHz | **6 (5.1) \u002F 8 (7.1)** | 1024 |\n\n- **The Apple TV decides the format**, for each receiver from the formats\n  it announces and, for each track, from what the content offers. A stereo\n  speaker in the same group (e.g. a HomePod) does not stop these boards from\n  getting 5.1 \u002F 7.1.\n  An \"Atmos\" label in Apple Music does not guarantee a 7.1 stream; some\n  tracks arrive as stereo. YouTube sends stereo only.\n- **Format changes mid-stream.** Every audio packet carries its format in the\n  RTP SSRC. The board switches codec, channels, bit depth or rate per packet,\n  without a new SETUP. A codec or channel change at the same rate keeps the\n  queued audio; a rate change (44.1 ↔ 48 kHz) restarts I2S at the right\n  moment with a short gap, and the timeline stays continuous.\n\n### Channels\n\n5.1 and 7.1 arrive as AAC-LC with channel configuration 6 or 7. The decoder\nreads the channel labels of every stream and finds the selected speaker **by\nname**, so one setting works for 5.1 and 7.1 and survives format changes.\n\n| Stream | Channel order (AAC elements) |\n|---|---|\n| 5.1 (config 6) | C · L R · Ls Rs · LFE |\n| 7.1 (config 7) | C · L R · Ls Rs (side) · Lrs Rrs (rear) · LFE |\n\nWith 5.1 the Rear positions play Side L \u002F R, so a 7.1 set of boards also\nworks with 5.1 content.\n\n> [!NOTE]\n> **7.1 naming.** The names above follow Apple's 7.1 order (first pair\n> front, second pair side, back pair rear). The ISO reading of configuration 7\n> names the first pairs differently. A listening test with a 7.1 channel\n> test signal is in progress; if Front and Side turn out swapped, a setting\n> will be added and this README updated.\n\n### Decoding and signal path\n\n1. **AAC** is decoded with **Fraunhofer FDK AAC**, patched to synthesise\n   only the selected channel: the bits of all channels are read, but only the\n   element that holds the selected speaker is inverse quantised, filtered and\n   transformed. Output is signed 32-bit, straight to float, without a 16-bit\n   step. **ALAC** uses Espressif's decoder; 24-bit samples also go straight to\n   float.\n2. **DSP** in 32-bit float: EQ \u002F crossover, loudness, volume.\n3. **I2S** with 32-bit samples at the stream's rate: 44.1 or 48 kHz for\n   stereo, 48 kHz for surround. The selected speaker goes to **both slots**\n   (L = R).\n\n### Synchronisation\n\nPlayback is scheduled from the Apple TV's **PTP clock**: each packet carries\nan RTP timestamp, and the board plays every sample at the time the sender\nasked for. The I2S clock is fine-tuned live to follow the sender, so the\nboards stay together over hours. The **output latency** of your DAC or DSP\nis taken into account, so the sound leaves every speaker at the same moment.\n\n### Performance and memory\n\n| | |\n|---|---|\n| CPU, one speaker of 7.1 | ~31–34 % of one core (measured on a rear speaker) |\n| Decode task stack | 20 KiB in PSRAM (deepest use ~11 KiB) |\n| Compressed stream buffer | 6 MB in PSRAM |\n| Free PSRAM during 7.1 | ~400 KiB |\n\n| Core 0 | Core 1 |\n|---|---|\n| AAC decoding, RTSP, PTP | Wi-Fi, LwIP, stream reader, I2S playout, status \u002F LED \u002F log tasks |\n\nThe FDK changes (single-channel synthesis, 32-bit output, hardware bit\ncounting on the ESP32-S3, element skipping, smaller buffers, lazy limiter)\nare listed in\n[`components\u002Ffdk_aac\u002FMODIFICATIONS.md`](components\u002Ffdk_aac\u002FMODIFICATIONS.md).\n\n## Limitations\n\n- **Experimental**, tested with one Apple TV. Multichannel has only been seen\n  from the Apple TV; other Apple devices send stereo.\n- **Rear and side channels are often nearly silent in music**; they come\n  alive with films and Atmos mixes.\n- **No bass management**: the Subwoofer position plays only LFE.\n- The **7.1 Front \u002F Side naming** is not yet confirmed (see\n  [Channels](#channels)).\n- **Mono mix** decodes all channels and may not keep up with 7.1.\n- A switch between 44.1 and 48 kHz has a short silence while I2S is\n  reconfigured.\n- Some video apps take 20–30 s from the start of AirPlay to the first audio\n  (seen with HBO); that is the sender.\n- **Realtime ALAC** (screen mirroring, system audio) is less tested.\n\n## Troubleshooting and logs\n\n| Problem | Check |\n|---|---|\n| The Apple TV sends stereo only | The track or app may only offer stereo (YouTube, some \"Atmos\" tracks); check the format on the `\u002Feq` page or in `NOW PLAYING`. |\n| No sound from a board | Position on `\u002Feq`; the **Mute** buttons; PCM5102A **XSMT** jumper; wiring of BCLK \u002F LRCK \u002F DATA. |\n| Subwoofer silent with music | Normal: most music has no LFE. Try a film. |\n| Dropouts | Wi-Fi signal at that speaker (`\u002Fspeedtest`, RSSI on the main page). |\n| One speaker early or late | **Output Latency** of that board (DSP, external processors). |\n\nUseful lines in the serial log or at `http:\u002F\u002F\u003Cboard-ip>\u002Flogs`:\n\n| Line | Meaning |\n|---|---|\n| `NOW PLAYING \\| AAC-LC \\| 48000 Hz \\| 24-bit (F24) \\| 7.1 (8ch) \\| Front Right (R)` | what the board plays right now |\n| `NOW PLAYING \\| ALAC \\| 48000 Hz \\| 24-bit \\| stereo L\u002FR` | a lossless stereo stream |\n| `AUDIO FORMAT … -> …; SSRC …` | the sender changed the format mid-stream |\n| `I2S RATE 44100 -> 48000 Hz` | the output clock changed |\n| `MC: decoded channel N = back #0 -> Rear Left (Lrs)` | channel layout of the stream |\n| `MC CPU … avg …% of one core` | decoding time per frame |\n| `audio_status: … pcm=…ms` | decoded audio waiting for I2S; should stay near 850 ms |\n\nFor deeper debugging enable **AirPlay Logs and Diagnostics → Log every RTSP\nrequest and response** in `menuconfig` (verbose; turn it off afterwards).\n\n## Licenses and credits\n\n- **Fraunhofer FDK AAC** (`components\u002Ffdk_aac\u002Ffdk-aac`) is under the\n  Fraunhofer FDK license, [`NOTICE`](components\u002Ffdk_aac\u002Ffdk-aac\u002FNOTICE). The\n  copy here is a **Third-Party Modified Version of the Fraunhofer FDK AAC\n  Codec Library for Android**; the changes and their dates are listed in\n  [`MODIFICATIONS.md`](components\u002Ffdk_aac\u002FMODIFICATIONS.md). The license\n  allows redistribution in source and binary form without copyright fees but\n  **grants no patent rights**: AAC patent licenses are available through Via\n  Licensing or the patent owners.\n- The **rest of this repository** has no license file yet, so no license is\n  granted for it beyond viewing it on GitHub.\n- Other components (ESP-IDF, `esp_audio_codec`, libsodium, mDNS, cJSON,\n  led_strip) come through the ESP-IDF component manager under their own\n  licenses.\n\nBased on [airplay-esp32](https:\u002F\u002Fgithub.com\u002Frbouteiller\u002Fairplay-esp32.git),\nthe stereo AirPlay 2 receiver for the ESP32-S3. AAC decoding through\n[fdk-aac](https:\u002F\u002Fgithub.com\u002Fmstorsjo\u002Ffdk-aac).\n\nAirPlay, Apple TV and HomePod are trademarks of Apple Inc. This project is not\naffiliated with or endorsed by Apple.\n\n\u003Cp align=\"center\">\n  \u003Cbr>\n  If this project helped you build your surround system, please consider\n  supporting it. 🙏\n  \u003Cbr>\u003Cbr>\n  \u003C!-- DONATION LINK: replace the # in href=\"#\" below with your donation link -->\n  \u003Ca href=\"#\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDonate-Support%20this%20project-ff5e5b?style=for-the-badge&logo=githubsponsors&logoColor=white\" alt=\"Donate\">\u003C\u002Fa>\n\u003C\u002Fp>\n","这是一个基于ESP32-S3的开源项目，将多个低成本开发板分别配置为独立的AirPlay 2音频接收器，实现无线5.1\u002F7.1环绕声系统。每个板仅解码并播放对应声道（如左前、中置、低频等），依托Apple TV的PTP协议保持多设备精准同步；支持AAC与ALAC格式，含动态格式切换、Web图形化配置界面（含24段EQ、分频、延迟调节）、低CPU开销的单声道解码优化。适用于家庭影院场景，无需AV功放或物理音频线缆，可灵活搭配各类I2S功放与扬声器。",2,"2026-11-01 04:20:50","CREATED_QUERY"]