FAQ - librespot-org/librespot GitHub Wiki

For audiophiles

I have a volume knob on my amplifier. How do I disable software volume?

To completely disable software volume control, start librespot with these parameters:

--mixer softvol --volume-ctrl fixed --initial-volume 100

How to leave all samples untouched?

If you want to leave all samples completely untouched, and are in any format other than F64, F32 or S32, then also disable dithering:

--mixer softvol --volume-ctrl fixed --initial-volume 100 --dither none

I am trying to use directly alsa's hw:x,y, but librespot crashes with alsa error: PCM open failed.

This happens with more expensive DACs which do not support 16-bit samples, for example the Aune X8, and many others. librespot outputs 16-bit samples by default and this leads to incompatibility problems and ultimately the mentioned PCM open failed error.

To find out what sampling rates and formats your DAC supports, you can use:

aplay -Dhw:1,0 --dump-hw-params /usr/share/sounds/alsa/Front_Right.wav (replacing 1:0 with the card # and device #).

Supported formats of your DAC are listed in this line: FORMAT: S24_3LE S32_LE

Then you need to make sure you start librespot with the --format parameter specifying a value that your DAC supports. In this case you can use:

librespot --backend alsa --device "hw:1,0" --format S32