Skip to content

Keep PCM510x DACs unmuted: never emit exact zero on ESP - #1263

Merged
dpwe merged 1 commit into
mainfrom
pcm5101-nonzero
Nov 16, 2026
Merged

dpwe merged 1 commit into
mainfrom
pcm5101-nonzero

Conversation

@dpwe

@dpwe dpwe commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

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) on ESP_PLATFORM builds, 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.
  • Not yet tested on AMYboard hardware.

🤖 Generated with Claude Code

…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>
@dpwe
dpwe merged commit 914209c into main Nov 16, 2026
13 checks passed
@bwhitman

Copy link
Copy Markdown
Collaborator

⛓️ tulipcc integration PR opened

This 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.

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.

2 participants