-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optical SPDIF audio out #59
Open
johnboiles
wants to merge
23
commits into
gnumpi:dev-next
Choose a base branch
from
johnboiles:spdif_audio
base: dev-next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
c32d271
to
2315afe
Compare
2315afe
to
c15ff17
Compare
6884209
to
313849e
Compare
Closed
1 task
313849e
to
ec47770
Compare
7652365
to
cf4b03a
Compare
@gnumpi this is working well for me and I've worked out most of the kinks I think. Would you be available to discuss how to handle potential port collisions? |
11 tasks
14 tasks
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.
This PR adds an audio component for SPDIF optical output. All you need to try this is something that can receive optical audio (e.g. soundbar, AV receiver) and an LED. I'm using the debug LED on a Adafruit Feather HUZZAH32. Just put your optical cable up to the LED and it plays audio! I've also tried some real SPDIF transmitters (basically just an LED in a connector).
This uses (abuses?) the I2S peripheral to stream out a SPDIF bitstream. Because it's not a proper I2s device, I modeled this after
usb_audio
instead of thei2s_audio
. Because of this, however there could be a i2s port collision between the two. Let's discuss how to handle that. SPDIF code is based on this public domain example which works flawlessly for receiving bluetooth audio and outputting it over SPDIF.Features:
fill_silence
option)Known Issues:
i2s_audio
devices (because the i2s_audio port selection logic doesn't know about it). Let's discuss how to handle this.resampler
to work on my ESP32 for some reason. I'm getting afailed to allocate
even though I log the heap soon after and it says I still have ~240k remaining. Perhaps it only works on boards with PSRAM?rsp_filter
bugs in esp-adf v2.5. Apparently the older versions would work without PSRAM and there are maybe some bugs.resampler
works ok on my ESP32-S3.Here's the relevant YAML I've tested with:
YAML for ESP32 (tested on Adafruit Feather HUZZAH32)
YAML for ESP32-S3 (Tested on Unexpected Maker ProS3