<?sphp $this->text('pagetitle') ?>
 
Home of the Squeezebox™ & Transporter® network music players.

Digital Volume Control and SNR

From SqueezeboxWiki

Jump to: navigation, search

Found this post by Sean Adams about volume control and Signal to Noise Ratio in the forum and thought it would be useful to enough folks that it should be posted here in the Wiki:

http://forums.slimdevices.com/showthread.php?t=30916&page=2

" I think the easiest way to understand this is to forget about numbers, decibels, and bits per sample for a minute, and just think about what's coming out of the DAC.

To oversimply only slightly: there are two things always coming from the DAC. 1) signal and 2) noise.

The level of the noise output stays the same no matter what signal level is being produced. That is really important to understand!

When the DAC is making a loud signal, there is a lot of signal and a little noise. That's a high SNR, which is good.

However, when the DAC is making a quiet signal, you have a little signal and a little noise. If we now consider the noise level in relation to the signal level, the noise is now louder. The noise level hasn't gone up in absolute terms (eg volts), but relative to the signal it has, so you now have a bad SNR.

Now consider a simple resistor attenuator being fed by a loud (good SNR) signal from the DAC. When the voltage passes through the resistor divider, everything gets attenuated - the signal and noise together. You have the same* SNR coming out of the divider as you had going in, i.e., the DAC's optimal SNR is preserved.

OK, now back to bits per sample. As you can see, the above effects really don't have much at all to do with bits per sample. We could send a million bits per sample, and it would still be the same. So why does bit depth matter? What is the significance of 16 vs 24 bit?

What matters is that we send enough bits per sample that the DAC's full dynamic range is utilized. It is important to realize that the DAC's dynamic range is finite, and is less than its input word size - more like 20 bits, since it is limited by its output noise level.

By "expanding" a 16 bit signal to 24 bit, all we are doing is saying "these 16 bits go in the most significant slots of the 24 bit word". We haven't improved the SNR of the signal, any more than you can "enhance" a digital photo the way they do on CSI.

If we attenuate the 16 bit signal, yes, the zeroes and ones will migrate down into the least significant bits of the 24 bit word, and yes, if we still "have all the bits" we could then mathematically go in reverse and get back to the same data. But that is not what the DAC does with the signal! The bits represent a smaller signal now than they did before. We still have exactly the same decreasing SNR effect. Sending 24 bits into the DAC just means we aren't making it any worse than it already is. We haven't "bought more headroom"... it does NOT mean that those first 8 bits of attenuation are "free".

To prove this, you could play a sine wave through the DAC and measure the SNR at each volume step. We would expect to see the SNR decrease as the volume is decreased. If there were anything special about the point where we start "losing bits", or if we were really getting "extra headroom", then the plot would decrease slowly (or not at all) until it reaches that point, and then there would be an inflection.

However, that is not what you'll see. The SNR will simply decrease with the signal level, all the way down.

I hope this helps... for extra credit maybe someone will try testing this?

  • Actally, there are a number of secondary effects which reduce the SNR by the time it gets through the amplifier, but these are vanishingly small in comparison. "