• 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!

DAC with bit perfect volume control

MRC01

Major Contributor
Joined
Feb 5, 2019
Messages
3,503
Likes
4,145
Location
Pacific Northwest
Opinion:
Folks have been not so subtly "trained" to worry too much about potential audio problems that have already been solved.
...
It's taken care of, for you, and in any competently designed modern device, is a solved problem.
One way to test whether this is a solved problem is to look at the difference in SNR and channel balance between full output and 50 mV. Amir's measurements show quite a lot of variation here. Most devices are 30-40 dB worse at 50 mV than at full volume, with audible channel imbalances at low settings. Some devices have much better SNR and channel balance at low volumes. This suggests that it's a solved problem only for some devices.

Nobody actually listens at full volume, so the OP asks a relevant question.

Theoretically, a pure digital volume control will have perfect channel balance but drop SNR 1:1 with volume reduction. That is, turn down the volume by 30 dB and the SNR also drops by 30 dB. That's because the (analog) noise is more or less constant as you attenuate the signal. An ideal analog control (voltage divider / passive attenuator, or analog gain control) can maintain that perfect channel balance with higher SNR (less drop) with volume reduction, because it can attenuate the entire (signal + noise) so it attenuates the noise with the signal, preserving the SNR (RME ADI with its auto-gain feature is one example). But the typical analog volume control is a pot in front of the gain stage, which has the worst of both worlds. As you turn it down, the SNR drops roughly 1:1 like a digital control, and the channels also become imbalanced.
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
To me the fact that 459906,28 isn't exactly equal to 459906 (but both integers are equal and the difference is 0.00006%) is irrelevant and doesn't affect the "bit perfect" naming. Otherwise we could also talk about how temperature and pressure affect our ears and speakers, and it would probably be more relevant, lol.
"Bit-perfect" by definition should be something like lossless codecs, which means reversible.
 

Jose Hidalgo

Addicted to Fun and Learning
Joined
Aug 15, 2020
Messages
962
Likes
1,041
Location
France
Nobody actually listens at full volume, so the OP asks a relevant question.
Actually I do :) Because that's what I was told to do here.
I listen at full volume (or almost full volume) on both my DAC + L30 amp, and I lower the volume digitally in the player.
I guess I could also lower it digitally in the DAC with the remote, but my keyboard is closer.
Anyway, the analog amp remains close to full volume, et the 0 dB position which has the best measurements. Isn't that the best ?

"Bit-perfect" by definition should be something like lossless codecs, which means reversible.
I agree about lossless codecs since we are always decoding/encoding info with them. But like said previously, I think you're very strictly speaking. Look at this recent ASR thread : https://www.audiosciencereview.com/...nding-the-windows-audio-quality-debate.19438/

DDF says, and I quote : "Result? Effective bit perfection through the Windows audio stack: first distortion component @ -170dB, per the source file". You have, in the same sentence, "bit perfection" and "first distortion component". If there's distortion it can't be bit-perfect, right ?
And yet... it is. I'm no expert, but I'm guessing if distortion or any round-up errors are inferior to a certain treshold, the definition stands. In 16 bit there are only 65536 possible values per sample. If there's a round-up error but the corresponding integer stays the same, then we're still bit-perfect.
E.g. if, say, the integer part of 459906,28 is 459906. Only that 0,28 error scaled down to 65536 would be something like 0.035. So it could hardly influence the outcome.
 
Last edited:

MRC01

Major Contributor
Joined
Feb 5, 2019
Messages
3,503
Likes
4,145
Location
Pacific Northwest
"Bit-perfect" by definition should be something like lossless codecs, which means reversible.
Here's an intuitive interpretation of that:

If you start with a 16-bit source and you have a 24-bit volume control that dithers the LSB, then you've added 7 bits to the "right" of the 16 MSB (OK maybe 7.5 bits but let's say 7 for simplicity). That should give up to 7*6 = 42 dB of attenuation before the attenuation changes any of the original 16 MSB in a way that is not perfectly reversible.

In this case, if you digitally attenuate it by anything less than 42 dB, when you turn it back up again you have the exact same bits.
 

Jose Hidalgo

Addicted to Fun and Learning
Joined
Aug 15, 2020
Messages
962
Likes
1,041
Location
France
Here's an intuitive interpretation of that:

If you start with a 16-bit source and you have a 24-bit volume control that dithers the LSB, then you've added 7 bits to the "right" of the 16 MSB (OK maybe 7.5 bits but let's say 7 for simplicity). That should give up to 7*6 = 42 dB of attenuation before the attenuation changes any of the original 16 MSB in a way that is not perfectly reversible.

In this case, if you digitally attenuate it by anything less than 42 dB, when you turn it back up again you have the exact same bits.
Thank you, that's exactly what I've been saying since the beginning ! :D Only I said 48 instead of 42 (for 24 bit), and 96 for 16 bit. Nevermind the exact values, nevermind if it's 45, 47 or 48. The point is that we ARE indeed bit-perfect until ridiculous attenuation levels (about -48 dB in 24 bit, and about -96 dB in 16 bit !!!), so people don't need to worry about it, that's all. Plus it's perfectly explained in the HydrogenAudio topic that I linked. Can we all agree on that ? :)
 

MRC01

Major Contributor
Joined
Feb 5, 2019
Messages
3,503
Likes
4,145
Location
Pacific Northwest
Thank you, that's exactly what I've been saying since the beginning ! :D Only I said 48 instead of 42 (for 24 bit), and 96 for 16 bit. Nevermind the exact values, nevermind if it's 45, 47 or 48. The point is that you ARE indeed bit-perfect until ridiculous attenuation levels, so people don't need to worry about it, that's all. Plus it's perfectly explained in the HydrogenAudio topic that I linked. Can we all agree on that ? :)
We're not out of the woods yet, because that explanation is only about the digital signal being "perfect" or reversible. It doesn't account for the lower SNR you get as you reduce the volume. Put differently: even when volume adjustments are digitally "perfect" not losing any resolution, when you turn the volume down by some amount, X dB, the SNR also drops by X dB, since you shrink the signal against a constant residual noise background.

Let me suggest a test that gets you out of the woods: when you plug your headphones into your amp when set to full volume, playing a "digital zero" input signal, two questions:
1. Can you hear the amp's residual noise floor?
2. If a full scale signal was played at that volume level, would it blast your eardrums and melt your skull? Or at least, would it be louder than you would ever want to hear, even for a brief transient peak?

If the answers to the above questions are NO and YES, then you're out of the woods. In your case, it's a "solved problem". Leave the amp at that volume and use the digital volume control at your source. The fact that the volume control lowers the SNR doesn't matter because even as it lowers it's still high enough for your application.

If the answer to (1) is YES, then slowly turn down the amp volume until you can't hear its residual noise floor. Wherever that volume setting is, does it still have good channel balance and can you still answer YES to question 2 above? If so then you're out of the woods, as above.
 

Jose Hidalgo

Addicted to Fun and Learning
Joined
Aug 15, 2020
Messages
962
Likes
1,041
Location
France
Thanks. Er, I'm sorry, don't take it personally, but this topic wasn't supposed to turn into you lecturing me. It was supposed to be us and other people helping the OP. No offense.

I know the test you have suggested. You can find it indirectly in Amir's reviews, when he tests, say, something like the L30 and measures its dynamic range at full volume and at only 50 mV output under 600 Ohm. Of course in that case the dynamic range drops a lot, from say 21 to 16 bit... which happens to be the maximum dynamic range of a CD (theoretical - in real recordings it's of course much less). So we are indeed out of the woods ! But for peace of mind, I still keep mine close to maximum volume.

(plus I was only talking about the digital domain, and after the DAC's output we are of course in analog-land with all its wonders - but the analog world can't be bit-perfect since there are no bits anymore :p)

So once again, I think we are confusing the OP. Let's not overthink this : if he grabs a good DAC and a good amp (you can have both for less than 250 €/$ nowadays), then he as all that he needs to be "bit-perfect" (whatever that may be...), provided he does the right settings within Windows and within his player. ASIO/KS/WASAPI is not even required to be bit-perfect, as demonstrated recently by DDF in his topic about Equalizer APO. :)
 

MRC01

Major Contributor
Joined
Feb 5, 2019
Messages
3,503
Likes
4,145
Location
Pacific Northwest
I don't intend to lecture anyone. Just keep in mind the analog equivalent of bits. If the amp SNR drops to the low 80s when set to normal volume levels (many that Amir has tested do), that's only 13-14 bits which would undermine the point of having a 24-bit digitally transparent volume control.
 

Jose Hidalgo

Addicted to Fun and Learning
Joined
Aug 15, 2020
Messages
962
Likes
1,041
Location
France
Yes, I know, and we agree on that :) Again, I'm no expert, but as far as answering the OP's question goes, I'm pretty sure of my answer. In the digital domain, if the DAC is 32bit, you have about -96 dB of headroom for 16bit music while remaining bit-perfect. More or less. And once you get all the settings right, then you can go and mess everything up with a nice tube amp full of distortion. :p:facepalm:
 

earlevel

Addicted to Fun and Learning
Joined
Nov 18, 2020
Messages
567
Likes
792
Actually I do :) Because that's what I was told to do here.
I listen at full volume (or almost full volume) on both my DAC + L30 amp, and I lower the volume digitally in the player.
I guess I could also lower it digitally in the DAC with the remote, but my keyboard is closer.
Anyway, the analog amp remains close to full volume, et the 0 dB position which has the best measurements. Isn't that the best ?
If I understand you correctly, this isn't ideal. But to be clear, I'm not saying it's wrong, and in fact I do the same as you (effectively, that is—I control gain digitally at the DAC, because I don't have a convenient amp control). It's not going to make much difference, except in a case where the amp is so loud that you have to do large digital attenuation even for full-volume listening. Explanation: If you turn down your player ~6 dB, it's now sending 23 bits. No big deal, but depends on how much you have to turn down—at -48 dB, you're sending 16. I know people have different thoughts on this, but all things of sufficient quality I'd turn down the amp, ideally.

About the DC being "32-bit". First, it isn't really, and even with 32-bit we're more often talking about 32-bit floating point, which holds 25 bits of precision. But even if you do just one -6 dB shift to move the the 1st through 24th bits into the second through 25th bit, just because you didn't lose the 24th bits in the data stream doesn't mean it will end up being converted to analog—it falls off the end.

