Skip to main content
Playing DSD files on Linux

This article dives into the possibilities of playing DSD on Linux OS; and converting DSD to FLAC files.

Jonas Sacks avatar
Written by Jonas Sacks
Updated over a month ago

• NativeDSD.com is the largest high-resolution download store for DSD and DXD music, with over 3,300 Albums from over 100 Record Labels.

• Verified high-res audio sources: DSD 64, DSD 128, DSD 256, 352.4kHz (DXD), 384kHz original recording format, or Analog Tape Transfers direct to DSD or DXD. Try DSD for free!

If you are having trouble downloading your purchase on your Linux machine, please contact our support staff so we can turn on browser-download links for you.

Special thanks to Mike G., Grégoire Neuville, Andrew J. Caines, Marko Uibo, Thomas Holmes, William Frawley, Michael Dily and Hinrich Gilhaus for providing these details on Linux DSD playback.

If you are a Linux user and think this article can be improved, please message us at support@nativedsd.com so we can include your input here.


Introduction

More common players like Clementine (an iTunes-style jukebox player), VLC, and lots of others have no problem playing DXD (352.8KHz sampling rate, 24bit sample depth FLAC) on Linux. For DSD playback, we dive into the various options below.

The main component in Linux kernel, that ties software to hardware, is ALSA - https://www.alsa-project.org/wiki/Main_Page. ALSA is responsible for all audio related things in the Linux world. ALSA directly supports DSD playback and if DAC does it too, no extra configuration is needed.

Hardware

On Linux, in most cases, DAC-s that are UAC 2.0 compliant should work out-of-box without any configuration. This is almost rule of thumb, with some exceptions. Amanero384 boards ship with old half UAC compliant firmware limiting DSD playback mostly to DoP mode. XMOS based devices have worked well for some users. Musician Pegasus uses some kind of chinese solution and on Linux it also worked up to DSD256. Fortunately nowadays most good DACs should be UAC compliant, this same thing actually determines if the device is supported on mac. More info about UAC 2.0 - https://www.xmos.ai/download/Why-do-you-need-USB-Audio-Class-2?(1.0).pdf.

Not very well organised or precise list of DAC-s support on Linux: https://community.volumio.org/t/usb-dac-compatibility-list/1997

Software that plays DSD files on Linux

JRiver Media Center

My preferred tool is JRiverMC. The important point is here to find the
right audio device for unconverted DSD from a long list of of devices.
The correct one is labeled

hw:CARD=ND8006,DEV=0 [ALSA] ND8006, USB Audio. Direct hardware device
without any conversions.

where ND8006 is my Marantz ND8006 USB-DAC.

Aside from the * Debian * Ubuntu * Mint, I have for the latest Fedora release 39 DSD working as well. I have updated and found the proper
device for playing DSD (DOP mode for my ND8006). aplay -L shows it as

iec958:CARD=ND8006,DEV=0
ND8006, USB Audio
IEC958 (S/PDIF) Digital Audio Output

HQPlayer

For new users, HQPlayer may be the most simple solution.

MPD

MPD is client-server solution and needs a bit configuration to let it know, where music is located and which DAC to use. MPD is actually used as a backend in Volumio. It is important to pay attention that hardware itself is selected for audio output. Many general purpose distributions include PulseAudio/Pipewire for sound mixing and by default direct all streams into it, these software layers don't support DSD. Hardware outputs are usually marked as HW:0,0, HW:1,0 and so on. https://www.musicpd.org/

Configuration of mpd is in the file /etc/mpd.conf. The main things you need to specify are the location of your music, where mpd will store its data, and selecting/configuring the DAC. "Configuring" consists mostly of setting a few options to stop alsa from resampling to PCM and deciding whether DoP is needed.

# indicates a comment, which is ignored by mpd.

# Location of your music files:
music_directory"/home/mike/HD_Music"
# If you keep your music in your home directory, mpd has to run as you to
# have permission to read your files:
user "mike"

# Places mpd stores internal information:
playlist_directory"~/.mpd/playlists"
db_file"~/.mpd/database"
# log_file"~/.mpd/log" #optional, but nice to have when things don't work; don't use with systemd
pid_file"~/.mpd/pid"
state_file"~/.mpd/state"
sticker_file"~/.mpd/sticker.sql"
bind_to_address"~/.mpd/socket"
log_level"error"
metadata_to_use"artist,album,title,track,name,genre,date,composer,performer,disc"


# Configure your DAC:
# You can have more than one. Just create an audio_output{} section for each.
# Look at Maxie's Notes for examples of other DACs.
audio_output {
type"alsa"
name"iFi Zen Air"
device"hw:2,0" # customize for your DAC; run aplay -l to find yours
auto_resample "no" # otherwise, ALSA will convert everything to PCM
auto_channels "no"
auto_format "no"
# dop "yes" # Don't enable DoP unless you know you need it. Look in your DAC's manual.
mixer_type "none"
replay_gain_handler "none"
}

