or Connect
AVS › AVS Forum › Video Components › Home Theater Computers › Can anyone explain the theory behind digital volume attenuation without quality loss?
New Posts  All Forums:Forum Nav:

Can anyone explain the theory behind digital volume attenuation without quality loss?  

post #1 of 8
Thread Starter 
Connecting a high end sound card directly into the power amplifier can have real big advantages: NO ANALOG PRE-AMP = no signal degradation between the source and the amp. The only problem is, we now have to use the sound card to control the volume of the speakers. In theory, if the digital attanuation can be done without quality degradation, we are going to get the purest sound possible + don't need to pay a cent for analog pre amp. The thing is, we all know that digital/software attenuation is a no no, quality wise. We lose bites, hence we are losing audio information.

In the last couple of days I read several posts in several places about a technique which supposedly allows one to use digital attenuation without signal degradation, when using a 24bit sound card. It's something about adding more bits to the original 16bit signal using dither (?), and by that gaining the option to use digital volume control without any loss to the original 16bit source. Apparantly all the bits which get hurt are the ones we added.

Have anyone else heard about this technique ?, does it really work well ?, can someone explain this theory with more detail and accuracy.

post #2 of 8
Thread Starter 
Weird, I thought someone will have a clue...
post #3 of 8

Many years ago, I built an Dolby Digital AC3 decoder prototype as my thesis in college using the then state of the art Zoran 38500 DSP. At that time the DSP could effectively alter the output levels being fed to the DACs as part of the decoding process (ie not unlike doing something similar to what you suggested in this thread.)

I'd assume not much has changed (ei volume control can still be performed within the DPS/or in software decoding prior to the DAC stage eliminating the need for an external analog potentiometer.

However, during my research I aslo uncovered numerous analog potentiometers (digitally controlled resistor ladders) that were controlled via a digital interface such as I^2S whose S/N ratio exceeded that of the 105db output of the DD spec.

So to answer your question, yes it is possible to control audio either in the digital domain or in the analog domain without adverse side effects.

The question which really needs asked is how well the PCI sound card you intend to purchase is put together.

Can I explain in detail how to to alter the volume level of the DSP decoded PCM streams in detail, no, sorry I can't. I've been out of that realm for far too long and the technology of the time did the math transforms for me. All I had to do was fill the DPS's registers with the appropriate hex values from the Zoran supplied register tables.

I played around with both the Zoran DSP volume settings and the analog domain digitally controlled volume pots but decided on the analog pot solution due to the inclusion of external audio input/switching and the inclusion of the not yet to released at that time Motorola DTS decoder ICs.

If you spend the time to figure it out send me a personel email I'd be curios to see the algorythms involved.

post #4 of 8
I think this has already been covered in the forum - I remember posting something maybe 6-8 months ago.

The signal quality or 'resolution' inherent in a digital signal is completely determined by the number of significant bits in the signal - basically 6 dB per bit. Consumer audio is 16 bits, which gives us the standard 96dB figure. Note that it's important to focus on *significant* bits - you can't improve things by tacking on extra meaningless bits, (theoretical information content here - in practice some devices may change their behavior when fed a 24 bit signal rather than a 16 bit signal).

In order to reduce the volume of a digital signal, you have to multiply it by a number less than 1. In digital terms, this is not particularly intiutive, can at one level be viewed as shifting the bits to the right - this isn't completely accurate, but is the easiest way to think of it. Now, if you have a 16 bit value and shift it to the right, you end up with a zero in the leftmost (most significant) bit, and the lsb shifts out of the value altogether. For a 6dB reductions, this is a straight shift - the bit pattern stays exactly the same, just like dividing a decimal number by 10. For other values, the bit patterns change, but the theoretical basis is the same, like dividing by 7.

The root of the 'digital volume reduction is BAD BAD BAD' comes from trying to do this and preserving only the topmost 16 bits of the signal - in this case you have in fact lost one bit of resolution for each 6dB you attenuate the signal.

The problem changes completely if you can preserve/output 24 bits. In this case, when you start with the 16 signal bits in the 'top' of the 24 bit word, you get to keep that 'lost bit' because it just shifts down into one of the previously 'unused' 8 extra bits, and it gets sent out as a normal part of the signal. In fact, since you now have 8 extra bits, you can in theory attenuate by 48 dB before you are 'losing' any information at all.

