Files
wadamesh/variants
Tesso M Costa e682fbcb5c pager: add notification sound via the onboard ES8311 codec
Brings the T-LoRa Pager to feature parity with the T-Deck's notification
sound (built-in per-slot chimes, custom WAV playback, per-event on/off,
volume, Settings > Sound UI) using the board's ES8311 codec + NS4150B
Class-D amp, previously undriven.

- Es8311Codec: a minimal, hand-rolled I2C register driver (DAC/output path
  only) rather than vendoring Espressif's much larger esp_codec_dev HAL,
  which this single-chip playback-only board doesn't need. Register
  sequence and MCLK clock-divider coefficients are derived from Espressif's
  public es8311.c/es8311_reg.h (Apache-2.0, credited in NOTICE).
- TLoraPagerBoard::setAmpEnabled() toggles the amp around playback rather
  than leaving it permanently on; the existing boot-time AMP_EN drive stays
  as-is since it exists for shared-bus integrity reasons unrelated to audio.
  A boot-time I2C presence probe logs [BOOT] es8311 ok/PROBE FAILED.
- UITask.cpp: pager I2S/codec playback functions mirroring the existing
  T-Deck ones, plumbed into the same uiPlaySlot()/uiPreviewWavFile()
  dispatch the other boards use (which also had two T-Deck-hardcoded call
  sites generalized as part of this). New CAP_SOUND_FILES capability flag
  gates the file-browsing sound picker without reopening real SD support
  (the pager remains SPIFFS-only, decoupled from CAP_SD).
- platformio.ini: I2S pin flags for the pager env, confirmed against
  arduino-esp32's canonical pins_arduino.h for this board.

Verified on hardware: boot log shows es8311 ok, and chimes/volume/WAV
playback/DM+mention sounds all confirmed audible. Build-green on all three
envs; Heltec V4 binary byte-identical, T-Deck flash +16 bytes.

Signed-off-by: Tesso M Costa <tesso.martins@gmail.com>
2026-07-08 11:45:33 -06:00
..