Enable and start mpd using systemctl. (I don't use systemd, but almost everyone else does.)
sudo systemctl enable mpd.service
sudo systemctl start mpd.service
If you change anything in mpd.conf, don't forget to restart mpd.

After this, just select a client, e.g. cantata.

An alternate method from another user:

For my concern, a gentoo distro, running mpd as a root daemon is forbidden, it could lead to security issues. So, I have to run it with my current user.

For this, I leave /etc/mpd.conf untouched, I copy it in my $XDG_CONFIG_HOME/mpd (wich is /home/xxx/.config/mpd) and I apply the changes to this one, with all directories located in my home (eg ~/.mpd/playlists, ~/.mpd/database, ~/.mpd/pid, and so on.....)

Once this is done, I run mpd as my user, not root, and it works perfect.

I launch cantata, at the start it always ask to connect to localhost:6600, I accept it, and the first time you need to refresh database, and that's okay !

music_directory "Your music directory"
playlist_directory "~/.mpd/playlists"
log_file "~/.mpd/log"
state_file "~/.mpd/state"
user "Youruser"
bind_to_address "localhost"
port"6600"
log_level"verbose"
auto_update"yes"
follow_outside_symlinks"yes"
database {
plugin "simple"
path "~/.config/mpd/db"
cache_directory "~/.config/mpd/cache"
}

input {
plugin "curl"
}
audio_output {
type"alsa"
name"My DAC"
device"hw:2,0"# optional
auto_resample "no" [# otherwise, ALSA will convert everything to PCM]
auto_channels "no"
auto_format "no"
mixer_type "software"
replay_gain_handler "none"
}

filesystem_charset "UTF-8"

Volumio

Cantata

Strawberry

Strawberry is a music player and music collection organizer for Linux, macOS and Windows. It is aimed at music collectors and audiophiles. With Strawberry you can play and manage your digital music collection, or stream your favorite radios.

Strawberry installation from the command line:

sudo add-apt-repository ppa:jonaski/strawberry
sudo apt update
sudo apt install strawberry

Daphile

moOde Audio

moOde audio (https://moodeaudio.org/) runs on Raspberry Pi computers. It comes with MPD (Music Player Daemon, https://www.musicpd.org/) pre-installed which is able to play DSD (https://mpd.readthedocs.io/en/stable/user.html#direct-stream-digital-dsd) up to any sample rate supported by the DAC configured. MPD can run on any linux distribution.

Celluloid

Celluloid is pre-installed in Linux Mint. It is a video player but it also plays DSD up to 512. Celluloid is a front end GUI for the command line media player mpv. If it isn't preinstalled, just install it using the package manager. It's also available in Arch.

  1. Connect USB DAC to you computer.

  2. Open a terminal window and run the following command: mpv --audio-device=help

  3. Look for the name of your DAC in the output. E.g. NW-A45 Walkman is called 'alsa/plughw:CARD=WALKMAN,DEV=0'

  4. Run celluloid and open the preferences menu.

  5. Add --audio-device='name of your DAC' to Extra MPV Options: See screenshot.

Celluloid on Linux Screenshot

DeaDBeeF

Deadbeef doesn't require installation, unpacking the tarball will put an executable directly on your machine. DeaDBeeF will play anything up to DSD256. On Debian/Ubuntu/Mint, just playing a DSF is pretty simple:

  1. Uncompress it. (Just like in Windows, most Linux distros have a Desktop environment (KDE, Gnome, whatever) which includes some kind of graphical archive/file manager.)

  2. Drag the deadbeef-devel folder out of the tar.bz2 archive to where you find convenient. The desktop, for instance.

  3. Double click deadbeef and use the file selection dialog to open and play a DSF file.

To avoid messy package-building and complicated installations, we have chosen this static binary version. ("Static" means the deadbeef file includes needed libraries.) We are not sure what Linux distributions the DeadBeeF developers use, but have tested this binary on Linux Mint, which is based on Debian/Ubuntu, one of the most commonly used distributions. It is also tested it on Arch and it worked fine. These 4 steps are probably enough for any current linux distribution.


Arch

On Arch--assuming the user already has an AUR helper installed and most people do--installation is so trivial, can't resist mentioning it:

  1. Install deadbeef-git with your favourite AUR helper. For instance, run this command: yay -S deadbeef-git

  2. Wait a little bit for it to build, and enter the admin password to install.

  3. Launch deadbeef from your GUI or command line and select a DSF to play.

AUR stands for Arch User Repository. It allows Arch users to easily build and install programs not included in the official distribution. An AUR helper like yay or trizen automates the tedious and often messy business of compiling from source, packing up the files, and installing the package. Most Arch users already know all this.

Notes

AP Linux

Audiophile Linux (http://www.ap-linux.com/) has its kernel and processing all optimized for audio playback with full DSD support. Their software is a bit less common but high-end listeners might be interested in dedicating a box to ap-linux and hi res playback. AP-Linux uses Deadbeef and Cantata for DSD.

Converting DSD to FLAC on Linux

To convert a DSD file to a FLAC file, you can use dsd2flac (which you can find here: https://www.sonore.us/dsd2flac.html ). It can now be used to convert DSD256 and below to DXD or lower bitrate FLACs.
https://github.com/dhalsimax/dsf2flac . Just follow the instructions to compile this version and use it with Sonore's nice Java GUI: dsd2flac_gui.jar.

Settings shown above: 352.8KHz sampling rate, 24bit sample depth, dithering ON, DoP OFF, 4dB volume increase. (All settings are the default values except for the sampling rate. Confusingly, Sonore calls the command line backend dsf2flac and the GUI dsd2flac.)

Did this answer your question?