[peppy-alsa] Read DoP levels instead of a constant#23
Conversation
|
Interesting enhancement. Testing will have to be postponed until after 10.3.1 ships because there's a need to get the RB and other bug fixes out to users asap. |
|
I agree on 10.3.1. This one is also a PR at peppyalsa and, I hope, could perhaps be merged soon. I also pushed 2 PR on alsa-lib to also get a waorking DSD native. It works really nice and seeing my hw volume DAC working with peppy on DSD on moOde without error is awesome ! |
|
You have to set MPD to DoP for this right? |
|
Yes, exactly. If you want to get full support on native DSD you have to build alsa-lib the same way. |
|
I have to consider the maintenance responsibility when it comes to supporting patched libs because in the future it can come back to bite! You are referring to this PR, correct? Hopefully the peppy dev will test it out. |
|
Yes peppyalsa #5 is the one who makes DoP working in peppy I made a patch build for alsa-lib to make DSD native working. |
|
Sure, no prob. |
bf0687d to
9b54f8f
Compare
On a DSD source played as DoP the meter sits at a constant 4/100 and the needles never move. DoP is not a conversion but an encapsulation: 16 DSD bits travel in the low bits of a 24-bit word under an alternating 0x05/0xFA marker. The s16 scope hands the plugin the top 16 bits of that word, so what it currently measures as an amplitude is the marker byte, which is why the reading is constant. Those top 16 bits also carry the first 8 DSD bits of every frame, and in a sigma-delta stream the local density of ones IS the amplitude. Counting them recovers the envelope, so the needles work on DoP with no change anywhere else - same passive tap, same FIFO, spectrum untouched. The patch recognises a DoP stream by the marker alternation and falls back to the existing peak path for everything else, so PCM is bit-for-bit unaffected. Native DSD is out of scope and unchanged: there the s16 scope cannot convert at all and asserts before the plugin sees a sample. Verified on x86 (Debian 13, USB DAC) against a set of the same master in FLAC 96/192/352 and DSD64/128/256. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
9b54f8f to
92b6b7f
Compare
Problem
On a DSD source played as DoP, the meter sits at a constant
4/100and the needlesnever move. PCM is fine.
DoP is not a conversion, it is an encapsulation: 16 DSD bits travel in the low bits of
a 24-bit word, under an alternating
0x05/0xFAmarker byte. The s16 scope hands theplugin the top 16 bits of that word — so what the plugin measures as an amplitude
is the marker, which alternates between two fixed values. Hence a constant reading.
Fix
Those same top 16 bits also carry the first 8 DSD bits of every frame, and in a
sigma-delta stream the local density of ones is the amplitude (50% = silence).
Counting them recovers the envelope. No change anywhere else: same passive tap, same
FIFO format, spectrum untouched, no new dependency.
A DoP stream is recognised by the marker alternation over 64 frames; everything else
falls through to the existing peak path, so PCM is bit-for-bit unaffected.
Three things beyond the raw decode, each needed for the needle to read like the PCM
path does:
over a short sliding window. Returning an RMS made the same music read lower and
duller than PCM.
25%↔75%, not 0↔100%. Referring to the full range under-reads everything by 6 dB.
ultrasonic and enormous; a wide measurement window puts it on the needle as a floor
that never falls. Groups are sized from
snd_pcm_meter_get_rate()so the bandwidth,not just the response time, is identical from DSD64 to DSD512.
Out of scope
Native DSD is unchanged and still unsupported: there the s16 scope cannot convert
at all and asserts (
pcm_meter.c:1222) before the plugin sees a sample. This patchneither fixes nor worsens that. The meter requires DoP on DSD sources.
Testing
Verified with a set of the same master in FLAC 96/192/352
kHz and DSD64/128/256 — needles track DoP and reach comparable levels to the FLAC
versions. Ballistics were tuned against a synthetic plucked-string envelope with a
known true level, and the scale checked against known amplitudes (full scale reads
100, silence 0, linear in between).
Package revision bumped to
1moode2so the rebuilt package supersedes the installed one.