Experiences of building a dedicated Linux mini itx music server for Dac v1

Posted by: sjt on 28 September 2013

This post is simply my experiences of building a mini itx server to connect to my newly purchased dac v1 and nap 100 amp (well pleased with them!). I am posting this in case anyone else is interested in doing this, in the hope that this is helpful. Warning lots of technical detail below! Could be boring for some.
 
Based on some reading of comments in the naim forum and other places, I decided to make a music server that could be connected directly to the Dac V1. I have a squeezebox touch, and this is connected to the dac via spdif, but this is wirelessly connected to my main file server, which i understand is not optimal. Also, on occasion the wireless drops out and its difficult for me to have a wired ethernet network. So I decided to exploit the usb input of the dac v1 by making a dedicated music server out of a spare 2TB hard disk I had lying around and a mini itx board, put together in a small case. This could sit next to the dac v1 and be connected via the asynchronus usb.
 
 My requirements were as follows:
  • Music stored locally on hard disk of music sever (no wireless streaming and I get a backup of the music thrown in as a side benefit).
  • Music comes out of the usb asynchronus connection.
  • Control of playback etc via wireless and via a web browser.
  • Automatic synchronisation of tunes from main file server to music server via wireless.
  • Low power and quiet as possible.
  • Runs headless - no need for monitor and keyboard.
I bought a cheapish mini itx board with an intel atom processor built in, 4GB of memory and a small case that included a power supply and that could take the board and my 2TB 3.5" disk. Total cost not including the disk was about UKP 160.
 
The plan was to put some flavour of Linux and have a squeezebox server with a local player on it, and use the usb audio out.
 
I initially decided to put Vortexbox on the server, and this I did. I installed Vortexbox and customised it as follows:
  • I installed a desktop on it (gnome)
  • I installed a VNC server so I could connect remotely and the machine could run headless.
  • I fixed the music server's IP address in my router so I could make bookmarks in my browser
  • I installed webmin, which is a web-based linux configuration tool (very handy for all sorts of admin tasks)
  • I installed samba (cifs), which allows me to mount disks from this machine in windows and mount my file server disks as well.
Once all this was done, the machine was running headless. Next, I set up a cron process to rsync my music from my main file server wirelessly (the first rsync was connected with a wired connection and took overnight - I have about 700 GB of flacs at the moment). I then installed squeezebox server and squeezeplay as a player, and the squeezebox server found all my music, and I got playing music through the Dac v1 and the amp, controlled via a web interface I could access in a web browser.
 
Once the music was playing I discovered a strange thing and this was to do with music coming out of different types of usb port. On my mini itx board I have some usb 2 and some usb 3 ports. I found that sound came out when the dac was plugged into the usb 2 ports, but no sound came out when the dac was on the usb 3 ports. Also, when I was playing using the usb 2 ports, I found that for high res files (96k and above), the dac's buffer was overflowing and I was getting glitches.
 
I tried lots of things to fix this, including getting rid of all audio layers apart from ALSA on the vortexbox, so I was just using plain ALSA (I think this is pretty low level in Linux), and I was using a comand line tool called aplay to test, which only takes WAVs and sends them to the selected audio device (in my case the dac v1 on the usb). I believe (I could be wrong) that there is a usb audio driver in the kernel, and aplay talks direct to this. Anyway, this was as low level as I could get, but the buffer kept overflowing with >=96k files.
 
I looked at the vortexbox software and noticed that it is based on Fedora 16, which I think is a couple of years old now, so I had a guess that the vortexbox kernel might not include latest drivers for usb 3. I had nothing to lose, so wiped the disk and installed Lubuntu Desktop 13, which is lightweight and pretty new. This also gave me the opportunity to partition my 2TB disk - I wanted a partition to put the operating system and a separate one for the data, so if I wanted to install a new OS, I wouldnt have to copy all the music again.
 
I installed Lubuntu and got it running headless and did most of the customisation things I had done on vortexbox. I installed SB server and this time squeezelite (this seemed a bit more suitable for a headless machine), and this time audio >=96k still overflowed the dac v1 buffer on the usb 2 port, but this time it worked perfectly on the usb 3 port. So I have left it plugged in there! , On the usb 3 port all bitperfect tests pass, and the data buffer bar in the usb status display locks in well on usb 3 (on usb 2 the bar keeps growing until it overflows). 
 
I am convinced that the overflowing is nothing to do with the dac v1, as I tried it on other machines via SPDIF and USB and it works vert well. I suspect it is something to do with either my mini itx board or linux drivers.
 
Now the system is up and running well and serving music straight to the dac v1 via the usb 3 port and it sounds great - I am well pleased with it. I login to the squeezebox server to select and play some music and that's all the control I need - I can do all the other control with the dac v1 remote.
 
There is only one small downside - the mini itx board has a cpu fan and it is running about 2000 rpm, and is noisier than I want. I cant hear the fan when music is playing, but i can when the room is quiet. I think this is because I have a big 3.5" disk in the case with the board and this osbtructs the airflow a bit. The CPU temperature is stable at 50 deg C. This is not particularly high, but I am investigating ways of making the thing run cooler (undervolting and turning off irrelevant processes etc).
 
Another thing I want to try is to see if I can get the play / pause buttons etc on the dac to control the playback on the server - i.e. play / pause - this is really a nice to have though - not that important.
 
Anyway this has gone on long enough. Hope this helps someone!
Posted on: 29 September 2013 by sailorck

Thanks for sharing your experiences. I guess you are already aware of the comuter audiohpile pocket servers: http://www.computeraudiophile.com/section/c-p-s-489/

 

Some good hints there on DIY servers with an emphasis on audio.

Posted on: 14 October 2013 by Fabio Volpe

I tried some players for linux and I think that, at the moment, mpd is the best sound player in terms of sound quality.

Squeezelite sound quality is not as good as mpd. Probably the problem is the way that squeezelite handles the sound card buffer, but i didn't make tests with different buffer size.

I suggest you to try mpd.

Bye

  Fabio