Skip to content

Add JC ESP32-P4 M3 audio firmware - #1

Draft
ssjgesus wants to merge 4 commits into
mainfrom
agent/jc-esp32p4-m3-audio
Draft

Add JC ESP32-P4 M3 audio firmware#1
ssjgesus wants to merge 4 commits into
mainfrom
agent/jc-esp32p4-m3-audio

Conversation

@ssjgesus

@ssjgesus ssjgesus commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a dedicated esp32p4-jc-m3-eth firmware for the JC-ESP32P4-M3-DEV and configures its on-board ES8311 microphone for ProjectMM's audio-reactive pipeline.

Root causes

  • The scanned ES8311 address is the 7-bit value 0x18, while the codec control adapter expects the legacy 8-bit wire address.
  • Codec capture was configured as 16-bit even though ProjectMM receives 32-bit I2S slots.
  • Most importantly, esp_codec_dev_new() in esp_codec_dev 1.6.2 rejects a configuration without a data_if. ProjectMM owns I2S separately, so the high-level device wrapper always failed before capture began and surfaced as “codec init failed - check I2C wiring”.

Changes

  • Configures ES8311 at 0x18 on SDA GPIO7 / SCL GPIO8 with MCLK GPIO13.
  • Converts the codec address at the driver seam and uses 32-bit ADC samples.
  • Configures and enables the ES8311 codec interface directly, while leaving ProjectMM's existing I2S data path in control.
  • Pins the validated esp_codec_dev 1.6 minor line.
  • Adds device defaults for BCLK GPIO12, WS GPIO10, and microphone data GPIO48.
  • Keeps sdPin live-editable so GPIO11 can be hardware-tested without reflashing.
  • Adds catalog, reference documentation, regression tests, and a branch/PR firmware workflow.

Validation

  • Dedicated ESP32-P4 firmware build passed against ESP-IDF v6.1-beta1 and esp_codec_dev 1.6.2.
  • Python and JavaScript GitHub checks passed.
  • 87 specification checks, catalog/manifest checks, 84 Python tests, 34 JavaScript tests, desktop build, and scenario checks passed locally.
  • The full local C++ unit executable remains blocked by a pre-existing NetworkModule.h warning unrelated to this change.

ssjgesus added 4 commits July 26, 2026 16:38
Add a dedicated JC-ESP32P4-M3-DEV firmware variant so its ES8311 microphone feeds audio-reactive effects with the board's correct codec configuration and I2S framing.

KPI: not collected; no ESP32 hardware is connected in this workspace, and the existing desktop test target is blocked by the pre-existing NetworkModule.h format-truncation warning.

Core:
- ESP32 platform: configure the JC board's ES8311 on GPIO7/8 with MCLK GPIO13, convert its 7-bit address at the driver seam, and capture 32-bit I2S samples.

Scripts / MoonDeck:
- ESP32 builder: add the esp32p4-jc-m3-eth firmware and its board-specific sdkconfig fragment.

Tests:
- JC firmware contracts: pin codec selection, dependency gating, address conversion, word size, and catalog audio pins.

Docs / CI:
- Device catalog and reference: document the JC board and publish GPIO48 as the default mic data pin while keeping it live-editable.
- GitHub Actions: build and retain a complete flash package for the JC firmware branch.
Run the dedicated ESP32-P4 firmware build when the branch opens or updates a pull request, preserving the complete flash package as a GitHub Actions artifact.

Docs / CI:
- GitHub Actions: trigger the JC firmware build for pull requests targeting main.
Keep the bootloader and partition-table directories in the firmware artifact so the included ESP-IDF flash arguments resolve every binary without manual path edits.

Docs / CI:
- GitHub Actions: stage the JC firmware artifact with its original ESP-IDF directory layout.
Configure the ES8311 codec interface directly because ProjectMM owns the I2S data path. The esp_codec_dev high-level wrapper requires a non-null data_if and previously failed before audio capture started.

Pin the validated esp_codec_dev 1.6 minor line and extend the JC firmware regression check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant