• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

The final truth about DSP Volume Control in Roon

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,227
Likes
17,807
Location
Netherlands
OP
DrCWO

DrCWO

Active Member
Audio Company
Forum Donor
Joined
Nov 14, 2020
Messages
254
Likes
359
Yes, that's assuming optimal gain structure, I admit I didn't fully read yet, but there are definitely use cases where huge digital attenuation followed by high gain will deliver audible hiss, when you have 100 steps of digital volume and you find that it's already too loud at 10%, can't be good, The problem is not the digital volume so much, if you have no other way to control it's a problem, and yes, the main thing is that sensitivity of earphones/headphones are litterally all over the place. Analog volume control are useful gain switches too, sometimes it's the right thing to do.
edit: yes, after reading, the statement is true, even 50 dB attenuation beats the dynamic range of the best amps, but the problem is than there are plenty of situations that you can only use a small fraction of that dynamic range. Bottom line, we all know the conclusion, the basic Idea is this, you'll never attenuate the noise floor with digital attenuation, it will stay fixed, you can just bring the content closer to it.

The weakest part in most playback chains is still the power amplifier. This is true even though there are some very good devices on the market today. The problem is even with an analogue volume control you cannot attenuate noise of this device. Most DACs have better figures than the power amplifiers. This means running the DAC right in front of the power amp there is no improvement by the analogue volume control at all.

So, you are all right in writing "... that it's already too loud at 10%, can't be good". I addressed it on the last page of my writing with:

"Another important point is that your power amplifier and your speakers should match. If the
perceived volume is inacceptable high running the amplifier without volume attenuation
either the amplifier is too strong for the speakers or the speakers are too sensitive for your amplifier."
 

Dave Tremblay

Member
Audio Company
Forum Donor
Joined
Sep 23, 2020
Messages
81
Likes
415
Location
Boulder, CO
The Roon mixer and DSP is likely floating point, so you’re just not going to “lose bits” like the old fixed point DSPs. If you take a floating point number like .99999999, multiply by 1024, divide by 1024, it will be identical. Only the exponent would have changed and then changed back. If the multiplier and divisor you choose is not a power of two, you can start to introduce small amounts of noise in the lowest bits, but still 20dB better than the worlds best DAC. And if they use double precision floats, more than 200dB better.
 
OP
DrCWO

DrCWO

Active Member
Audio Company
Forum Donor
Joined
Nov 14, 2020
Messages
254
Likes
359
I tried going to your site btw, what's going on there o_O

This is a Corona fun project. I programmed some Roon extensions for wireless physical volume control knobs and UPnP.
I thought it is a good idea to publish it and pay the website with the inflow ;-)
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
Many Realtek chips actually use hardware analog volume control. Notice the blocks say Digital Filter -> DAC -> VOL

alc892.png


As long as the DAC is at least receiving 24-bit data, what really matters is the DAC's actual noise performance at analog output.

In terms of digital only performance within a playback software, one can attenuate a 32-bit float signal below -750dBFS or turn up the volume above +750dBFS without clipping, and still maintaining 25 bits of precision (~150dB SNR) within the whole ~1500dB range. Read the illustrations below:

https://www.audiosciencereview.com/...table-field-recorder-review.15668/post-507610
 
U

UKPI

Guest
Related question: What happens if I'm using a dac connected to a PC or Mac, and I use the computer's volume control to turn down the volume, while playing a 16-bit file. Does Windows or Mac internally attenuate at 16-bit resolution, or are things upsampled by the OS?
Modern Windows uses 32 bit floating point for software audio processing which includes volume control. After that, the bit depth would be decided by the driver/hardware settings.

These links would be helpful.
https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/windows-audio-architecture
https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/software-volume-control-support
https://thewelltemperedcomputer.com/KB/WASAPI.htm
 

H-713

Senior Member
Joined
Jan 24, 2021
Messages
379
Likes
666
Those are just digitally controlled analogue volume controls, like an opamp with gain control



Those are hardly audio grade DAC’s.


Yes, I know they're digitally controlled analog volume controls. Also, did you read the article about how those DACs are being used? They're multiplying DACs, and in that application being used to make a PGA. This is how it was done before PGA chips were available. The digital input is the level control, not a digital audio input.

I've gotten .005% THD+N out of that solution using AD713s without even trying, so I would expect that with something better (AD713s are basically a somewhat improved TL074) like an OPA1642 could move that decimal point over a bit.
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,227
Likes
17,807
Location
Netherlands
Yes, I know they're digitally controlled analog volume controls. Also, did you read the article about how those DACs are being used? They're multiplying DACs, and in that application being used to make a PGA. This is how it was done before PGA chips were available. The digital input is the level control, not a digital audio input.

I've gotten .005% THD+N out of that solution using AD713s without even trying, so I would expect that with something better (AD713s are basically a somewhat improved TL074) like an OPA1642 could move that decimal point over a bit.

Ah, so those multiply DAC's can be used as the gain setters for an opamp you mean. That sounds like a practical solution. You don't need special THD specs for that obviously.
 

MrOtto

Senior Member
Joined
Nov 4, 2020
Messages
453
Likes
357
Great info to have, if I switch to ROON. For now I use Chromecast Audio directly to my DAC, I wish there where some measurements of the digital volume control in the Home app that Google provides for Chromecast Audio.
 

PeteL

Major Contributor
Joined
Jun 1, 2020
Messages
3,303
Likes
3,838
The weakest part in most playback chains is still the power amplifier. This is true even though there are some very good devices on the market today. The problem is even with an analogue volume control you cannot attenuate noise of this device. Most DACs have better figures than the power amplifiers. This means running the DAC right in front of the power amp there is no improvement by the analogue volume control at all.

So, you are all right in writing "... that it's already too loud at 10%, can't be good". I addressed it on the last page of my writing with:

"Another important point is that your power amplifier and your speakers should match. If the
perceived volume is inacceptable high running the amplifier without volume attenuation
either the amplifier is too strong for the speakers or the speakers are too sensitive for your amplifier."
I agree, Yes Amp and speakers should match and in these cases you are absolutely right. I am mainly talking headphones, many will use the same amp with headphones with huge difference in sensitivity.
 

Mulder

Addicted to Fun and Learning
Forum Donor
Joined
Sep 2, 2020
Messages
624
Likes
871
Location
Gothenburg, Sweden
"Another important point is that your power amplifier and your speakers should match. If the
perceived volume is inacceptable high running the amplifier without volume attenuation
either the amplifier is too strong for the speakers or the speakers are too sensitive for your amplifier."
I do not know if I may be stupid, or if my English is so bad that I misunderstand, but what amplifier do not have the capacity to push the volume up to unacceptable levels? Who runs an output stage without volume control?
 

Dave Tremblay

Member
Audio Company
Forum Donor
Joined
Sep 23, 2020
Messages
81
Likes
415
Location
Boulder, CO
There are two separate things here, the first of which is whether digital gain is harmful to the signal. If down properly, I think that answer is No.

However, in most music listening cases, you’re using digital gain to turn down the volume coming from your speakers. In that case, you are losing performance from your DAC. If you reduce the volume by 20dB to not blow your ear drums out, you can’t hit the peak level of the DAC, which is where performance is measured (SNR, THD+N). You’ll lose that 20dB off your SNR as the noise didn’t change in level, but your peak signal is 20dB lower. You’re also in the range of THD+N that is dominated by the noise more than distortion, so similar thing there.

This was a problem 20 years ago when DACs had 80dB SNR specs, but in a decent modern DAC with performance around 105dB SNR, the noise level is still 85dB down which is basically inaudible. And if you have an exceptional DAC, in the 130dB SNR range, it becomes tough to argue this is a problem. With your 20dB of digital gain reduction, you still have 110dB of SNR.

Now, you could get the full performance of that DAC by using an analog gain stage and apply the gain there, provided that your gain stage is lower noise and distortion than your DAC. Quite often that isn’t the case.
 
OP
DrCWO

DrCWO

Active Member
Audio Company
Forum Donor
Joined
Nov 14, 2020
Messages
254
Likes
359
I do not know if I may be stupid, or if my English is so bad that I misunderstand, but what amplifier do not have the capacity to push the volume up to unacceptable levels? Who runs an output stage without volume control?

I do! From my DAC I run "nearly" directly to the power amplifier.

In between the DAC and the power amp there is a fixed voltage divider soldered with some resistors in the XLR connector right before the power amp. This voltage divider is adjusted in a way, that at maximum DAC output the audible volume is above what can be listened to.

This way a have a certain headroom for peaks and as much resolution from the DAC as possible. Volume control in my scenario is done digitally by roon only.
 

Mulder

Addicted to Fun and Learning
Forum Donor
Joined
Sep 2, 2020
Messages
624
Likes
871
Location
Gothenburg, Sweden
I do! From my DAC I run "nearly" directly to the power amplifier.

In between the DAC and the power amp there is a fixed voltage divider soldered with some resistors in the XLR connector right before the power amp. This voltage divider is adjusted in a way, that at maximum DAC output the audible volume is above what can be listened to.

This way a have a certain headroom for peaks and as much resolution from the DAC as possible. Volume control in my scenario is done digitally by roon only.
As I understand it, you have in fact mounted a kind of static analog volume control between your DAC and the power amplifier. Then you can not say that you run the power step without volume control, it's just that your analog volume control is not variable.
 
OP
DrCWO

DrCWO

Active Member
Audio Company
Forum Donor
Joined
Nov 14, 2020
Messages
254
Likes
359
it's just that your analog volume control is not variable.

Maybe my english is not good enough, I am a German guy...

My thought was a "control" ist something I can control manually like a potentiometer. What I did was pushing up level at the output of the DAC to it's max to get best signal-to-noise ratio and then attenuate it with a voltage divider to not overdrive the amp.

I'm sorry for my misleading comment.
 

DHT 845

Senior Member
Joined
Feb 28, 2021
Messages
498
Likes
436
That's why it's a hybrid system not purely digital.
I remember 25 year ago DAC by Enlightened Audio Designs DSP-9000 had such hybrid volume control, it was fantastic dac back then...
Today I am very happy with topping Pre90 performance together with d70s...
 

73hadd

Active Member
Forum Donor
Joined
Apr 29, 2020
Messages
126
Likes
96
If my 16 bit signal were a data file with a checksum or hash, and we go through DSP to change the volume, then somehow remove only the changes from the file that were related to the volume change, would the new 16 bit file pass the checksum or hash?
 

Mulder

Addicted to Fun and Learning
Forum Donor
Joined
Sep 2, 2020
Messages
624
Likes
871
Location
Gothenburg, Sweden
Maybe my english is not good enough, I am a German guy...

My thought was a "control" ist something I can control manually like a potentiometer. What I did was pushing up level at the output of the DAC to it's max to get best signal-to-noise ratio and then attenuate it with a voltage divider to not overdrive the amp.

I'm sorry for my misleading comment.
No, don´t be sorry. Maybe the word control became confusing in this context. But what we are talking about is attenuation. I understand what you say. It was your initial comment that confused me somewhat cause I thought it meant that the ideal is a power amp that just and only can drive the amplifiers to prefered listening level. My thougth was that any power amplifier need volume attenuation. But now, as you explained, you have a fixed volume attenautor i the form of a voltage divider. Nothing unclear for me with that.
 

dc655321

Major Contributor
Joined
Mar 4, 2018
Messages
1,597
Likes
2,235
If my 16 bit signal were a data file with a checksum or hash, and we go through DSP to change the volume, then somehow remove only the changes from the file that were related to the volume change, would the new 16 bit file pass the checksum or hash?

At least in the following naive implementation, the answer is "no":

Code:
┌─ [dc@xps]:[~]
└─>  file 02-Pneuma.flac
02-Pneuma.flac: FLAC audio bitstream data, 16 bit, stereo, 44.1 kHz, 31451764 samples

┌─ [dc@xps]:[~]
└─>  sox 02-Pneuma.flac 02-Pneuma.wav

┌─ [dc@xps]:[~]
└─>  file 02-Pneuma.wav
02-Pneuma.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz

┌─ [dc@xps]:[~]
└─>  sox 02-Pneuma.wav 02-PneumaB.wav gain -10

┌─ [dc@xps]:[~]
└─>  sox 02-PneumaB.wav 02-PneumaC.wav gain +10

┌─ [dc@xps]:[~]
└─>  sha1sum 02-Pneuma.wav 02-PneumaB.wav 02-PneumaC.wav
5a2311680cea64202dfaabbb14549c716a245753  02-Pneuma.wav
74e8323072dd0096aa2992453199944a7b275e4f  02-PneumaB.wav
cdd07bef013f7984e4270349ae365eb6b2e49f6c  02-PneumaC.wav
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,227
Likes
17,807
Location
Netherlands
At least in the following naive implementation, the answer is "no":

Code:
┌─ [dc@xps]:[~]
└─>  file 02-Pneuma.flac
02-Pneuma.flac: FLAC audio bitstream data, 16 bit, stereo, 44.1 kHz, 31451764 samples

┌─ [dc@xps]:[~]
└─>  sox 02-Pneuma.flac 02-Pneuma.wav

┌─ [dc@xps]:[~]
└─>  file 02-Pneuma.wav
02-Pneuma.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz

┌─ [dc@xps]:[~]
└─>  sox 02-Pneuma.wav 02-PneumaB.wav gain -10

┌─ [dc@xps]:[~]
└─>  sox 02-PneumaB.wav 02-PneumaC.wav gain +10

┌─ [dc@xps]:[~]
└─>  sha1sum 02-Pneuma.wav 02-PneumaB.wav 02-PneumaC.wav
5a2311680cea64202dfaabbb14549c716a245753  02-Pneuma.wav
74e8323072dd0096aa2992453199944a7b275e4f  02-PneumaB.wav
cdd07bef013f7984e4270349ae365eb6b2e49f6c  02-PneumaC.wav

That’s rather obvious isn’t it.. a digital volume control is never bit perfect .
 
Top Bottom