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

storing

Active Member
Forum Donor
Joined
Aug 27, 2021
Messages
226
Likes
220
All the measurements that follow are purely digital using REW through the Windows audio stack with no A/D or D/A conversions, and so any faults are Windows' alone
Excuse my laziness, didn't scan the entire thread, but can someone elaborate: is this some internal loopback by REW, or was an external soundcard used where the digital signal was looped back?
 

jlc

New Member
Joined
Jan 8, 2022
Messages
1
Likes
0
I'm using Windows 11, Tidal App and an iFi Zen DAC. Do you think EAPO could benefit the quality of my system in anyway? Thank you!
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
What I'm curious about is: if that software volume control is used, and the volume is set to less than 100%, is it possible to have an APO (e.g. Equalizer APO) output more than 100% signal level without clipping? For example, say the volume control is set to -6 dB, and I set a gain of +3 dB in some APO, and the application sends a full scale sine wave, will that sine wave clip or be limited by CAudioLimiter? Or is the hardware device simply going to receive a -3 dBFS sine wave without clipping?

The reason I'm wondering about that is because, if it doesn't clip, then such a behaviour could be quite interesting for people using, say, Equalizer APO for room EQ, because it would simplify gain staging and make it easier to use the full dynamic range of the system. In my case it would allow me to get rid of the whooping -12 dB anti-clipping attenuation I currently have set on my room EQ.

Unfortunately it looks like all the DACs I have lying around have hardware volume control so I can't use them to test my theory.

So… this drove me a bit crazy… so I did a crazy thing and wrote a Windows kernel-mode filter driver (yes, really) that makes it possible to force Windows to use software volume control on any audio device. Not sure if anyone would want to try it since it's a massive PITA to install, but here it is in case anyone is interested: WinSoftVol

And by the way the answer to my original question is a resounding yes. It is possible to use Windows software volume control to simplify gain staging - and possibly get a bit more effective dynamic range - when using Equalizer APO for room EQ for example.
 
Last edited:

dasdoing

Major Contributor
Joined
May 20, 2020
Messages
4,209
Likes
2,674
Location
Salvador-Bahia-Brasil
So… this drove me a bit crazy… so I did a crazy thing and wrote a Windows kernel-mode filter driver (yes, really) that makes it possible to force Windows to use software volume control on any audio device. Not sure if anyone would want to try it since it's a massive PITA to install, but here it is in case anyone is interested: WinSoftVol

And by the way the answer to my original question is a resounding yes. It is possible to use Windows software volume control to simplify gain staging - and possibly get a bit more effective dynamic range - when using Equalizer APO for room EQ for example.


I have a hard time understanding this. are you saying that on some devices pulling windows volume down wont effect the APO output levels?
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
are you saying that on some devices pulling windows volume down wont effect the APO output levels?

Not just "some". Most devices (including all 11 DACs I tested for this) use hardware volume control. If your device is using hardware volume control, then the master Windows volume control has no effect on the digital samples that make their way out of the Windows audio engine - it just sends volume control commands to your device instead. This means you can have the Windows volume control set all the way down and yet your output still clips in the digital domain, if you're playing full scale content and your APOs have positive net gain (for example).
 

dasdoing

Major Contributor
Joined
May 20, 2020
Messages
4,209
Likes
2,674
Location
Salvador-Bahia-Brasil
Not just "some". Most devices (including all 11 DACs I tested for this) use hardware volume control. If your device is using hardware volume control, then the master Windows volume control has no effect on the digital samples that make their way out of the Windows audio engine - it just sends volume control commands to your device instead. This means you can have the Windows volume control set all the way down and yet your output still clips in the digital domain, if you're playing full scale content and your APOs have positive net gain (for example).

ok, I was wondering how I never noticed this since I am using this peakmeter and volume control always had effect on it: https://sourceforge.net/p/equalizerapo/discussion/general/thread/08f7da7fa7/
turns out that the loudness correction plugin I am using in EQ-APO seams to bypass hardware volume. If I disable it I can't control the peak anymore
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
ok, I was wondering how I never noticed this since I am using this peakmeter and volume control always had effect on it: https://sourceforge.net/p/equalizerapo/discussion/general/thread/08f7da7fa7/

Interesting. I took a look at the code for that peak meter and it is using IAudioMeterInformation, which states (emphasis mine):

For a rendering endpoint device, the IAudioMeterInformation interface monitors the peak levels in the output stream before the stream is attenuated by the endpoint volume controls.

Therefore it is perfectly normal and expected for the volume control to not have any effect on the peak meter you are using. Presumably the fact that the volume control is software or hardware doesn't factor here - for consistency, Windows would likely meter the signal before the software volume control gain (if any) is applied.

