Chapter 6. Advanced usage

Table of Contents

Bit-perfect playback
Direct Stream Digital (DSD)

Bit-perfect playback

"Bit-perfect playback" is a phrase used by audiophiles to describe a setup that plays back digital music as-is, without applying any modifications such as resampling, format conversion or software volume. Naturally, this implies a lossless codec.

By default, MPD attempts to do bit-perfect playback, unless you tell it not to. Precondition is a sound chip that supports the audio format of your music files. If the audio format is not supported, MPD attempts to fall back to the nearest supported audio format, trying to lose as little quality as possible.

To verify if MPD converts the audio format, enable verbose logging, and watch for these lines:

decoder: audio_format=44100:24:2, seekable=true
output: opened plugin=alsa name="An ALSA output" audio_format=44100:16:2
output: converting from 44100:24:2

This example shows that a 24 bit file is being played, but the sond chip cannot play 24 bit. It falls back to 16 bit, discarding 8 bit.

However, this does not yet prove bit-perfect playback; ALSA may be fooling MPD that the audio format is supported. To verify the format really being sent to the physical sound chip, try:

cat /proc/asound/card*/pcm*p/sub*/hw_params
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 4096
buffer_size: 16384

Obey the "format" row, which indicates that the current playback format is 16 bit (signed 16 bit integer, little endian).

Check list for bit-perfect playback:

  • Use the ALSA output plugin.

  • Disable sound processing inside ALSA by configuring a "hardware" device (hw:0,0 or similar).

  • Don't use software volume (setting mixer_type).

  • Don't force MPD to use a specific audio format (settings format, audio_output_format).

  • Verify that you are really doing bit-perfect playback using MPD's verbose log and /proc/asound/card*/pcm*p/sub*/hw_params. Some DACs can also indicate the audio format.