Electrical – linux – SGTL5000 codec noise

audiolinuxpcb-design

I built an audio baseboard for an i.mx6 board built by embeddedarm(ts4900). I used the ubiquitous sgtl5000 codec from freescale. While the end result works ok, I find that the output from the line out is noisy, with noise starting about -55db from peak. I feel like this is a codec misconfiguration or obscure layout issue, but its not clear to me.

Link to amplified audio file, note the quiet white noise when pcm dac is set to 0.

If I set the pcm dac output to zero, the noise drops to normal white noise. This would make me suspect the codec rather than my analog stage.

Per linux sgtl5000.c mods, I see it is not using the internal charge pump, which is right.

I also have done testing with the riotboard which has the same processor and codec, and find similar results, although the noise is about 5-10db less. One difference is that they have powered vdda with 2.5v.

Green is analog ground, brown ground, purple -12v, orange +12v

R41 is not placed.

SGTL5000 schematic
Layout

Best Answer

There are several possible causes.

First, there are big mistakes in the layout posted by OP, most important first:

  • Using split ground planes on an analog-only board
  • AGND and DGND are not tied together under CODEC chip
  • GND copper pour on top layer creates shared impedance between decoupling caps and GND reference for opamps etc

First two points conflict with datasheet, which is quite specific about how the grounds should be connected...

Noise sounds periodic. It sounds a bit like noise you could find on a power supply rail in a digital board. There seems to be "something" happening around 10 Hz, could be a cpu waking up, consuming power and adding spikes to the rail voltages.

Noise when using DAC but not in analog bypass mode implies the opamps and other analog circuits are not the cause.

IMO, the culprit is the split plane layout, no need to look further, but just in case...

Play 0.1Hz sine wave, or play a constant sample value like zero, and wiggle digital volume control around. Do not set it volume to 0 as it may trigger some muting or power saving circuit, use the lowest volume setting instead.

  • Noise goes up and down in amplitude according to sample value and/or digital volume control: this means the DAC reference voltage is noisy. DAC output is the multiplication of sample value and reference voltage. Noise on reference voltage thus produces noise on output, whose amplitude is proportional to sample value. Improve reference filtering, and refer to proper pin (usually AGND).

  • Noise stays constant no matter what you do, except it disappears when volume is set to 0: this can occur if the chip has a MUTE feature. Ignore this.

Once the reference voltage is no longer suspected, test analog power supplies for noise. If the noise on them is similar to the noise on the output, which should be easy to spot considering the periodicity of this noise, then your problem is low PSRR. Improve analog rail by adding more filtering or generate your +3V3 using a linear regulator from a higher rail.

There could be other causes, like RF on the outputs being detected by the opamps, but I highly suspect the problem comes from the layout.