anandvnath
Posts: 2
Joined: Mon Feb 08, 2016 4:45 am

HOWTO: Setting up Raspberry Pi 2 as a HiFi music player

Mon Feb 08, 2016 4:49 am

I just finished setting up my RPi2 using the following components. Thought this might be useful for someone having trouble with similar setups.

Setting up Raspberry Pi 2 as a HiFi music player using:

- Raspberry Pi 2 - MODB - 1GB - Quad core
- TP-Link TL-WN725N 150Mbps Wireless N Nano USB Adapter
- Audioquest Dragonfly 1.2 DAC

1. Setup Raspbian
Using either of the NOOBS (Offline and network install or Network install only)

https://www.raspberrypi.org/downloads/noobs/

2. Setup WiFi

TP-Link TL-WN725N is a plug and play. The drivers were already available, only required me editing the config /etc/wpa_supplicant/wpa_supplicant.conf to add network details. Refer: http://www.fars-robotics.net/

Code: Select all

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Add my network information

Code: Select all

network={
    ssid="Your-Network-Name"
    psk="Your-Network-Password"
}
If you have issues with drivers, all the different RPi version with driver configuration can be found at: viewtopic.php?p=462982

Update - 2017 May 11
Recently I found the TPLINK connectivity to be very choppy. I reinstalled the driver from the above link and it started working really fine. Another tip about bad connectivity is to check the power saver option on it

Code: Select all

 sudo iwconfig 

[/color]

Reboot RPi

Code: Select all

sudo reboot
3. Setup mpd

After plugging in my DAC, Alsamixer did not work for me. I was able to see the two options (on board sound and Dragonfly) in alsamixer, but choosing the DAC did not have any effect. So I went ahead and installed MPD. Instructions can be found: http://lesbonscomptes.com/pages/raspmpd.html (Refer MPD Installation section).

Code: Select all

sudo apt-get update
sudo apt-get install mpd
After installing MPD, I need to configure an audio_output for directing sound to my AudioQuest DragonFly 1.2. For this edit: /etc/mpd.conf. Refer http://linux.die.net/man/5/mpd.conf for configurations.
In order to maintain bit transparency, I had to ensure the mpd.conf inhibits all auto conversions

Code: Select all

sudo nano /etc/mpd.conf
audio_output {
....
  device        "hw:1,0"    # This is need to redirect sound to USB DAC output. Keep 0,0 if using the Pi audio
  auto_resample "no"
  auto_channels "no"
  auto_format   "no"
....
}
Reboot mpd service

Code: Select all

sudo service mpd restart
4. Setup UPNP for MPD

Install the upmpdcli as per : http://lesbonscomptes.com/pages/raspmpd ... l#upmpdcli

Edit or create and add upmdpcli.list and add the following lines:

Code: Select all

sudo nano /etc/apt/sources.list.d/upmpdcli.list
deb http://www.lesbonscomptes.com/upmpdcli/downloads/debian/ unstable main
deb-src http://www.lesbonscomptes.com/upmpdcli/downloads/debian/ unstable main
Issue the following commands from a terminal to install upmpdcli:

Code: Select all

sudo apt-get update
sudo apt-get install upmpdcli
Reboot RPi

Code: Select all

sudo reboot
Setup is complete.

Now you can play music from your UPNP / DLNA server on to RPi and on to Audioquest Dragonfly 1.2 DAC. I tested have tested this setup for bit transparency and it works fine. If you have any issue, it might be at the UPNP server end.

Return to “Troubleshooting”