First a little background: I have a Raspberry Pi 2 Model B with an IQaudIO Pi-Dac+. I am running Rune Audio 0.3 beta (the March 4 image). I have the RCA jacks on my Pi-Dac+ hooked up to a stereo receiver. I have a USB WiFi dongle, which connects wirelessly (n) to my Actiontec C1000A DSL modem. My internet is supplied by CenturyLink at 7 Mbps.
When I first installed Runeaudio, it played MP3s from a USB drive just fine. However, when I connected to Spotify, I had disappointing results. It would play for a second, then stutter, play for a while, then cut out altogether. Sometimes the UI would become completely unresponsive and I would have to reboot it. Below is a list of changes I made in the order that I made them to fix these problems. Each change made a noticeable difference, but I do not know which ones were truly decisive. Now that the system works, I have not gone back to test all the possible combinations. My hypothesis is that I had a combination of issues related to power management and network congestion. Anyway, here is what I did (YMMV):
- 1. Moved the USB thumb drive to a powered USB hub like this one.
- 2. Replaced the wifi dongle. I had originally purchased this one made by Adafruit. When I replaced it with this one by Edimax, I was greatly encouraged. Spotify would play for longer periods before stuttering.
- 3. Replaced the power supply. I have read that Raspberry Pi's are notoriously finicky about power. I had originally used this one. When I switched to this one from Monoprice, I got much better results. The short stuttering was virtually eliminated. However, it would still pause for 20 seconds or more on about every other song.
- 4. Set the Playback Boost in alsamixer to 0 dB. I have played with the alsamixer settings endlessly to try to solve this issue. The setup that seems to work for me is as follows: PCM=85, Playback=100 (0 dB), Playback Boost=0 (0 dB).
- 5. Configured my wifi router to prioritize bandwidth. The final step in my journey was to adjust the Quality of Service (QoS) settings for my modem/wifi router to give high priority to downstream traffic to my Rpi's ip address.