feat(plip): I2S RX mic capture + POST /voice/capture (STT input leg) + ES8388 ADC register fix #17

Merged
electron merged 1 commits from feat/plip-mic-capture into main 2026-06-14 16:53:02 +00:00
Owner

Capture micro I2S RX full-duplex + endpoint /voice/capture (WAV streaming, VAD). Corrige un bug réel ES8388 (adresses registres ADC décalées d1, vol écrasait le sync LRCK). Build+flash OK, endpoint+WAV valides, playback intact.

⚠️ Capture = zéros sur cette instance : hardware/câblage à vérifier (combiné connecté ? ASDOUT→GPIO35 ? entrée ES8388 LIN2/RIN2 vs LIN1/RIN1 pour les micros A1S embarqués).

🤖 Generated with Claude Code

Capture micro I2S RX full-duplex + endpoint /voice/capture (WAV streaming, VAD). Corrige un bug réel ES8388 (adresses registres ADC décalées d1, vol écrasait le sync LRCK). Build+flash OK, endpoint+WAV valides, playback intact. ⚠️ Capture = zéros sur cette instance : hardware/câblage à vérifier (combiné connecté ? ASDOUT→GPIO35 ? entrée ES8388 LIN2/RIN2 vs LIN1/RIN1 pour les micros A1S embarqués). 🤖 Generated with Claude Code
electron added 1 commit 2026-06-14 16:52:58 +00:00
- audio.c: add full-duplex I2S RX channel (s_mic_handle, GPIO35/ASDOUT)
  enabled at boot alongside TX; streaming capture API with VAD
  (audio_capture_begin/read_frame/end) avoids large buffer allocation
- audio.h: export streaming capture API
- es8388.c: fix ADC register addresses (ADCCONTROL2=0x0A, 3=0x0B, 4=0x0C,
  5=0x0D, 8=0x10, 9=0x11 — were off by 1 from Espressif reference);
  CHIP_CTL1=0x12 (record+play), DACCONTROL21=0xC0 (ADC+DAC LRCK sync),
  ADCPOWER=0x09, FSM restart pulse (CHIPPOWER 0xF0→0x00) after CTL21 write;
  fix set_volume() to use OUT1 volume regs (0x2E/0x2F) not clock-sync reg 0x2B
- net.c: POST /voice/capture streaming WAV handler (chunked, 44-byte header
  + PCM frames, VAD onset/silence, query params max_ms/silence_ms);
  GET /debug/regs for live ES8388 register dump (diagnostic aid)
- board_config.h: PLIP_I2S_DIN=GPIO35 (ES8388 ASDOUT)

Build: clean. Endpoint functional (200 OK, valid WAV structure).
RX data currently silent — suspected hardware issue (mic not connected
to LIN1/LIN2 on this specific kit instance); firmware implementation complete.
electron merged commit b748c2d75f into main 2026-06-14 16:53:02 +00:00
electron deleted branch feat/plip-mic-capture 2026-06-14 16:53:02 +00:00
Sign in to join this conversation.