Anyway, the concept of bit perfect volume control, as some have pointed out, is a silly proposition. (And reversibility doesn't matter.) Whether you dither or not, the quantization error will be in the least significant bit. Your gear can't reproduce it, we just pretend we have 24 bit converters anyway, because that was the 3-byte sample size we standardized on. We didn't standardize on it because we needed it or could achieve it, but there was no use or logic in leaving the last few bits empty. :D

In other words, unless someone's digital volume control is broken somehow, then it's fine. There is some value in optimizing the gain staging (which volume control you use), but it's usual not profound. At my computer, I keep the computer output on max, my active speakers on max, and twddle the volume control on my Topping DX7 Pro as needed. It's impractical to twiddle the volume controls on the backs of the individual speakers, and it's really not going to change my listening experience anyway. My other powered studio monitors don't even have volume controls, it would also be a matter of digital gain control or inserting an attenuator or analog preamp, which doesn't make a lot of sense.
 

chris719

Senior Member
Joined
Mar 22, 2019
Messages
373
Likes
425
Again, I'm no expert...

There is no such thing as bit-perfect digital volume control. There is only well implemented or poorly implemented. No one cares what you believe or your thread says. As someone who has implemented digital volume control, there is absolutely no such thing as bit-perfect volume control and we should not endorse the use of an incorrect term.

Yes, I understand what you are getting at, but bit-perfect / bit-accurate mean something else.
 
Last edited:

earlevel

Addicted to Fun and Learning
Joined
Nov 18, 2020
Messages
567
Likes
792
It just occurred to me that concern over “bit perfect” gain changes is something like this:

Bill: I’m concerned that when I have some money in my pocket, and I want to give half of it to someone, sometimes I can’t do that. If I have $4, I can give away $2, but if I have $3.95, half isn’t exact. I typically round up, so it’s $1.98 in that case.

Ted: So? It is what it is. There is no half-cent.

Bill: You don’t understand—if I double it back up, it’s $3.96 instead of $3.95. I didn't preserve my original amount.

Ted: OK…still off my a negligible amount, but why do you need to double it back up after halving it?

Bill: Well, in fact I don’t need to—and can’t, actually—it’s all about giving away half of it. But it bothers me that it wouldn’t come back to exactly $3.95 if I could double it up. And it's worse if I choose a different factor.

Ted: How? Your maximum error is always between zero an a half-cent no matter what you divide your money by.

BIll: You don’t understand—I need “cent-perfect” multiplication to do this, I’ve been told that.

Ted: Sorry, you’ll either need to give it all away, none of it away, or accept an inconsequential error if you choose something in between.

Yes, if the issue is that you're doing this with 16-bit audio and a 24-bit converter, you have 256ths "of a cent" to work with, so gains of half, fourth, etc., up to 256th will be perfect. But if you look at it that way, you'll only have a maximum error of a "512th of a cent" anyway. And for 24-bit, forget it, accept that you might lose a half bit, which already can't be heard, and the electrical error is much larger anyway, always, and unavoidably.

If your digital gain control truly gives you -6 dB of gain when you dial up -6 dB (my DX7 Pro is in 0.5 dB increments), as it should, it's not going to be an exact halving of the signal. -6 dB is not 0.5, but ~0.5012. People say -6 db is half, but that's just a round figure. Half is really 10^(-6/20), around -6.0206 dB. So, unless my DX7 Pro is lying, and somehow fudges multiples of 6 dB to be bit shifts (no, no one does that), it's all a fantasy anyway. :p
 
Last edited:

chris719

Senior Member
Joined
Mar 22, 2019
Messages
373
Likes
425
Yes, it's splitting hairs. You can easily test if a transport or audio path is bit-perfect with a non-audio stream like Dolby AC3 or DTS. A test that I used to do for sound cards is create a WAV file with AC3 encoded content and play it back. If you are connected to a decoder via SPDIF and the path is bit-perfect you will get audio decoded. If you have any sort of processing, including volume control or dithering, you will get loud noise.

It's nonsensical to ask or say that digital volume control can be bit-perfect when it's basically not able to be by definition. It's almost as bad as asking if a low-pass filter is bit-perfect.
 
OP
E

enricoh

Member
Joined
Jun 17, 2020
Messages
21
Likes
2
Location
.at
Please, I am really the noob here. Perhaps I can give you an example. Running RPI4 with Ropieee which is connected to the Roon core. Dac with volume control (Sanskrit 10th v2) is connected to the PI. Using Roon remote app on Macbook Pro, iPhone or iPad. Within Roon settings I get at Volume control "Device Volume" as default. The Sanskrit DAC is set to 00 db. In this case I can control the volume with Roon remote app, the Roon signal path stay lossless. Does this mean in this case that I am using the volume control of the DAC or of the Roon remote?
 

AnalogSteph

Major Contributor
Joined
Nov 6, 2018
Messages
3,422
Likes
3,373
Location
.de
The latter, assuming I understood this scenario correctly.

In these days of 32-bit or 64-bit float processing, worrying about bit-perfectness seems a bit passé indeed, unless getting data streams from A to B unscathed is what you're after (AC-3, DTS or even DoP, as previously indicated). When dealing with plain PCM audio, you can pretty much embrace the benefits of not being bit-perfect without worry. Useful applications like playback level normalization (e.g. ReplayGain) and EQ / room correction come to mind immediately. With modern DAC performance, it's not like we couldn't afford losing a few dB of level either.
 
OP
E

enricoh

Member
Joined
Jun 17, 2020
Messages
21
Likes
2
Location
.at
The latter, assuming I understood this scenario correctly.

In these days of 32-bit or 64-bit float processing, worrying about bit-perfectness seems a bit passé indeed, unless getting data streams from A to B unscathed is what you're after (AC-3, DTS or even DoP, as previously indicated). When dealing with plain PCM audio, you can pretty much embrace the benefits of not being bit-perfect without worry. Useful applications like playback level normalization (e.g. ReplayGain) and EQ / room correction come to mind immediately. With modern DAC performance, it's not like we couldn't afford losing a few dB of level either.

ok, but if I set in the Zone settings of Roon the volume leveling for the DAC to ON/AUTO and now control the volume with Roon remote I get an "Enhanced" signal path in Roon. Within the signal path I can see then that the Roon program is doing something before the signal reach the RPi.
 

GDK

Addicted to Fun and Learning
Forum Donor
Joined
Aug 8, 2020
Messages
563
Likes
1,556
Location
Toronto
I can see then that the Roon program is doing something before the signal reach the RPi.
Yes, Roon is using its 64 bit floating point DSP to level the volume. This adjustment means that Roon will not call it lossless, and so it calls it enhanced because the original signal has been altered, but not in any audible way (apart from any attenuation from the volume levelling, of course).

tl;dr You’re fine. Don’t sweat it.
 

Jose Hidalgo

Addicted to Fun and Learning
Joined
Aug 15, 2020
Messages
962
Likes
1,041
Location
France
No one cares what you believe or your thread says.
Some people think they're smart enough to arrive at a new forum, start being insulting against members and denying reference threads. :facepalm:
I am happy to discuss with most people, but not with that kind of people. Hence I'll be ignoring you from now on.
*click*

As for the OP, obviously I stand by what I said in my previous posts. Many people in the last posts have said exactly the same thing in various manners and with creative analogies that deserve our appreciation. The fact is, the OP has lots of headroom to work with, while preserving something that could be called "bit-perfect", and like several members have said, "you're fine. Don't sweat it".

I'm out of here now. :)
 
OP
E

enricoh

Member
Joined
Jun 17, 2020
Messages
21
Likes
2
Location
.at
Some people think they're smart enough to arrive at a new forum, start being insulting against members and denying reference threads. :facepalm:
I am happy to discuss with most people, but not with that kind of people. Hence I'll be ignoring you from now on.
*click*

As for the OP, obviously I stand by what I said in my previous posts. Many people in the last posts have said exactly the same thing in various manners and with creative analogies that deserve our appreciation. The fact is, the OP has lots of headroom to work with, while preserving something that could be called "bit-perfect", and like several members have said, "you're fine. Don't sweat it".

I'm out of here now. :)

thanks Jose for all your explaination.
 

Jimbob54

Grand Contributor
Forum Donor
Joined
Oct 25, 2019
Messages
11,148
Likes
14,829
The latter, assuming I understood this scenario correctly.

In these days of 32-bit or 64-bit float processing, worrying about bit-perfectness seems a bit passé indeed, unless getting data streams from A to B unscathed is what you're after (AC-3, DTS or even DoP, as previously indicated). When dealing with plain PCM audio, you can pretty much embrace the benefits of not being bit-perfect without worry. Useful applications like playback level normalization (e.g. ReplayGain) and EQ / room correction come to mind immediately. With modern DAC performance, it's not like we couldn't afford losing a few dB of level either.

I actually think in the way @enricoh has Roon and his DAC set up (volume control is set to Device Volume) , adjusting the volume with the Roon app is actually just instructing his DAC to do the attenuation. There are other settings in Roon which will instead attenuate the volume in Roon's own DSP before sending to the DAC- cant recall the setting title.

My DAC has a 30 step volume when in preamp mode- with the above settings in Roon I cant see the numbers drop on the DAC display when I turn the volume down in Roon. Other setups mean this DAC level remains unchanged and Roon shows a 0-100 volume slider.

EDIT- not that this has any practical implications in my experience- I suppose there is a degree of greater control when using 0-100 scale than 0-30 scale
 
Top Bottom