To put this analogy in decimal terms, it is like being able to keep extra spots to the right of the decimal. eg you start off with a value of 25025. dividing by 10 gives 2502.5 - in a 16 bit world, you would only be able to 'use' the value 2502, but in a 24 bit world you actually started with 25025.000, and so can use the full 2502.500 value.

In practice, the performance of soundcards limits the amount that you can actually do this to far less than the theoretical 48 dB. Good sound cards are providing measured performance in the 105 to 115 dB range (the LynxTwo being at the top of the heap). This sets the upper bound of attenuation before the limits of the card itself start degrading the process. Still, even with things like the 410, you should get a solid 10-12 dB of attenuation before any theoretical degration takes place.

The main practical problem with this is that it is geared around using digital full scale as the 'normal' level. If your normal level is more than the 10-12dB value below 'maximium', then you'll typically be listening to a degraded signal. In other words, in order for digital attenuation to work well in practice, you have to very carefully look at the analog signal levels in your equipment chain, and attenuate/balance them to allow running as close to digital full scale as possible for 'normal' use.

It should be pointed out that this does not involve dither or upsampling or anything like that - this is just basic digital math. dither is a related but separate issue - one that allows you to tailor the degradation that is imposed by shortening the word length of a signal. This *can* make digital reduction sound better when staying with a 16 bit output signal, but it does not prevent loss of resolution, it just helps mask it.
post #5 of 8
This argument only holds valid for 8 bits then you still end up having to think about what you do to the bits to atenuate further. If you keep shifting you are just dropping the low order bits from the signal but the reconstructed wave from from the remaining bits still might be getting more and more off the original and you end up with bad quantization noise.

The trick is to recalculate the right set of bits that reconstruct the wave form as close as possible at a lower level with a minmum amount of dither.

What you really want is to calculate the values that you would get if you would feed an attenuated analog signal into a very linear A/D. Those are not just shiffting all samples by a fixed number of bits.


post #6 of 8
Thread Starter 
So, dwk123,
When you say:
Good sound cards are providing measured performance in the 105 to 115 dB range
you mean dynamic range ?. The 410 spec is 101db dynamic range, and the 1010 spec is 108db. Does it means that the 1010 will give another ~7db of un-degraded attenuation, taking it to about ~20db overall ?. I'm only using a 100watts power amp, so normal listening is definitely going to be at less than 20db attenuation. but, what will happen if I'll try to listen to material which has been encoded at 24/96 ?, then I won't be able to attenuate at all, right ?. What about DD/Dts ?, I can't change the bits there, so attenuation will come with lower sq ?.

Also, I didn't quite understand why dynamic range is going to be used as a limiting factor with a card like the 410 already after ~10db of attenuation. What exactly happen there which decrease audio quality at this point ?.
post #7 of 8
Thread Starter 
One more thing,
The Delta 410/1010 line of cards has bass management control. Will using this feature might degrade the sound ?, can bits "get lost" in this situation also ?.
post #8 of 8
So in the future it's actually possible to output a digital signal to an active speaker with 4 digital amplifiers, all digital.

That's how I think the future will be. Speakers with cheap, but very good sounding integrated digital amplifiers like in the TaCT amps, fed by a digital signal.
Speaker EQ can then be implemented digitally without any problems as well, making it possible to make cheaper and better speakers, similar to the Teknico speakers I currently use. One of the "main" problems with them is when playing VERY loud over a larger period of time. Then the heat dissipation is simply not good enough, and the thermal protection kicks in. The main problem is of course the heavy EQ'ing in the lower bass area, which require a lot of watts.

The only thing bothering me with the "all digital" speaker was how to control volume level on a digital signal, since there's no extra "level" signal following the digital signal, telling the speaker how loud the signal should be played. But according to all the information in this topic it should be no problem.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Home Theater Computers
This thread is locked  
AVS › AVS Forum › Video Components › Home Theater Computers › Can anyone explain the theory behind digital volume attenuation without quality loss?