I just checked on my machine and can confirm that the volume control setting doesn't have any visible effect on that peak meter software, even when software volume control is used. This is not a valid way to determine if you have hardware or software volume control - use one of these approaches instead.

turns out that the loudness correction plugin I am using in EQ-APO seams to bypass hardware volume. If I disable it I can't control the peak anymore

No, I don't think that's how it works. It doesn't "bypass hardware volume" - that doesn't seem technically possible. However, that particular filter you are using (Equalizer APO loudness correction) happens to change its behaviour based on the current value of the Windows volume control (hardware or software - it doesn't matter, it just reads the current Windows volume setting).

Since you are using a filter that changes its behavior based on the volume setting, then it makes perfect sense that you see differences in signal level in your meter as you change your volume setting. That doesn't mean you are seeing the actual direct effect of the volume setting (i.e. the gain) on the peak meter.
 
Last edited:

Robbo99999

Master Contributor
Forum Donor
Joined
Jan 23, 2020
Messages
6,875
Likes
6,673
Location
UK
Not just "some". Most devices (including all 11 DACs I tested for this) use hardware volume control. If your device is using hardware volume control, then the master Windows volume control has no effect on the digital samples that make their way out of the Windows audio engine - it just sends volume control commands to your device instead. This means you can have the Windows volume control set all the way down and yet your output still clips in the digital domain, if you're playing full scale content and your APOs have positive net gain (for example).
If that's the case then for a lot of DACS you can't run a reduced Windows Master Slider Volume Control of say -2dB (around 85% on the Windows Volume Slider) to allow for intersample overs, instead you'd have to run the negative preamp in music playback software or EqualiserAPO for instance. It's a useful point to realise, because often times people advise turning down the Windows Master Slider Volume Control to account for intersample overs.
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
If that's the case then for a lot of DACS you can't run a reduced Windows Master Slider Volume Control of say -2dB (around 85% on the Windows Volume Slider) to allow for intersample overs, instead you'd have to run the negative preamp in music playback software or EqualiserAPO for instance. It's a useful point to realise, because often times people advise turning down the Windows Master Slider Volume Control to account for intersample overs.

Well, I'm not sure. I think it might depend on how the hardware volume control is implemented in the DAC. Maybe some DACs implement it at an early stage in signal processing, such that intersample overs do not make it through to the stages where they could be harmful. That's just a wild guess though, I have no idea how many DACs would behave like this. This would be easy to confirm through measurement of intersample test signals.
 
Last edited:

Robbo99999

Master Contributor
Forum Donor
Joined
Jan 23, 2020
Messages
6,875
Likes
6,673
Location
UK
Well, I'm not sure. I think it might depend on how the hardware volume control is implemented in the DAC. Maybe some DACs implement it at an early stage in signal processing, such that intersample overs do not make it through to the stages where they could be harmful. That's just a wild guess though, I have no idea how many DACs would behave like this.
Probably better to implement any required negative preamps in software though rather than relying on the Windows Volume Slider....to be sure!
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
Check the block diagram of some Realtek chips and notice that volume controls are done after DAC, and therefore analog. No hardware volume control on SPDIF though.
1150.png


892.png


889.png



Many DAC chips however, have digital volume control before going through the digital filter, as indicated in the datasheets. Some products (the whole product, not the DAC chip) have hardware volume control on external chips, for example, the interface controller chip:
 

dasdoing

Major Contributor
Joined
May 20, 2020
Messages
4,209
Likes
2,674
Location
Salvador-Bahia-Brasil

I tried WASAPI output in Audacity but got errors. Not sure I want to install software only to test this,
because.....

No, I don't think that's how it works. It doesn't "bypass hardware volume" - that doesn't seem technically possible. However, that particular filter you are using (Equalizer APO loudness correction) happens to change its behaviour based on the current value of the Windows volume control (hardware or software - it doesn't matter, it just reads the current Windows volume setting).

Since you are using a filter that changes its behavior based on the volume setting, then it makes perfect sense that you see differences in signal level in your meter as you change your volume setting. That doesn't mean you are seeing the actual direct effect of the volume setting (i.e. the gain) on the peak meter.

I think what it does is setting windows volume (wether it be hardware or software) to max and only atenuates via filter curves. So in effect it seams to bypass windows atenuation, and doing all atenuation inside EQ-APO
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
Many DAC chips however, have digital volume control before going through the digital filter, as indicated in the datasheets.

In a sense, it's a shame that these products are designed with "hardware-but-not-really" (i.e. digital) volume control. I would argue such products should not advertise a volume control feature in their USB descriptors, because it's often preferable to let the USB host (here, Windows) do it instead. It would also make things simpler for the product designer since they would have one less thing to worry about!

I don't know why they do it anyway - compatibility reasons perhaps, maybe some USB hosts are not smart enough to insert their own software volume control if the USB Audio device doesn't provide one.

I tried WASAPI output in Audacity but got errors

I believe Audacity uses WASAPI Shared, not WASAPI Exclusive, so that wouldn't have been a valid test anyway.

I think what it does is setting windows volume (wether it be hardware or software) to max and only atenuates via filter curves. So in effect it seams to bypass windows atenuation, and doing all atenuation inside EQ-APO

If it did that, you'd notice, because then your Windows volume control would stay permanently stuck at 100% and you wouldn't be able to adjust it!

I looked at the code of the loudness filter and there is indeed a function for setting the volume but it appears to be unused (dead code). Perhaps the author initially intended to do something like you're describing but then realized it was a bad idea to mess with the user's own volume control setting.
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
@dasdoing I think it's pretty clear what the loudness filter is doing if you just look at the effect in the analysis panel of the Equalizer APO GUI:

loudness.gif


Basically, when you lower the Windows volume control, the loudness filter applies even more attenuation in addition to the volume control gain, across much of the frequency range (except low bass). This is why you are confused by what you're seeing in the peak meter. Your peak meter is showing the additional attenuation from the loudness filter, not the attenuation from the volume control itself.
 
Last edited:

dasdoing

Major Contributor
Joined
May 20, 2020
Messages
4,209
Likes
2,674
Location
Salvador-Bahia-Brasil
@dasdoing I think it's pretty clear what the loudness filter is doing if you just look at the effect in the analysis panel of the Equalizer APO GUI:

View attachment 178445

Basically, when you lower the Windows volume control, the loudness filter applies even more attenuation in addition to the volume control gain, across much of the frequency range (except low bass). This is why you are confused by what you're seeing in the peak meter. Your peak meter is showing the additional attenuation from the loudness filter, not the attenuation from the volume control itself.

ok, though I always looked at the analyser, only by looking at your animation it became 100% clear.

I now tested with foobar. ALC892 volume works while in wasapi (analog out), AMD's HDMI volume doesn't.

I still don't understand the advantage of your code though. let's say you have a EQ filter in EQ-Apo that indicates +10dB peak. We know have to atanuate digitaly. afaiui there will be no diference if you atenuate digitaly inside EQ-APO vs windows software volume control?
 
Last edited:

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
I now tested with foobar. ALC892 volume works while in wasapi (analog out), AMD's HDMI volume doesn't.

That matches what I'd expect. An HDMI output is a digital-to-digital converter so it makes sense it would not provide hardware volume control.

I still don't understand the advantage of your code though. let's say you have a EQ filter in EQ-Apo that indicates +10dB peak. We know have to atanuate digitaly. afaiui there will be no diference if you atenuate digitaly inside EQ-APO vs windows software volume control?

Let's say that you're playing content that is inherently low-volume/high-headroom (say most movies, normalized music). In that case that -10 dB anti-clipping filter you added in Equalizer APO is likely overkill and counter-productive - it might limit your output level too much (in other words it reduces your dynamic range), while not actually preventing any real clipping since the signal level is so low in the first place. But you can't remove that -10 dB attenuation filter, because if you do, then as soon as you start playing high-volume/low-headroom content (say games, unnormalized music), it's going to clip like crazy.

What would be ideal is a "smart" attenuation filter that adapts to the level of the content you're playing and always maximizes dynamic range while making clipping as unlikely as possible. This is precisely what software volume control does.
 
Last edited:

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
In a sense, it's a shame that these products are designed with "hardware-but-not-really" (i.e. digital) volume control. I would argue such products should not advertise a volume control feature in their USB descriptors, because it's often preferable to let the USB host (here, Windows) do it instead. It would also make things simpler for the product designer since they would have one less thing to worry about!

I don't know why they do it anyway - compatibility reasons perhaps, maybe some USB hosts are not smart enough to insert their own software volume control if the USB Audio device doesn't provide one.
The Realteks are HDA Codecs with computer awareness. On the other hand DAC chips are not. Inputs like I2S and TDM still require additional chips to communicate with USB, PCI and such. Products can only or can be used in standalone mode (disc players, digital receivers/mixers...) may utilize the DAC chip hardware volume control via other input methods like remote control, knobs, buttons, faders and so on, without using any computer protocol.

wm8741.png


If the volume control is done before converting to analog it is digital. If it is done before entering the digital filter it can prevent intersample over. None of them can prevent floating point over though, and I suppose it is one of the reasons why you made WinSoftVol.
 
Top Bottom