A thought: DSP-Volume->DAC vs. DAC->Analog Volume-Pot

The following situation: A DSP implements a volume control. The I2S goes out to a DAC. If the volume control is only set to say 9 o'clock (room volume), then the DAC does not output 2 volts, but only e.g. 50mV. Isn't this mode of operation bad? The DAC is not linear at this level, has more THD and a bad SNR. In an analog chain, the DAC would be running at nearly 2V and the volume control would be behind it. Best SNR.
 
  • Like
Reactions: rayma
At least you won't have any intersample overshoot issues, provided there are no digital filters that can clip before the volume control.

It should work fine with DACs with a very large dynamic range, like those 120+ dB DACs you have nowadays. For DACs with a rather limited dynamic range, analogue volume control or a bit of both makes more sense.
 
The following situation: A DSP implements a volume control. The I2S goes out to a DAC. If the volume control is only set to say 9 o'clock (room volume), then the DAC does not output 2 volts, but only e.g. 50mV. Isn't this mode of operation bad? The DAC is not linear at this level, has more THD and a bad SNR. In an analog chain, the DAC would be running at nearly 2V and the volume control would be behind it. Best SNR.
You make a good observation and yes, digital volume control isn't good - you just lose the signal in the noise. The best way is to have the DAC at 0dBr and use an analogue form of volume control as close the power amps as possible. I like to use the PGA2311 volume control ICs to keep the interface digital - best of both worlds.
 
  • Like
Reactions: diyralf
At least you won't have any intersample overshoot issues, provided there are no digital filters that can clip before the volume control.

It should work fine with DACs with a very large dynamic range, like those 120+ dB DACs you have nowadays. For DACs with a rather limited dynamic range, analogue volume control or a bit of both makes more sense.
Not that Marcel needs my confirmation, but indeed noise doesn't seem to be a problem with modern DACs. Let alone that it's better to set the digital volume control at least at -3dB to avoid intersample overshoot although you could get away with NOS DACs. But there is another thing that I'm not sure I get it right, and this is dither. Original dither applied at the recording procedure will be lost the moment we touch the digital volume control, won't it? New dither can be applied at playback and perhaps also in the microprocessor where digital attenuation is taking place although I have no clue for that. So the question could be original vs new dither?
 
Yes, if you want to be absolutely sure that the quantization error behaves noise-like (that its average and standard deviation are independent of the signal), you have to dither whenever the signal gets quantized or re-quantized (rounded or truncated), so also after digital volume control. That can be done by the DSP that does the volume control. (An enormously long and non-converging discussion about whether the quantization error after volume control actually has to behave noise-like or just be small enough could start here, but I hope it won't.)
 
  • Thank You
Reactions: MagicBus
ESS used to have a whitepaper on DAC digital volume controls on their website. Their point was that in most cases the DAC chip internal digital volume control was nearly optimal, and that only a very well designed external volume control after the dac chip had any chance of being better. That said, depending on where the DAC chip internal volume control is located in the processing string, it may or may not be able to prevent intersample overs. If such overs are the concern then it may be necessary to turn down the digital volume level by a few dB before the DAC chip. However, turning down the digital volume level more than necessary for that purpose may result in loss of dynamic range.

Some problems with post DAC chip analog volume controls include distortion in pot resistive elements and pot wiper contact distortion. If using relay volume controls instead of a pot then relay contact distortion can be a problem. Especially so after the audio signal has passed though several relays and the relay contacts are staring to wear from use. That's not to say that such distortion will necessarily appear as HD/IMD on a PSS FFT. It may look more like some kind of signal correlated noise.

IOW, there is no free lunch. There are only engineering tradeoffs.
 
I have the volume control within the DSP vs. DAC chip / later. Since the typical DR is in excess of 100dB, it doesn't sound bad at all. But I still think that the correct way to implement volume would be to have it after the DAC, resulting in true scaling of everything, including the step size and noise of the DAC.

The post DAC pot / switch issues maybe solved by minimising the currents through these elements, as done in here.
 
  • Like
Reactions: diyralf
Best volume controls I have found are Goldpoint switched attenuators after the dac. Very clean sound. A bit lower distortion that Alps pots or relay volume controls I have heard so far. Of course analog volume controls need a good buffer following them in order to keep output impedance reasonably low. https://goldpt.com/
 
This thread is essentially the opposite of

https://www.diyaudio.com/community/threads/fixed-gain-field-recorder.373352/

With the largest dynamic range ADCs there are nowadays, you can make a recorder that with the same analogue gain has a noise floor below the noise floor of a good condenser microphone and a clipping level above the clipping level of the condenser microphone. You then only cause a minor noise floor increase when you always record with that analogue gain setting.

During playback, the only fundamental noise floor is Brownian motion. According to
https://physics.stackexchange.com/q...is-the-thermal-motion-of-air-molecules#114132 it's somewhere between -12 and +1 dB(A) SPL. If the highest level you can reproduce is 113 dB SPL, two channels of 100 W into 90 dB at 1 W, 1 m loudspeakers when the reverberation radius is 1 m while you listen at a distance greater than 1 m, a > 125 dB(A) dynamic range DAC should do the trick.
 
Sure, that's why I ignore the threshold of hearing and just consider the Brownian motion. Otherwise you can get away with much less dynamic range (unless you are a cat with exceptionally good hearing - I saw a remark somewhere in that thread that some cats have thresholds of hearing quite close to the Brownian motion level).
 
By the way, a possible disadvantage of digital volume control may be the risk that some software or hardware glitch sets the volume to maximum. At least that seems more likely to me than a mechanical potmeter turning itself clockwise. Then again, an interrupted volume potmeter ground contact has pretty much the same effect.
 
  • Like
Reactions: dddac