Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Bit depth settings
#1
[This is a generalization of a quickie question I incorrectly posted to a different thread]

The open-source moOde audio player derives strength from a number of other open-source projects. These include the core Music Player Daemon (MPD), Sound eXchange (SoX), and a number of alternative renderers.

Among the configuration options for many of these components is a choice of PCM bit depth, grossly: 16 bit, 24 bit, and 32 bit. It's reasonably well known  to most end users that 1) greater bit depth means greater dynamic range and 2) there may need to be manipulation of the bit depth of the audio before it's passed to the DAC, depending on its capability.

Once we get into choosing between an integer bit depth (S32, say) and a floating-point bit depth (F32) or between big-endian integers (S24_3BE, say) and little-endian (S24_3LE), there's no useful guidance.

Is there a need to provide some explanation of these choices and if so, where should it go? As a sticky note in the Forum? In the Setup Guide? In moOde's Quick Help? With the specific configuration options of the various components?

My original question was triggered by the introduction of the Deezer renderer, whose configuration options include a choice of S32 or F32 bit depth. I wondered if there was a practical difference to end users.

Regards,
Kent

PS - yes, I know that most of us take the scientific approach (see XKCD), e.g., "I wonder what will happen when I choose this option", but that's not a very efficient way to figure out what's going on.

PPS - I know it's offered by librespot, but the F64 bit depth option for the Spotify renderer is almost incomprehensible to me and my aging ears!

PPPS - To be pendantic about it, the "S" in the integer choices means "signed" (as opposed to unsigned "U") and an unadorned Sxx implies native-endian, e.g., whatever is native to the processor.
Reply
#2
I implemented 64-bit floating point support mostly because I could with no detrimental effects on any reasonably modern architecture. Raspberry Pi 3 and onwards have direct hardware support. RPi's before it can handle them fine, just a bit slower as they have to process two 32-bit operations instead of one 64-bit one. ALSA's plughw is the only backend I know that can work with 64-bit floating point.

In librespot, the internal processing is in 64-bit floating point regardless of the output format you choose. It's overkill but fun. CamilllaDSP does that too (though you can compile it with 32-bit floating point instead). It really only comes to play when you have a pipeline of signal processing operations. Volume control is also DSP and then there's a lot more you can do in CamillaDSP.

In Deezer I didn't bother and just stayed with 32-bit floating point processing. That already has 1528 dB of dynamic range  Big Grin

Endianness (LE / BE / or native) makes no difference to sound quality whatsoever. Just keep it to what's native (or LE which is native on 99.99% of systems) so your system doesn't need to convert it to another endianness.

My recommendation would be:

First, output mode. Direct (hw) is preferred over Default (plughw) if you can manage without the DSP options.
If you do want to use DSP, don't worry about using plughw, it just costs some a teeny extra bit of CPU for conversions.

Then in Direct (hw) mode: the highest your device supports. S32 > S24 > S24_3 (harder to process) > S16.

In Default (plughw) mode I recommend F64 or F32 as this will give the highest quality input to crossfeed or CamillaDSP, should you use it.

I don't know of any DACs that directly support F32 or F64. Don't think that plughw will fix that: plughw will take F32 or F64, but just convert down to what your DAC is capable of.
maintainer of librespot and pleezer
Reply
#3
@roderickvd 


Quote:...It's overkill but fun...

Best argument I've seen all week Big Grin

Thanks for for your detailed reply.

Regards,
Kent
Reply
#4
When you go to Audio Info, you can see what your DAC supports.
For example, on my system:
AUDIO DEVICE
Device: FiiO K11
Mixer name: PCM
Interface: USB
Formats: S16_LE, S32_LE, SPECIAL, S24_3LE, DSD_U32_BE

@"roderickvd” is S24_3LE harder to process than S32_LE?
This device doesn’t support S24_LE.
Set 1: PI 3+B => FiiO K11 => JBL 308P
Set 2: PI ZW2 => Allo Mini Boss => JDS Labs Atom+ => PreSonus Studio 8 
Set 3: PI 3+A => Allo DigiOne => Dynaudio Air 12 + Base 15

Headphones/IEMs: Sennheiser HD6xx, Beyer Dynamic 880 (250 Ohm), 7Hz x Crinacle Zero 2, Moondrop CHU 2
Reply
#5
Yes, it is. Pick S32, that’s higher quality anyway.
maintainer of librespot and pleezer
Reply
#6
(01-09-2025, 09:31 PM)TheOldPresbyope Wrote: @roderickvd 


Quote:...It's overkill but fun...

Best argument I've seen all week Big Grin 

Tongue
maintainer of librespot and pleezer
Reply
#7
(01-10-2025, 08:57 AM)roderickvd Wrote: Yes, it is. Pick S32, that’s higher quality anyway.

Thanks.
I don’t see any noticeable difference in the DSP load in Camilla when changing the word size/layout.
Only when the sample rate is changed, the load varies.
I have settled for 32/96:
   
Set 1: PI 3+B => FiiO K11 => JBL 308P
Set 2: PI ZW2 => Allo Mini Boss => JDS Labs Atom+ => PreSonus Studio 8 
Set 3: PI 3+A => Allo DigiOne => Dynaudio Air 12 + Base 15

Headphones/IEMs: Sennheiser HD6xx, Beyer Dynamic 880 (250 Ohm), 7Hz x Crinacle Zero 2, Moondrop CHU 2
Reply


Forum Jump: