The Case for Digital Volume Control

Many audio systems are at least partly analogue, i.e. there are analogue sources and there is an analogue pre- or power amplifier. However, it is becoming more and more often the case that there are no analogue sources at all, or that due to the presence of a DSP in the system, all analogue inputs are converted to digital.

In the case where your audio system is primarily digital, many people still swear by analogue volume control. And I don’t really get it – I have never understood the reasons quoted for doing so, and the added complexity (not to mention more components in the signal path!) is just cumbersome. Even colleagues whom I regard to be absolute geniuses and designed some of the world’s best D/A converter chips could not convince me why this would be a good solution.

So, I’m going to put a stake in the ground here and open the floor to what I expect will be a massive flame war. Bring it on…

Basics

Most of the specifications that we can objectively discuss in this context relate to signal and noise. Since the signal starts out in the digital domain and ends up in the analogue domain (per definition!) we have to consider both digital as well as analogue noise.

Digital noise may be expressed in two ways – either as SNR (distance to the maximum signal level 0 dBFS), or as ENOB (Effective Number of Bits), which is often called resolution and relates as SNR = 1.76 + 6.02 * ENOB. So a 16 bit resolution equates to a digital noise floor of -98 dB and it takes little to understand that a 24 bit signal makes absolutely no sense when you think of it in terms of SNR, let alone a 32 bit signal.

Yes, there are applications for 24 and more bits in signal processing (including volume control), but not in D/A conversion.

So let’s look at what signal and noise do for a digital and an analogue volume control.

Spectrum of a digital signal

Here we are playing a tone with a maximum amplitude of 0dBFS and plotting the spectrum indicating the noise distribution (assuming enough averages such that FFT noise does not dominate). If we remove the signal and add the noise spectral density over the bandwidth, we end up with the digital noise.

At some point in the system we will however transition over into the analogue domain and the analogue noise will add to the digital noise. A good mixed-signal designer knows to budget his system such that the analogue noise dominates the digital noise by at least 10 dB (since digital noise is cheap to reduce compared to analogue noise). So, without any volume control, the analogue output is such:

signal, digital noise (green) + analogue noise (red)

The system noise is now dominated by the analogue part. A good designer chooses the components such that at maximum level, the total noise is not audible to the user. That means taking into account

  • how much amplification is needed and what the maximum level should be
  • what the level of background noise is
  • and therefore what the required system SNR should be.

Using these considerations one can estimate the minimum needed SNR since often a trade-off against cost should be made. It makes no sense to put a power-hungry and expensive 123 dB SNR D/A converter into a mobile phone, which is operated in environments with such background noises that 80 dB of SNR would probably suffice. For home listening environments, depending on background noise and the maximum power, 100 dB is the minimum and 120 dB is probably more than you will ever need. With parts like these, you will not have to worry about hearing digital noise ever again.

So, we have an inaudible analogue noise floor and a digital noise floor which is at least 10 dB below inaudible.  And now we can discuss volume control.

Analogue volume control

Let’s further assume that the volume control circuit does not add any noise of its own (which is quite optimistic). The volume control circuit scales down all of the incoming signal, both signal and noise.

analogue volume control

So what has happened? The digital resolution has stayed the same. Wonderful. This is the main point argued by proponents of analogue volume control.

But what does that bring? The analogue noise floor has stayed the same while the digital noise floor, which was 10 dB below the audibility limit, has now been pushed even further down.

The system SNR has gone down because we have reduced the signal level and not reduced the noise level. And this is OK! We do not need more SNR than this since

  • the noise level is below audible and
  • the signal level is just right.

This is, in my opinion, the crux of the discussion. And once we realise this fact, we can move on to

Digital volume control

As in the case of analogue volume control, we will assume no added noise in the process. This means using enough bits, truncating and dithering correctly, etc. etc. The digital volume control scales down the signal, but leaves the digital noise where it is.

digital volume control

There we are. Level reduced as before. And still, analogue noise dominates the output and digital noise is still far enough below the analogue noise floor.

Is the resolution reduced as a result of digital volume control? Yes.

Is this a problem? No!

Similar to the analogue volume control case, the system SNR has been reduced to exactly what it has to be, with signal level being just right and noise being inaudible.

Why digital volume control should be preferred over analogue volume control

 

So far I’ve argued that digital volume control is no worse than analogue volume control.  Now, we go one step further and argue it’s actually better.

The first argument is simple: analogue components are not transparent. They add noise and distortion and in order to get these problems under control you need power, space and cost to build good power supplies and line stages. You can solve this problem, yes. But why should you?

Doing the volume control in the digital domain is far cheaper. Either you already have a DSP or controller in your system or it will be relatively cheap to add one.  It is really not hard to do a ‘blameless’ volume control algorithmically. You will not experience problems with channel mismatch or cross-talk. The control may be linear, logarithmic, or any shape you like. And so on, and so forth. This is one of those occasions that the often misused adagio ‘less is more’ really does apply.

And now for the kicker:

Driving a sigma/delta D/A converter up to 0dBFS introduces distortion and reduces SNR.

Yes, you read that right. Sigma/delta D/A converters (which dominate the market) have very high order digital feedback loops running at high speed to correct the error generated by their extremely small word lengths, unlike the multibit D/A converters of old.

When you drive the signal towards the maximum they saturate and might even become unstable. To prevent this from happening, depending on the topology either the feedback order is reduced, increasing quantisation noise, and/or the feedback signal is clipped, increasing distortion.

This is why the quoted SNR is always measured at a very low input level. E.g. at an input level of -60 dBFS an SNR of 60 dB is measured and hence the data sheet claims an SNR of 120 dB. But do the measurement again at 0 dB and you’ll see quite a different story.

In order to illustrate this, I’ve plotted spectra of a 6 kHz sine wave modulated from -60 dBFS in steps of 10 dB all the way up to 0dBFS, and combined them into the animation below.

sigma/delta modulation from -60 dBFS to 0 dBFS in 10 dB steps

I’ve gone to 32768 FFT points and averaged 128 measurements. You’ll notice how the noise level for most of the plots is fixed, and it is fixed by the FFT. However at levels of -10 dBFS and 0 dBFS (the last two frames) it is visible that the noise level is starting to creep up, and moreover it is modulated by the signal. Also the harmonic distortion is going up – of course the signal level goes up too, but the THD level rises faster than the signal.

TL; DR

When you design an audio system, be it a codec chip, a PA installation or your home hi-fi, you need to work out the maximum and minimum signal levels and scale the system such that the noise level is below the minimum audible level.

Digital noise should never dominate over analogue noise. Keep it 10 dB further down at least.

Reducing the playback volume reduces the system SNR, or resolution.

Whether you reduce the system SNR by means of a digital or an analogue volume control does not change the threshold of audibility for noise. As long as your system noise stays below it, it is good enough. It does not help to reduce digital noise below this threshold.

Digital sigma/delta converters perform worse than optimal near maximum modulation. The harmonic distortion increases and the noise floor starts to be modulated by the signal level. Reducing digital volume improves headroom and linearises the converter.

1 thought on “The Case for Digital Volume Control

  1. Gautam

    Digital volume is so good these days! I compared the digital volume built into my DAC with a high quality analog preamp ($2K+), strongly preferring the digital, even at low volume levels (-40dB attenuation). To my ears it sounds more transparent and dynamic. In addition to sounding better, removing the analog preamp makes my system simpler, more elegant and saves money!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.