Computing & hacking

Mele + DAC + MPD => the perfect bit-perfect setup

Use a Mele A2000 as a low-power bit-perfect audio player: MPD without resampling, NAS over NFS/CIFS, USB DAC (Micromega MyDac) — full config.

By ·· 2 min read· updated

#allwinner a10#debian#ubuntu#bit perfect#dac#mpd

Mele is just a great little platform for so many usage.
Since 2 weeks, i’m using one of mine as a bit perfect audio player:

  • ultra low power consumption – always ready to play
  • usb2 or spdif
  • sata if you don’t have nas

I’m using a Micromega MyDac in usb2 (299 Euros, the best sounding sub-1KEuro DAC).
The setup is quite simple:
(NAS) -> (NFS or CIFS) -> (MELE/MPD) -> (DAC)

The mele is hosting mpd without resampling (because resampling is evil).
Choose ubuntu or debian headless and update the kernel.

I have create a share on my nas and mounted it in /nas (replace XXX with samba ShareName, login, password)
# /etc/fstab //192.168.1.1/XXX /nas cifs username=XXX,password=XXX,_netdev 0 0
You can use nfs also or simply mount your sata disk with your music files in one directory.

Install:
apt-get install mpd alsa-utils

Check you device (this is the output with GFX version – hdmi is creating 2 cards).
# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: sun4icodec [sun4i-CODEC], device 0: M1 PCM [sun4i PCM] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: sun4isndhdmi [sun4i-sndhdmi], device 0: SUN4I-HDMIAUDIO sndhdmi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: MYDAC [MICROMEGA MYDAC], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0

MPD.CONF:
## Things on the nas # keep my DB on the nas to index it with a mpd running on my nas, i have 2To music_directory "/nas/mp3" playlist_directory "/nas/mpd/playlists" db_file "/nas/mpd/tag_cache" log_file "/nas/mpd/mpd.log" pid_file "/var/run/mpd/pid" state_file "/var/lib/mpd/state" sticker_file "/nas/mpd/sticker.sql" user "root" group "root" bind_to_address "any" save_absolute_paths_in_playlists "yes" metadata_to_use "artist,album,title,track,name,genre,date,disc" follow_inside_symlinks "yes" zeroconf_enabled "no" zeroconf_name "Music" input { plugin "curl" } audio_output { type "alsa" # Tune the device here. My dac is card 2. Will be '0' with headless. device "hw:2,0" name "MYDAC" # For hardware mixer: mixer_control "MICROMEGA Clock Selector" auto_resample "no" auto_channels "no" auto_format "no" use_mmap "yes" } connection_timeout "60" max_connections "100" max_playlist_length "16384" max_command_list_size "2048" max_output_buffer_size "8192" filesystem_charset "UTF-8" id3v1_encoding "UTF-8"

ASOUND.CONF
# /etc/asound.conf # Put the card name listed with 'aplay -l' pcm.!default { type hw card MYDAC } ctl.!default { type hw card MYDAC }

It’s done. Restart alsa-utils and mpd. Refresh your file DB.
# service alsa-utils restart # service mpd restart # mpc update
You can now access your mele mpd with any mpd client, your choice. I’m using this:
– MPDRemote from my Nokia N9
– MPDroid from any android
– Sonata from any linux
– Client175 from any browser

For the Micromega MyDac, i can check the status directly here:
# cat /proc/asound/MYDAC/pcm0p/sub0/hw_params access: MMAP_INTERLEAVED format: S32_LE subformat: STD channels: 2 rate: 96000 (96000/1) period_size: 12000 buffer_size: 48000

Yes!
Bit perfect studio master 96KHz 32bit from Lynn Record with a Mele at 0.3 of load, the Micromega MyDac (up to 192kHz) and an audio grade usb2 cable.

The best sub-$500 sound server package you could ever ear.

My final Setup !