pHAT DAC ground noise & CPU load noise


#1

Hi there,

I’m pretty new to the world of Pi. I have already quite successfully set up a Pi 3 with an external USB DAC to be used as a home theatre system and Airplay device (shairport-sync is great), so I ventured in to the depths of multiroom audio.

Got myself a nifty little Pi zero and a pHAT DAC. My first time soldering and it all seems good.

BUT - I’m experiencing some issues with noisy output. Whenever there appears to be a high CPU load or a heavy SD card load my headphone jack outputs A LOT of data transfer noise. It can be so intense that if I am listening to music while shelled in to the Zero, the music can cut off completely.

Is this a known issue, or a potential soldering problem, or a software issue?

Any help would be greatly appreciated. All firmware is totally up to date, and the only thing I have plugged in is the official Pi USB Dongle, and I’m using the official power supply.

T


#2

Same noise issues with Pi 3. Very bothersome.


#3

Our engineering big-guns wont have time to look into this properly until after we’re back from Berlin Maker Faire, but it sounds quite likely to be a software/load issue and not an electrical one.

If it is, indeed, happening only during high CPU load and involves complete drop outs then it’s probably just the Pi being overloaded and unable to keep up with audio output. In my experience shairport-sync can be intermittent even at the best of times- I’ve used it extensively to add a USB headphone output to my Apple TV on either a Pi 2 or 3 (I’ve lost track!) and it still suffers occasional dropouts.

We use a Pi Zero + pHAT DAC as a Spotify audio system hooked into desktop speakers in our office and it’s been pretty much perfect.


#4

Hey, thanks for the quick response! I hope the Faire is great.

So I’ve been playing around with my Zero. Namely using different PSUs on different power rings within the house, and I just think that the pHAT DAC is quite sensitive to fluctuations which results in some interesting and at times bizarre noise from the line out. I’ve ordered some high quality usb cables and 3.5mm jacks, all in an attempt at shielding the signals from the speakers. I’m using quite high spec amps and speakers in my set-up and I think they are generally quite receptive to the hissing and bleeping the DAC emits. Disabling audio dither also helped a little.

RE the high CPU loads and SD Read loads - I reinstalled my Zero with Jesse Lite (Don’t know why I din’t do that in the first place… N.B. I had some real issued trying to get WiFi to work with wpa_supplicant. My Zero REALLY didn’t like the idea of DHCP. Had to revert to static, which i kind of don’t like for some reason) and it has helped a great deal. I still get quite a bit of jitter from time to time, but I suspect this is now a networking issue rather than a Zero issue, although my Pi3 seems to be able to deal with networks better. And, as you say, I’m sure it is also due to limitations within the shairport-sync application.

I’m still wondering whether this is a soldering issue. I can’t see any blemishes - I’m rather proud of myself for a first try actually! - but I know from other sources that soldering ground pins can be a little tricky, and I’m wondering if they’re not soldered correctly it can cause a little bit of extra ground interference through line out? That may be totally stupid and completely nonsensical. I’m afraid I don’t have much experience with hardware and hacks etc. The Pi is my first venture in to this kind of stuff!

Lots of love,

T

EDIT: Also I should mention that this Pi is dedicated solely as an Airplay receiver. The only other thing it ever does is accept SSH connections. Surely it has enough processing power to manage this without interrupt?


#5

I separated the PHAT DAT from the ZERO by several inches and the noise vanished. Really wanted to keep it all nice and tidy. But it works for now.


#6

Interesting… Did you originally have it wedged up close and personal to the Zero? I’m not sure how I could separate mine further as I am using male and female GPIO headers already…


#7

Had this problem too, my phat DAC is connected to an adafruit max 9744; no problem at all when they’re on separate power supplies, but when I run them both off the same one I get awful noise that correlates to load on the pi. Ground loop isolator solved it but fairly irritating to need that


#8

Hi there. I’m developing Shairport Sync, and recently have started outputting to a PHAT DAC at the full 32-bit resolution. The PHAT DAC doesn’t have a mixer, so the volume control attenuator must be implemented in software and the output must be dithered. Fair enough. Moving to 32 or even 24 bits means that the dither can be very much lower than before, which is great.

However, the newly lowered noise floor has revealed a noise which is bothering me. Having done a lot of testing on various Raspberry PIs of various types, I’m convinced that it happens only when the PHAT DAC ALSA driver’s state transitions from the state SND_PCM_STATE_PREPARED to SND_PCM_STATE_RUNNING. It’s as if the device is turned on or woken up or moved out of a power down mode, or something.

If I connect the PHAT DAC to a component stereo amplifier and turn the volume up full on the amp, the output is admirably quiet while Shairport Sync is idle, but an audible glitch occurs when output to the DAC starts. Then, if the first few seconds of programme material are meant to be silent, the output is again totally silent (the dithering is inaudible).

So, what’s causing the glitch? Am I barking up the wrong tree?