Repository navigation
Description
Umbrella tracker for classic-ESP32 I2S parallel-out clockless driver work
This meta rolls up every open sub-issue targeting the classic-ESP32 (WROOM / FL_IS_ESP_32DEV) I2S1 parallel-out clockless LED driver — the one exposed to users as FastLED.addLeds<WS2812, PIN, GRB>(leds, N) with -DFASTLED_ESP32_I2S=1.
The driver was restored to production in #3479 (Stage 5). Since then, work has fanned out across five separate open issues plus one closed one. This meta gives one place to see the whole picture and land the sub-tasks in the right order.
Current state (baseline)
- Production working on IDF 4.x and IDF 5.x per #3479 WROOM COM11 validation. Real DMA descriptor chain + IRAM ISR + ping-pong buffer refill emit WS2812 timing on I2S1.
- IDF 6+ compile-enabled via the
i2s_periph_compat.hshim landed in #3511 and hardened in #3514. Usesi2s_ll_enable_bus_clock+i2s_ll_reset_registerwrapped inPERIPH_RCC_ATOMIC(), verified againstespressif/esp-idf@master:components/esp_hal_i2s/esp32/include/hal/i2s_ll.h. Runtime bench validation still pending (tracked in I2S classic-ESP32 bring-up on IDF 4/5/6 via AutoResearch loopback + ISR DMA refill #3515). - Modern channel-driver architecture (
ChannelEngineI2sEsp32Dev+I2sPeripheralEsp32DevEsp+ mock) exists as scaffolding with 66 host tests. The real-hardware path inI2sPeripheralEsp32DevEsp::transmit()is still a Stage-4 synchronous-callback stub. - File-scope statics in
i2s_esp32dev.cpp.hpp(gCallback,gCntBuffer,dmaBuffers[],gTX_semaphore,gI2S_intr_handle, ...) — 10+ globals allowlisted for the SingletonElisionChecker via a file-levelFL_LINT_ALLOW_GLOBAL_FILEmarker pending migration.
Sub-issues (in landing order)
Ratchet — validation infrastructure first
-
#3515 — Bring-up on IDF 4/5/6 via AutoResearch loopback + ISR DMA refill
- Phase A:
ci/boards.pyentry for IDF 6 viapioarduino/platform-espressif32#prep_IDF6; CI workflows for all three IDF versions - Phase B:
examples/AutoResearch/AutoResearchI2s.hhandlers +--i2sflag inci/autoresearch/args.py - Phase C: ISR DMA refill invariant documented + host-side callback-cadence test
- Phase D: WROOM bench validation on IDF 4.4 + 5.5 + 6.0 with byte-exact loopback + ≥200 FPS burst test
This lands first — without CI + AutoResearch coverage, none of the below can be safely validated after landing.
- Phase A:
Architecture — unify the two coexisting paths
-
#3512 — Unified path Phases 2, 4-8 (follow-up to #3509)
- Phase 2: Move ~300 LoC of DMA descriptor chain + IRAM ISR machinery from Path A (Yves
i2s_esp32dev.cpp.hpp) intoI2sPeripheralEsp32DevEsp::transmit(). Preserves the streaming refill callback semantics (locked in by I2S classic-ESP32 bring-up on IDF 4/5/6 via AutoResearch loopback + ISR DMA refill #3515 Phase C). - Phase 4: Rewire
ClocklessI2S<>template through the peripheral interface. Result: one hardware access surface, two user-facing entry points (legacyaddLeds<>and modernFastLED.add<Channel::create<>>()). - Phase 5: Re-include
i2s_peripheral_esp32dev_esp.cpp.hppin the unity build; removeUNITY_BUILD_EXCLUDEmarker. - Phase 6: Migrate the file-scope globals into
Singleton<T>::instance()storage — closes singleton: migrate i2s_esp32dev driver state — 19 hits, ISR pattern (Tier 2a) #3489. - Phase 8: README.
Depends on I2S classic-ESP32 bring-up on IDF 4/5/6 via AutoResearch loopback + ISR DMA refill #3515 Phase C + D — Phase 2 is a careful ~300 LoC refactor that must not break the working ISR-refill cadence. I2S classic-ESP32 bring-up on IDF 4/5/6 via AutoResearch loopback + ISR DMA refill #3515 lands the validation fence first.
- Phase 2: Move ~300 LoC of DMA descriptor chain + IRAM ISR machinery from Path A (Yves
Cleanup — global state elision
- #3489 — Singleton migration for i2s_esp32dev driver state (Tier 2a)
- 10+ file-scope statics →
fl::Singleton<I2SDriverState>::instance()with cached-IRAM-pointer pattern for ISR safety. - Absorbed by I2S classic-ESP32 unified path: Phases 2, 4-8 (follow-up to #3509) #3512 Phase 6 — the peripheral migration naturally moves these fields into instance-owned state. singleton: migrate i2s_esp32dev driver state — 19 hits, ISR pattern (Tier 2a) #3489 closes when I2S classic-ESP32 unified path: Phases 2, 4-8 (follow-up to #3509) #3512 lands.
- 10+ file-scope statics →
Long-tail user bugs — resolve as part of the driver rewrite
-
#1165 — Unable to change I2S_DEVICE from 0 to 1 on ESP32 (opened 2020)
- GPIO pin routing when
I2S_DEVICE=1doesn't produce output. TheI2SxO_DATA_OUT0_IDXmatrix routing ini2s_init()may be wrong for the port-1 case. - Fix as part of I2S classic-ESP32 unified path: Phases 2, 4-8 (follow-up to #3509) #3512 Phase 2 rewrite — the peripheral impl accepts the port number via
I2sEsp32DevPeripheralConfig::mI2sPort; correct pin-matrix routing per port becomes an explicit part of the API rather than a global default. - Add reproducer to I2S classic-ESP32 bring-up on IDF 4/5/6 via AutoResearch loopback + ISR DMA refill #3515 Phase B:
i2sFrameOnce(..., i2s_port=1)variant.
- GPIO pin routing when
-
#1384 — Is waiting in esp32 i2s really needed? (opened 2020)
- User wants to omit the
i2s_wait()semaphore-take at the end ofshowPixels()so the CPU can process network I/O during transmit. - Fix as part of I2S classic-ESP32 unified path: Phases 2, 4-8 (follow-up to #3509) #3512 Phase 4 — the modern engine already supports non-blocking
poll()semantics perIChannelDriver::poll(). Users who want the async surface get it by moving toFastLED.add<Channel::create<>>(); legacyaddLeds<>keeps blocking behavior for backward compatibility.
- User wants to omit the
Milestone ordering (canonical)
- #3515 Phases A + B + C land — CI covers IDF 4.4/5.5/6.0, AutoResearch harness has
--i2s, ISR-refill invariant documented + host test in place. - #3515 Phase D — bench validation on all three IDF versions confirms the CURRENT Yves driver works. This is the "confirmed working" gate.
- #3512 Phase 2 — move DMA/ISR machinery into
I2sPeripheralEsp32DevEsp. Rerun I2S classic-ESP32 bring-up on IDF 4/5/6 via AutoResearch loopback + ISR DMA refill #3515 Phase D on all three IDF versions to confirm no regression. - #3512 Phases 4, 5 — rewire
ClocklessI2S<>+ unity-build re-include. Rerun I2S classic-ESP32 bring-up on IDF 4/5/6 via AutoResearch loopback + ISR DMA refill #3515 Phase D. - #3512 Phase 6 — singleton migration. Closes #3489. Rerun I2S classic-ESP32 bring-up on IDF 4/5/6 via AutoResearch loopback + ISR DMA refill #3515 Phase D.
- #1165 + #1384 fixes during Phase 2 rewrite. Close both when I2S classic-ESP32 unified path: Phases 2, 4-8 (follow-up to #3509) #3512 lands.
- #3512 Phase 8 — README.
Already landed (for reference)
- #3509 (closed) — Phase 3 IDF 6+ enable umbrella
- #3511 —
i2s_periph_compat.hshim - #3514 —
PERIPH_RCC_ATOMIC()correctness fix - #3479 — Stage 5 restore of Yves driver (production baseline)
Non-goals for this meta
Out of scope because they're different silicon / different peripheral:
- #3180 — ESP32-S3 LCD/I80 clockless (LCD_CAM, not I2S1)
- #3179 — ESP32 SPI wave8 streaming (different driver)
- #2254 — ESP32-S3 I2S driver starving websockets (different peripheral)
Parallel-IO unified-engine rule (agents/docs/cpp-standards.md — "Parallel-IO Driver: Unified Clockless + SPI Engine") explicitly allows separate drivers per silicon block, not per mode. The above are correctly separate.
Blockers (whole-tracker)
- Physical WROOM COM11 hardware required for I2S classic-ESP32 bring-up on IDF 4/5/6 via AutoResearch loopback + ISR DMA refill #3515 Phase D bench validation on each IDF version. No software substitute.
- pioarduino
prep_IDF6is a moving branch; consumers shouldgit rev-parse HEADbefore starting so they know what they built against. When pioarduino cuts a proper release tag, replace the branch reference with the tag inci/boards.py. - Windows fbuild spec-file backslash regression can block local
bash compile esp32dev(per I2S esp32dev Stage 2 — real-hardware impl + BusTraits switch + delete Yves code #3474 body); Linux CI is the fallback.
Reference material
- Working DMA/ISR reference:
i2s_esp32dev.cpp.hpp:145(ISR handler),:436(DMA ring),:477(kick) - Streaming refill pattern:
clockless_i2s_esp32.h:227(fillBuffercallback body) - Peripheral interface:
ii2s_peripheral_esp32dev.h - Modern engine:
channel_engine_i2s_esp32dev.cpp.hpp - RX capture: #3467 (
rmt_rx_4— landed, used by I2S classic-ESP32 bring-up on IDF 4/5/6 via AutoResearch loopback + ISR DMA refill #3515 Phase D loopback) - AutoResearch shape reference:
examples/AutoResearch/AutoResearchParlioStream.h - Parallel-IO unified-engine rule:
agents/docs/cpp-standards.md— "Parallel-IO Driver: Unified Clockless + SPI Engine" - pioarduino IDF 6 branch: https://github.com/pioarduino/platform-espressif32/tree/prep_IDF6
- ESP-IDF v6.0 migration notes: https://docs.espressif.com/projects/esp-idf/en/v6.0/esp32/migration-guides/release-6.x/
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
feat(i2s): remove FASTLED_ESP32_I2S selector, add IDF6 CI target (#3515…
docs+fix: Bus::FLEX_IO runtime-selection guardrail + restore Yves opt…
feat(i2s): re-include peripheral impl in unity build (#3512 Phase 5) (#…
docs(i2s): add classic-ESP32 I2S driver README (#3512 Phase 8) (#3521)
zackees commentedon Jul 1, 2026
Session progress — code-only phases landed, hardware-dependent phases deferred
Landed this session:
prep_IDF6; removeFASTLED_ESP32_I2Sselector (later partly reverted)Bus::FLEX_IO— legacy chipset templates are not." Also restoresFASTLED_ESP32_I2Sopt-in that #3518 prematurely removed (Yves clockless isn't reachable viaBus::FLEX_IO, 0yet).i2s_peripheral_esp32dev_esp.cpp.hppin the unity build. UNITY_BUILD_EXCLUDE was over-conservative — the ADC:CONFLICT wasdriver/i2s.hin Stage 2, notdriver/gpio.hin Stage 4.src/platforms/esp/32/drivers/i2s/README.mddocumenting files, user binding, IDF 4/5/6 compat, ISR DMA refill invariant, known bugs, cross-links.Deferred — bench-hardware-dependent:
I2S_DEVICE=1bug without Phase 2 exposing port as config surface.ClocklessI2S<>template rewiring depends on peripheral'stransmit()actually driving DMA.Singleton<T>migration happens naturally once peripheral owns the state.Bus::FLEX_IO, 0per the new agent-doc rule; that slot doesn't route to Yves clockless until Phase 4.Net driver state at session end:
-DFASTLED_ESP32_I2S=1addLeds path.PERIPH_RCC_ATOMIC()LL-API path ini2s_periph_compat.h.agents/docs/cpp-standards.mdprevents future agents from reaching forClocklessI2S<>template directly in test harnesses. Driver README exists.What the user needs to do next:
bash compile esp32dev_idf6 --examples Blinklocally to smoke the IDF 6 CI target once (validates the pioarduinoprep_IDF6branch is still resolvable).The meta is not closable this session — pending phases require bench + refactor that both need real hardware to land safely.
feat(autoresearch): add flexIoDeviceInfo RPC — Bus::FLEX_IO introspec…
zackees commentedon Jul 1, 2026
New sub-issue — architecture directive
#3526 — I2S modern driver: wave8/wave3 general clockless (like PARLIO) + SPI unified — do NOT delegate to Yves.
Captures two user directives from the #3516 driver-work session:
The modern I2S driver must be a general clockless driver in the same shape as PARLIO — using wave8 / wave3 encoding at a fixed pixel clock, NOT delegating to the Yves
i2s_esp32dev.cpp.hppper-chipset bit-pattern driver. Mirrors the pattern PARLIO / LCD_CAM / FlexIO use across every other parallel-IO peripheral.SPI compatibility on the same engine per the parallel-IO unified-engine rule (
agents/docs/cpp-standards.md→ "Parallel-IO Driver: Unified Clockless + SPI Engine"). Same peripheral, mode switch at show-time,Capabilities(true, true). The existingdrivers/i2s_spi/folds into the new unified engine.Five sub-phases:
fl::Wave8BitExpansionLut/fl::Wave3BitExpansionLut, no duplication)esp_intr_allocISR + own register setup — no calls intoi2s_esp32dev.cpp.hppBusTraits<Bus::FLEX_IO, 0>as the unified clockless+SPI engine; retire the separateaddI2sSpiIfPossiblei2s_esp32dev.cpp.hpp+clockless_i2s_esp32.h+drivers/i2s_spi/once bench validation confirms the new engine handles every chipset both didSupersedes my previous Phase 2 attempt this session which was going down the wrong architectural path (delegate-to-Yves). Reverted before commit — new work should follow #3526.
#3526 depends on #3515 Phase D (bench access) and blocks #3512 Phase 4 (rewire
ClocklessI2S<>— the wholeClocklessI2S<>template goes away once the modern engine is the clockless path).zackees commentedon Jul 1, 2026
Updated #3526 — Phase 2e now specifies deletion is REQUIRED (not deprecation). Yves
i2s_esp32dev+clockless_i2s_esp32+drivers/i2s_spi/all deleted at Phase 2e.-DFASTLED_ESP32_I2Sflag removed; the modern engine onBus::FLEX_IO, 0becomes the only I2S path.zackees commentedon Jul 1, 2026
Updated #3526 Phase 2a with the REQUIRED shared-code constraint: the I2S1 wave encoder MUST reuse
fl::wave8Transpose_*kernels andfl::Wave8*ExpansionLuttypes fromsrc/fl/channels/— no duplicate transpose implementations, no private LUT builders. Same anti-drift rule the #3524 mirror-cheat post-mortem established. Applies to any future parallel-IO driver joining the roster too — all of them dispatch through the shared kernels.1 remaining item
zackees commentedon Jul 1, 2026
Round complete — status updates posted on #1165 and #1384
Both long-tail bugs get their fix via the Phase 2b-2e rewrite path (as documented in #3526). Fresh status comments posted:
I2sPeripheralEsp32DevEsp::initialize()(Phase 2b) with per-port GPIO matrix routing as first-class config, validated by #3515 Phase D bench on both port 0 and port 1.IChannelDriver::poll()on the modern channel-manager once Phase 4 rewiresClocklessI2S.Neither issue is closable yet — the actual fix hasn't shipped, only the path is documented.
Round PR list
Six PRs merged this session, one architectural sub-issue filed, one facade issue filed:
What definitively blocks meta close
Every remaining phase has a hardware dependency the current session cannot satisfy:
BusTraits<Bus::FLEX_IO, 0>binding) — depends on 2b + 2c.ClocklessI2S) — depends on 2d.The next honest step is bench access. When that arrives, Phase 2b is the first PR that lands, using the encoder from #3528 as its front end.
feat(i2s): add streaming buffer-refill callback interface (#3526 Phas…
fix(lint): add FL_NO_EXCEPT to TypeToJson<u32> / <u16> converters (#3532
feat(i2s): engine mode-dispatch scaffolding for SPI batches (#3526 Ph…
docs(agents): check if target device is attached before deferring ben…
feat(i2s): real hardware initialize() on modern peripheral (#3526 Pha…
feat(i2s): real deinitialize() on modern peripheral (#3526 Phase 2b) (#…
feat(i2s): factory + Phase 2d slot-0 swap prep + agent-doc guardrail (#…
zackees commentedon Jul 1, 2026
Session final status (2026-07-01)
13 PRs merged this session, bench-verified against attached WROOM COM11:
Infrastructure + prep (7):
Architectural + guardrails (3):
Real hardware work (2):
Genuinely blocked on future sessions
Phase 2b-transmit (real DMA/ISR wave8 output), Phase 2c-SPI (unified engine SPI transmit path), Phase 2d (slot-0 swap), Phase 2e (Yves + i2s_spi deletion), #3489 (Singleton migration), #1165 (I2S_DEVICE=1 fix), #1384 (async surface), #3515 Phase D (WROOM autoresearch matrix).
Each is genuinely a design + implement + flash + bench-iterate cycle. Specifically:
ChannelDriverI2sSpiuses a completely different peripheral interface (II2sSpiPeripheral) with a different config type and a different transmit model (lane-interleaved buffer) than the modern engine (byte-concatenated buffer). Unifying them requires designing a new peripheral interface that spans both modes, or delegating from the modern engine to the existingI2sSpiPeripheralEspsingleton via an adapter. That decision + implementation + bench validation is one PR by itself.What's ready for the next agent / developer session
bash autoresearch esp32devworks — flash + boot + ping cycle is ~5 min per iteration.showSpi().The next session picks up where this one ended: design Phase 2c's peripheral-interface strategy, implement it, flash, iterate. Meta stays open.
feat(i2s): unified engine SPI path via delegate (#3526 Phase 2c) (#3544)
docs(i2s): document open bench debug on tx_bits_mod (#3526 / #3515) (#…
fix(i2s,rmt-rx): 32-bit sample encoding + classic-ESP32 capture fixes (…
zackees commentedon Jul 2, 2026
Program plan filed as #3576 — covers the I2S0 32-lane expansion, UART2, new RX capture backends (I2S-RX oversampling on classic to break the 10-LED capture ceiling; PARLIO-RX on C6/P4), the IDF 4/5/6 compile+bench matrix (overlapping this issue's Phase D scope), and the dual-device (WROOM+C6) WiFi-load robustness sweeps whose unfixable limitations will be reported back here per the plan.
zackees commentedon Aug 20, 2026
Deferred under the active bug-burn-down policy after final child audit.
Child disposition:
The meta's advertised IDF 4/5/6 validation is therefore not complete, and the required classic-ESP32 bench is not currently attached. A fresh scan finds no selectable WROOM/CP210x device.
Restart when #3515 and #3526 have their required hardware/owners, then remove
deferredfrom this meta only after both produce their terminal evidence. The meta remains open as the roll-up record and is excluded from the actionable queue while labeleddeferred.