Repository navigation
Keep PCM510x DACs unmuted: never emit exact zero on ESP - #1263
Merged
Merged
Conversation
…nmuted The PCM5101 on AMYboard (and Tulip) enters analog mute after ~1024 consecutive zero samples, so the analog noise floor audibly gates on and off around silence. On ESP_PLATFORM builds, replace an output sample of exactly 0 with 1 (1 LSB, ~-96 dBFS). Host/web builds are unchanged, so reference wavs still match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
⛓️ tulipcc integration PR openedThis merge was pinned into tulipcc for full-system CI: shorepine/tulipcc#1425 Test it there and merge that PR to move tulipcc onto this AMY. |
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.
Summary
AMYboard users hear hiss that gates on and off. The PCM5101 DAC (AMYboard, Tulip) has zero-data detection that can't be disabled: after ~1024 consecutive all-zero samples it goes into analog mute, so the analog noise floor drops out whenever AMY goes silent and comes back when sound resumes.
This makes
amy_fill_buffer()replace an output sample of exactly 0 with 1 (1 LSB, about −96 dBFS) onESP_PLATFORMbuilds, keeping the DAC out of auto-mute. The hiss becomes a constant floor rather than a gated one.It's limited to ESP builds so host/web output (and the reference wavs) still contain exact zeros. Applied unconditionally, 127 of 139 tests failed on the 1 LSB difference.
Testing
make test: 139 tests pass.🤖 Generated with Claude Code