SqueezePlug and HiFimeDIY USB DAC


4 posts
by richvs » Sat Jan 26, 2013 9:51 pm
I had huge problems getting this DAC to work correctly on my Pi with Squeezelite playing from localhost LMS server. Other devices receiving the stream from the same server had no problems and the DAC tested fine on other devices. I had already demoted the internal audio so USB DAC would be priority - my issue was not with no audio but with the quality of reproduction.
I was using Squeezeplug 6.0.2

The issue was a crackling interference noise every few seconds that sounded to me either like sampling problems or like dropped packets over USB. Very clean crackly noise - not like a hum or normal RF interference.

After lots of mucking about with alsa, pulse audio and trying combinations of local files and streamed BBC radio of various bitrates I had no joy. Even a separate powered hub still replicated the problem, so did powering the whole shebang from a battery to rule out a dirty supply rail. My thoughts; it must still be software.

I played a 24/96 FLAC file and it was fine.

I searched for alsa upsampling and came up with this link http://alsa.opensrc.org/.asoundrc#Converting_Sample_Rates_On_Input
As I understand it, this should upsample (by adding zeros?) everything output to the hardware device. Looks like by playing any old mp3 file it doesn't stress the CPU too much (steady 13%).
None of my FLAC files are greater than 96kHz so I am now quite happy to let everything be output at this sampling rate.
Here is my modified asound.conf (i commented out the default entry so you can see what i replaced).

Hope this helps someone and I welcome constructive criticism if I'm not achieving what I think I am.


TL:DR Bloke sorts out HiFimeDIY USB router by changing several lines of text.


Code: Select all
pcm.rate_convert {
        type plug
        slave {
                pcm "hw:0,0"
                rate 96000
        }
}


#pcm.!default {
#type plug
#slave.pcm "hw:0,0"
#rate 48000
#}

ctl.dmixer {
type hw
card 0
}


Posts: 2
Joined: Sat Jan 26, 2013 9:26 pm
by richvs » Sat Jan 26, 2013 11:15 pm
And another thing..!

The symptoms applied for the analogue output of the DAC and the optical TOSLINK output. I had a new home cinema receiver turn up partway through the investigations. Using that I could isolate the ground plane and rule out a dirty supply.
One thing I've noticed while migrating to optical interconnects - a discouraging amount of manufacturers think it's worth mentioning that TOSLINK cables are Gold plated.
Posts: 2
Joined: Sat Jan 26, 2013 9:26 pm
by banjopicker » Mon Jan 28, 2013 2:07 am
This was helpful to me, thanks.
Posts: 1
Joined: Mon Jan 28, 2013 2:06 am
by mantekka » Tue Jun 11, 2013 8:24 pm
Great, I tried this in the hope that it would improve audio and it worked!
I'm using the native audio output on the pi (not the HiFimeDIY).
For some songs it sounds pretty good, others not great, a bit muddy. I guess this is down to bitrate.
I'll see how it goes, but feel I might need a USB DAC to really get the most from it.
Thanks for the tips.
User avatar
Posts: 43
Joined: Tue Jun 11, 2013 8:20 pm
Location: Ireland