Skip to content

Add AUX input support via ES8388 analog bypass#7

Open
Nopraz wants to merge 1 commit into
matoslav:mainfrom
Nopraz:feature/aux-analog-bypass
Open

Add AUX input support via ES8388 analog bypass#7
Nopraz wants to merge 1 commit into
matoslav:mainfrom
Nopraz:feature/aux-analog-bypass

Conversation

@Nopraz

@Nopraz Nopraz commented Jun 19, 2026

Copy link
Copy Markdown

What this PR does

This adds a second audio source to FerroWave in addition to Bluetooth A2DP:

  • Bluetooth (unchanged): the ESP32 decodes A2DP audio and sends it to the ES8388 DAC over I2S. The LED ring and the ferrofluid magnet are driven from the decoded audio.
  • AUX / line-in: the 3.5 mm jack input is routed straight to the speakers through the ES8388 codec's analog bypass.

Why the analog bypass

A full-duplex ESP32 passthrough was tried first: reading the AUX signal from the ES8388 ADC through I2S in RXTX mode and copying it back to the DAC. That would have let the LED/magnet visualizer react to AUX audio too. Unfortunately it produced audible white-noise bursts in the background on the ESP32-A1S v2.2 + ES8388.

Routing the audio through the codec's analog mixer (CODEC_MODE_LINE_IN) is the cleanest working solution we found. The trade-off is that the AUX signal never enters the ESP32, so the visualizer stays idle while AUX is active.

How to switch source

  • Serial command: aux or bt
  • Optional push-button between GPIO 34 and GND

Files changed

  • firmware/FerroWave.ino: adds source switching and the ES8388 analog bypass path
  • docs/AUX_INPUT.md: user documentation covering wiring, limitations and build settings

Build requirements

No change from the original firmware. If a missing-driver error appears, install arduino-audio-driver in addition to the existing libraries.

Note to the maintainer

If anyone knows how to get a clean full-duplex AUX passthrough on the ESP32-A1S + ES8388 (so the visualizer can also react to AUX), we would be happy to update this implementation. The current version prioritizes clean audio over visualization on AUX.

Adds a second audio source to FerroWave:
- Bluetooth (existing): ESP32 decodes A2DP and drives the visualizer.
- AUX / line-in: ES8388 codec routes the 3.5 mm jack input straight to
  the speakers through its analog bypass.

A full-duplex ESP32 passthrough was attempted but produced audible white-
noise bursts on the ESP32-A1S v2.2 + ES8388, so the analog bypass is used
as the clean practical solution. As a result, the LED ring and the
ferrofluid magnet stay idle while AUX is active.

Switching is available via:
- serial command: 'aux' / 'bt'
- an optional push-button between GPIO 34 and GND

See docs/AUX_INPUT.md for wiring and details.
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