System Preparation
For maximum performance, you need to use the native Linux-ALSA stack! Please avoid PulseAudio if you want to obtain the best audio quality from your Tone2 Pro or Tone1.
Disable PulseAudio for Tone2 Pro, Tone1, and other Khadas Audio Devices
NOTE: You can skip this step if PulseAudio not installed in your system. To check, use the command:
1 | which pulseaudio || echo PulseAudio not installed |
If PulseAudio is installed, it is very easy to create a custom configuration file!
1 | sudo tee /etc/udev/rules.d/89-pulseaudio-usb.rules <<END |
Now just re-plug your Tone2 Pro or Tone1 device to your machine for the new configuration to take effect.
Check If Native DSD Playback is Supported on Your Tone2 Pro or Tone1
Enter the following command into Terminal:
1 | grep -H DSD_U32_BE /proc/asound/card?/stream0 && \ |
What should I do, if DSD is not supported?
Your Linux system is using an old kernel! Please check your kernel version using the command uname -r
, and check this topic https://forum.khadas.com/t/does-the-v2-00-firmware-sound-better/10176/6, and then upgrade your Linux kernel.
How to Display All Supported Formats
Get a list of all supported audio file formats using Terminal:
1 | grep "" /proc/asound/card?/stream0 |
Example Output:
1 | Khadas Tone2 Pro at usb-0000:03:00.4-1, high speed : USB Audio |
Use MPD Audio Player with Tone2 Pro and Tone1
About MPD
Music Player Daemon (MPD) is a flexible, powerful, server-side application for playing music. Through plugins and libraries it can play a variety of sound files while being controlled by its network protocol.
Why MPD?
- Maximum performance - YES
- Bit-perfect audio playback - YES
- Native DSD playback - YES
MPD User Manuals
- https://www.musicpd.org/doc/html/user.html
- https://wiki.archlinux.org/index.php/Music_Player_Daemon
man mpd
Install MPD (example)
1 | sudo apt-get install mpd mpc ncmpc |
Prepare MPD (example)
Create music folders and the mpd config file (your music library must be accessible from these folders)
1 | mkdir -p ~/mpd/music ~/mpd/playlists |
Minimal MPD Config File (example)
MPD searches for a config file in $XDG_CONFIG_HOME/mpd/mpd.conf
then ~/.mpdconf
then /etc/mpd.conf
or … read more man mpd
1 | $ nano ~/.mpdconf |
1 | # ~/.mpdconf - minimal mpd configuration for bit-perfect DSD playback |
How to Get the Proper ALSA Device Name, to get Bit-Perfect Playback
aplay -L|grep -A1 ^hw:
- full listaplay -L|grep -A1 ^hw:|grep USB -B1
- only usb listaplay -L|grep -A1 ^hw:|grep Tone -B1|head -n1
- only for Tone board
Start MPD service
The system will automatically start the MPD service, we need to restart this service with ordinary users
1 | $ sudo systemctl stop mpd |
Basic MPC Usage Example
mpc is a command-line client for the Music Player Daemon (MPD). It connects to a MPD and controls it according to commands and arguments passed to it. If no command is given, the current status is printed (same as “mpc status”).
1 | mpc add DSD_test_512.44100.2.dsf |
How to Check Which Output Format and Rate is Currently Used for My Tone Board?
1 | cat $(dirname /proc/asound/card?/stream0)/pcm?p/sub?/hw_params |
Native 512-DSD output example:
1 | access: RW_INTERLEAVED |
MPD Client Interfaces
- mpc - command-line client (must have)
- ncmpc - common console GUI (must have)
- M.A.L.P. - android client
- A MPD client for iOS - iOS player
- full list - https://www.musicpd.org/clients/
All are welcome to give comments, replies and suggestions for improvement!