Skip to content

Peppy: guard the meter against native DSD (temporary, until alsa-lib is fixed)#779

Open
Gjuju wants to merge 1 commit into
moode-player:developfrom
Gjuju:contrib/peppy-native-dsd-guard
Open

Peppy: guard the meter against native DSD (temporary, until alsa-lib is fixed)#779
Gjuju wants to merge 1 commit into
moode-player:developfrom
Gjuju:contrib/peppy-native-dsd-guard

Conversation

@Gjuju

@Gjuju Gjuju commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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.

…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
Gjuju force-pushed the contrib/peppy-native-dsd-guard branch from 780901c to b513d79 Compare July 23, 2026 08:43
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.

1 participant