Volume control

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I've always wondered when connecting external speakers to a computer. Do you turn the volume from the computer to the max and adjust using the external speakers volume control or vice versa? I've heard it's supposed to be lower than the max to prevent distortion. Is this why realtek drivers default to 67 percent volume. Can someone explain this?
 
To achieve the lowest noise, its best to add the most gain in the first stage, in this case your computer, so maxing the computer output and controlling the volume with your speakers will produce the least ammount of noise. However you may end up overloading the speaker's input, so you may want to back it up a bit.

If you are math inclined you may want to look at Friis gain equation, which basically says what I just said about noise.
 
Member
Joined 2007
Paid Member
I have a computer where distortion jumps above 63% volume dramatically. I would recommend at least doing a loop back measurement using something like right mark audio analyser or REW to check you don't have the same problem. Of course doing a simple loop back you can't tell if its the input or output but as the consequences of clipping are much more severe than a loss of SNR I would recommend this check.
 
The answer does depend on what player you're using on your computer. Some players can add digital gain - you definitely don't want those set to maximum or the output will clip. Ideally you want to set the computer volume to 0dB - no gain, no attenuation.

You can check by creating a full-scale (0dB) sine waveform in Audacity and monitor your DAC's output for clipping on a 'scope as it plays out. Or just listen to hear when distortion occurs as you raise the volume.
 
It's not that easy.

As a matter of fact, the goal is to run the highest possible DAC
output voltage for lowest noise to achieve your maximum listening level.

And that max DAC output voltage very much depends on a well done DAC->amp->speaker integration.

You need to know your:

1. max listening level
2. speaker sensitivity
3. amp gain
4. DAC output voltage(s)


1. A maximum safe listening level should be about 85dB over a longer period.
2. Now you look at your speaker sensitivity.
Many of them run in the 88-92dB/W area. As a rough estimate - you'll
need just 1W amp power. Let's assume you own a 4R speaker. That'll
lead to 2V output voltage to achieve that 1W. That's the amp output voltage!
3. Many average amps run in the area of factor 20-30 on the gain side.
4. Typical max output voltage of a DAC is 2V - single ended - it doubles for XLR.

As you see that insanity lies in the typical amp gain. It'll make 40 to 60V from that max DAC-out voltage. We could almost live with a unity gain amp though.

And that means you need to drive your precious audio signal into the noise floor to cope with that insane amp gain. Basically you'll amplify a much noisier signal.

No matter if you run volume control on your amp or DAC/PC - analog or digital. You need to get your "gain" structure properly in place first.

Look for amps with variable gain-stages. NOT to be mixed up with amp volume control - that's something else! Usually that amp-volume control attenuates
the incoming signal!

With a properly dialed in amp_gain->speaker_sensitivity chain you'll be able to run your 32bit DAC digital volume control at rather audiophile levels.

BUT. You'd still need quite VC range though.

You'll face the recording levels/mixing level issue. The means you'd need up2 12-15dB headroom just to cope with the different rec level of CDs. That leaves you with e.g. just 0.5V DAC @85dB listening level for extreme "loud" recordings. Because you need the 2V to get the quietest recordings playing loud enough.

But. Again. If your have your gain-sensitivity setup dialed in properly, you've taken a big step into the right direction.

That's why I can live with a digital volume control on the DAC/PC quite well - since years.

Good luck.


PS:
As part of a proper integration. You need to find out what max input voltage your amp accepts.
There are amps that allow levels below that DAC-out 2V only.
If you'd blow these high DAC-out levels into an amp with e.g. 1.5Vmax on the input, you'll face nasty distortions of course.
 
Last edited:
I'm not too sure I understand this. From what you're saying, amp gain and speaker sensitivity go hand in hand. The amplifier uses the DAC's voltage as a reference, to determine how much power to output. Reducing the DAC's voltage decreases the amp output power but at the price of increased noise?

So, after finding out the amplifier's max input voltage and the DAC's max output voltage before distortion, and reducing the DAC's output voltage to match the amplifier's max input voltage, results in the highest audio quality? This seems awfully complicated can't you just use digital in and avoid all of this?
 
"using digital in" does not circumvent any of the stages, it just moves them from one device to another.

It's actually quite simple.

The D-A conversion has some fixed floor noise, the same for tiny signal or signal close max attainable level. Therefore the max. attainable level will produce the lowest noise RELATIVE to the signal. That is what you want to use.

Then comes the analog attenuation (analog volume control), feeding the amplifier behind. The analog attenuation reduces both the signal as well as the DAC noise, but adds a bit of its own noise. The amplification behind amplifies both the signal and the noise. Also, the amplifier adds its own noise. The higher the amplifier gain, the more noise it adds.

Therefore you want to keep the amplifier gain at minimum, to add the least amount of noise.

An ideal situation for the lowest signal/noise ratio:

DAC - no attenuation

analog volume control - no attenuation

amplifier - just enough gain to attain the required listening level.

But every recording is different and you need some volume control. So in half-reality you pick just a bit higher amplifier gain and fine-tune with slight analog attenuation, as needed.

But in full reality you have no control over your amp gain and must use its analog volume stage for all the control. Still, keep the DAC output at max, of course below limiting.
 
An ideal situation for the lowest signal/noise ratio:

DAC - no attenuation

analog volume control - no attenuation

amplifier - just enough gain to attain the required listening level.

