Skip to content

perf(teensy): I2S audio-input DMAMEM buffers (1 KB RAM) linked into LED-only sketches #4792

Closed

Description

@zackees

Problem

teensy41 APA102 SPI RAM went up +1,280 B vs 3.10.3. This is the only Teensy regression; flash went down. 1,024 B of it is two 512 B DMAMEM I2S audio-input buffers linked into LED-only sketches:

  • fl::platforms::teensy::i2s_rx_buffer()::buffer (src/platforms/arm/teensy/audio/pjrc_input_i2s.cpp.hpp:23)
  • fl::platforms::teensy::gI2S2RxBuffer (src/platforms/arm/teensy/audio/pjrc_input_i2s2.cpp.hpp:23)

Blink on teensy41 carries the same 1 KB, but other savings hide it. The remaining ~380 B is ChannelManager and ObjectFLED engine state, tracked separately.

Proposed fix

Make sure these buffers are only reachable from the audio-input path. For example, keep them function-local inside code that only the audio input API references, and check what currently keeps them live (a global constructor, a vtable, or a registration hook).

Acceptance

  • teensy41 Blink and SPI maps contain neither buffer. SPI RAM is at or below 3.10.3 (27,040 B).
  • The audio-input example still links them and works.

Data: https://fastled.github.io/dashboard/ (master 18669e6 vs 3.10.3, fbuild 2.5.38), symbol-level bloat reports linked from each dashboard point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: teensypriority: hightype: regression

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions