Add AUX input support via ES8388 analog bypass#7
Open
Nopraz wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
This adds a second audio source to FerroWave in addition to Bluetooth A2DP:
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
auxorbtFiles changed
firmware/FerroWave.ino: adds source switching and the ES8388 analog bypass pathdocs/AUX_INPUT.md: user documentation covering wiring, limitations and build settingsBuild 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.