But every recording is different and you need some volume control. So in half-reality you pick just a bit higher amplifier gain and fine-tune with slight analog attenuation, as needed.

But in full reality you have no control over your amp gain and must use its analog volume stage for all the control. Still, keep the DAC output at max, of course below limiting.


For the blocks you have listed above, if they all more have a signal/noise ratio in the same range, I agree it is the thing to do. If yo opt for a more high-end version of some blocks, it's good to estimate the noise floor of each block as it sometimes give some surprises.

Let's take for example the PCM1792/94 DAC. With a good implementation, it can reach a noise floor around 0.9µVrms in the audio band for a 2Vrms output. I have seen on many schematics on the web that it is followed by a volume control based on a PGA2310/11. This is even the case in an Elektor article as "discarding bits in software is not an option". The output noise floor of a PGA2311 is around 2.5µVrms, so it's like 1.5 bits are lost. In that case the analog volume control is not the good choice and a software volume control actually makes more sense to get the best SNR. A potentiometer based volume control would probably be a better choice there, but again it will only improves the SNR if the total noise floor is not dominated by the output amplifier.
 
Thanks a lot. I understand now.

I'd be surprised if that'd be the case, after phofmans answer :p


The key issue is the amp gain, which has to match the speaker sensitivity.
If you don't get that right you'll never be able to accomplish a good setup.

With todays 32bit digital VCs quite a huge range 8bit=48dB can easily get attenuated. Within this range digital beats all analog VCs.
And the noise floor logic as outlined by phofman becomes irrelevant.

Within this range it doesn't matter, from a voltage perspective, what VC analog/digital you run.
However. The actual type does matter. Analog VCs perform much worse within this range. Analog VCs do have several issues.

And very important:
Running 2V out - no attenuation (as outlined by phofman) is not always possible. Especially if you run direct DAC -> amp connections. You need to know the maximum input voltage allowed on the amp.
Feeding a full swing 2V - 100% signal into an amp that comes with 1 of 1.5V max input voltage will cause serious issues.


Fill out below list:

DAC = ?
DAC output voltage = ?
AMP max input voltage = ?
AMP gain = ?
speaker impedance = ?
speaker sensitivity = ?
digital volume control = ? (application/DAC)
analog volume control = ?

Know your numbers!

We then can continue discussion on a real world scenario.
 
With todays 32bit digital VCs quite a huge range 8bit=48dB can easily get attenuated. Within this range digital beats all analog VCs.

Even the best DACs have 22bit max real resolution. No volume-control headroom for 24bit signal, small headroom for 16bit signal. Every digital attenutation drops the S/N ratio since the noise is constant while the signal drops. If the volume control is at least 22 bits (the DAC real resolution), extra less-significant bits are irrelevant. 32bit volume control is easier to implement and use technically, therefore it is used.


And the noise floor logic as outlined by phofman becomes irrelevant.

However. The actual type does matter. Analog VCs perform much worse within this range. Analog VCs do have several issues.

...

Running 2V out - no attenuation (as outlined by phofman) is not always possible. Especially if you run direct DAC -> amp connections.

That is why I talked about passive attenuator in between. Every decent potentiometer drops both the signal and the DAC noise. Just measure it with any reasonable soundcard.

Is the difference between digital and analog volume control audible? Very unlikely. Is it measurable? You bet it.
 
Even the best DACs have 22bit max real resolution.

I fully agree with that and there are very very few DAC actually able to reach 22 bits.

No volume-control headroom for 24bit signal, small headroom for 16bit signal. Every digital attenutation drops the S/N ratio since the noise is constant while the signal drops.

I fully agree.

If the volume control is at least 22 bits (the DAC real resolution), extra less-significant bits are irrelevant. 32bit volume control is easier to implement and use technically, therefore it is used.

Agreed.

That is why I talked about passive attenuator in between. Every decent potentiometer drops both the signal and the DAC noise. Just measure it with any reasonable soundcard.

I also agree. However the output of the potentiometer is almost never used directly, it is usually followed by an amplifier (e.g. a follower). This amplifier adds noise, and this noise is usually of same the magniture as the DAC noise. In practice this also limits the effective number of bits of the whole system to around 22 bits, even considering a perfect 32-bit DAC. It's possible to get a few tenth of bits by using a much higher output swing out of the DAC, and get a |gain| < 1 at the amplifier level.

Is the difference between digital and analog volume control audible? Very unlikely. Is it measurable? You bet it.

When using a DAC + potentiometer + op amp, the difference is usually quite small, even at low volumes.

Let's take for example a PCM1792/94A with a 2Vrms output, able to get a typical noise floor of 0.9µVrms in the audio band.

With a digital volume control, the noise floor is kept at 0.9µVrms for 0dB, -20 dB or -100dB.

With a potentiometer, the noise at the output of the potentiometer is reduced by the volume attenuation, so it is 90nVrms at -20dB and 9pVrms at -100dB. Now after a low noise amplifier like the OPA627 configured as a follower, the noise at the output of the whole system is 0.995µVrms at 0dB, 0.424µVRMS at -20dB and also 0.424µVrms at -100dB.

In short there is a small advantage in using an analog volume control, but those are really simple computations assuming a perfect potentiometer and only the input voltage noise. It's therefore doable to get a lower noise with an analog volume control, but it's not something automatic and requires a careful design. Using an op amp with a slightly higher noise, or a PGA2311 like in the example of my previous post will just make the analog volume control worse than a digital one at the DAC level.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.