Peppy: guard the meter against native DSD (temporary, until alsa-lib is fixed)#779
Open
Gjuju wants to merge 1 commit into
Open
Peppy: guard the meter against native DSD (temporary, until alsa-lib is fixed)#779Gjuju wants to merge 1 commit into
Gjuju wants to merge 1 commit into
Conversation
…s fixed) Since the softvol control binds to the hardware mixer element, the Peppy chain is transparent on hardware-volume DACs. Correct - but it exposes a latent alsa-lib defect: the meter's s16 scope has no DSD conversion and aborts the caller (pcm_meter.c:1222), killing MPD whenever Peppy is enabled with a DSD-capable DAC, hardware volume, dop "no" and a DSD file. Before that fix the stray softvol refused DSD by accident, so MPD always converted upstream and the bug never fired. Restore that behaviour deliberately: a unity route above the meter only negotiates linear PCM, so native DSD is refused and MPD falls back to dsd2pcm. Unity gain, no control created, bit-transparent for PCM, DoP markers pass unharmed. Remove when a meter-fixed alsa-lib ships. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Gjuju
force-pushed
the
contrib/peppy-native-dsd-guard
branch
from
July 23, 2026 08:43
780901c to
b513d79
Compare
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.
Since #769 the Peppy chain is transparent on hardware-volume DACs — which is correct, but exposes a latent alsa-lib defect: type meter's s16 scope has no DSD conversion and aborts the caller (pcm_meter.c:1222), killing MPD on Peppy + DSD-capable DAC + hardware volume + dop "no" + a DSD file. Before #769 the stray softvol refused DSD by accident, so MPD always converted and the bug never fired.
This adds a unity route above the meter that restores exactly that behaviour, deliberately: native DSD is refused at negotiation, MPD falls back to dsd2pcm, the meter reads PCM. Unity gain, no control created (no double attenuation), bit-transparent for PCM, and DoP passes unharmed (markers verified intact below the route). Transparent to users — nothing to enable.
Validated on a fresh Pi 3B (stock 10.3.1 develop, stock alsa-lib/peppy-alsa): the crash config plays S32_LE @352800 with live needles, 0 aborts; DoP unaffected.
Temporary by design: revert when a meter-fixed alsa-lib ships (moode-player/pkgbuild#24, or upstream alsa-project/alsa-lib#516/#517 reaching a base OS). Existing installs would need the postinstall to lay the updated file.