Home Digital Drive

Upsamplers, DACs, jitter, shakes and analogue withdrawals, this is it.

Digital Volume Control, More than you ever wanted to know...

Digital volume control with a PCM bitstream is actually very simple, you simply multiply each sample by a binary constant. This apparent simplicity is a trap for improperly implemented digital volume controls that can really mess up a digital signal. The result length in bits of any binary multiplication is equal to the sum of the word lengths of both input terms. For example a 16 bit pcm signal multiplied by a 16 bit volume control constant results in a 32 bit binary number. This conversion is completely loss-less, the original signal can be completely reconstructed from the 32 bit output data. However as there are no 32 bit DACs a 32 bit bitstream must truncated and possibly dithered or noise shaped to a manageable word length before it is converted into analog audio. Truncation is always a lossy process, once a signal is truncated no amount of processing may restore the original, it may be possible to to make any truncation artifacts inaudible with dither or noise shaping but the key to good digital volume control is to avoid any lossy translations. Instead of multiplying the pcm bitstream by a 16 bit constant you may multiply it by constant with an 8 bit or less word length, a 16 bit data stream and 8 bit volume coefficient will result in a 24 bit word, which is attainable by many high quality DAC designs so no truncation is required. However the loss-less resolution of the result comes at the price of volume control steps that do not accurately track the ideal logarithmic attenuation curve, an 8 bit word my only attenuate a signal by a maximum of 48db and the last few steps will be very large making a reasonable attenuation limit of an 8 bit volume coefficient about 30db or so.

The best digital volume controls are those that use a table that attempts to limit the amount of truncation needed. Such a volume control may use 4 bit constants for the first few attenuation levels, then gradually increase the word length as needed for greater amounts of attenuation. This table should include as many "magic" attenuation values as possible, -6.02db is only a 1 bit coefficient, -12.04db is only 2 bits ect... This approach maximizes the signal quality but also minimizes the linearity of the attenuation steps so that each volume step will be slightly different, however as volume control is more of a bulk attenuation and human hearing can easy adapt, a linear volume control is not really necessary.

It should also be apparent that the least amount of attenuation possible should be used in a system with digital volume control, in an ideal system you should always be listening as near as possible full volume, this usually requires amplifiers with low gain. This can be a real problem since most amplifiers are designed with as much gain as possible to give the customer the illusion of "Power". Using amplifiers with too much gain requires too much digital attenuation at normal listening levels leading to very low resolution (too much truncation of the digital signal before it is converted in the DAC.) Digital volume control should also never be used with DACs of insufficient word length, a 16 bit DAC will require truncating a CD resolution digital input for any attenuation value at all so digital volume controls should only be used with DACs capable of converting word lengths of 20 bits or more. Of course better, higher resolution DACs result in better sound quality with digital volume control than lesser DACs. An acceptable DAC used without digital volume control may become unlistenable when used with digital volume control due to linearity errors that are normally masked when converting full level data, delta sigma DAC designs are perhaps the worst in this respect while sign-magnitude DAC designs are the best. A sign-magnitude DAC always increases its linearity with decreasing signal level making it ideal for digital volume control use. A delta-sigma DAC on the other hand has a noise level that increases with decreasing signal level making most of DACs of this type very poor choices to use with digital volume control.


This post is made possible by the generous support of people like you and our sponsors:
  Signature Sound   [ Signature Sound Lounge ]


Follow Ups Full Thread
Follow Ups


You can not post to an archived thread.