Skip to content

Add minimal LyraT v4.3 capture-only example for external I2S listeners (JP4 passthrough) #1607

@ai-hpc

Description

@ai-hpc

Is your feature request related to a problem? Please describe.

The existing examples/recorder/ examples (e.g. pipeline_raw_http, pipeline_recording_to_sdcard, pipeline_wav_amr_sdcard) all assume the captured audio is consumed on the ESP32 itself — they pull in WiFi, HTTP client, or SD card stack. There is no example that demonstrates the simpler use case of treating the LyraT v4.3 purely as an I2S microphone front-end whose output is consumed by an external host through the JP4 I2S header.

The LyraT v4.3 hardware reference states that JP4 exposes the same I2S bus connecting ESP32-WROVER-E and ES8388, so this is a supported use case — the ESP32 just needs to keep the codec ADC running and the I2S clocks alive. But there is no upstream example showing this minimum-viable configuration, and getting it right requires understanding that GPIO35/ASDOUT is codec-driven (not ESP32-driven), which is easy to get wrong by adapting existing examples that always assume an on-chip consumer.

Describe the solution you'd like

A new minimal example, e.g. examples/recorder/lyrat_jp4_passthrough/, that:

  1. Calls audio_board_init() and audio_hal_ctrl_codec(..., AUDIO_HAL_CODEC_MODE_ENCODE, AUDIO_HAL_CTRL_START) to bring up ES8388 in ADC mode driving ASDOUT.
  2. Configures I2S as master, reader, 48 kHz / 16-bit / stereo, Philips standard — using the in-tree pin map from components/audio_board/lyrat_v4_3/board_pins_config.c (no overrides).
  3. Pulls samples from the ESP32's I2S RX peripheral and discards them; the purpose is solely to keep BCLK/LRCK active and ES8388 ADC pushing data on ASDOUT so an external listener (another SoC's I2S RX) can capture the bus.
  4. No WiFi, HTTP, SD, Bluetooth, or input-key service dependencies.
  5. Periodic stats log so the user can confirm clocks/data are live.

This pairs naturally with the existing JP4 hardware documentation but currently has no code analogue.

Describe alternatives you've considered

  • Adapting pipeline_raw_http and stripping WiFi/HTTP — works but pulls in conceptual baggage and obscures the "all you really need is audio_board_init + a clocking I2S reader" message.
  • Using a plain ESP-IDF I2S driver example — bypasses ESP-ADF's audio_hal codec init and forces the user to write ES8388 register sequences by hand.
  • Documentation-only note — useful but doesn't compile-test.

Additional context

Concrete use case: connecting LyraT v4.3 JP4 → Jetson Orin Nano I2S2 (pins 12/35/38) so the Jetson captures the onboard LyraT mics over ALSA/ASoC. Same pattern applies to Raspberry Pi I2S, custom DSP boards, etc.

Happy to contribute the example as a PR if there's interest in upstream merging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions