Digital Volume Control on Android Tablet?

chinook9

Member
2013-08-15 4:00 pm
All of the music I listen to is from TIDAL Premium using USBAudioPlayerPro on an Android tablet. I run a USB cable from the tablet to the DAC. I hold the tablet in my lap and use it like a juke box.

I feed my amp directly from an ES9018 DAC and use the volume control in the chip. My problem is that I am frequently jumping up to change the volume on the DAC.

It would be much more convenient to me if I disable the volume control on the DAC and change the volume using the volume control in USBAudioPlayerPro.

As far as I know, it has always been gospel that changing the volume in the PC/tablet degrades the signal, but I have recently been reading that volume control in the tablet/PC may be no more degrading than volume control in a preamp/dac.

I have tested this and I haven't noticed any degredation of the SQ, however, my ears aren't the greatest and I have not done extensive listening.

Thoughts?
 
You've made a relevant discovery...

Does one thing (in this case, digital volume control) degrade the signal? Perhaps. Often the reason is theory, if even that. Remember this hobby has a huge number of enthusiasts in it. Reason often goes out the window :) In the present example, it is possible that the signal is theoretically worsened. Very well, can you actually hear the difference? In many cases, including your own observations, the answer is "no." So if you don't perceive a problem, why worry about it? The following applies to life as well as the sub-field of audio: Many beliefs are unsupported by facts. Even of beliefs supported by measurement, some of these may not matter to subjective evaluation. For example, I don't doubt that lab instruments can measure between 0.01% and 0.1% THD of an amplifier but I'd be astonished if listeners could reliably detect any difference in controlled double-blind tests. :whazzat:
 
The truth behind this is that there are two ways to do a digital volume control, the easy way and the better way.

The easy way multiples the sample values individually by a ratio and rounds to the nearest integer. The very slightly better way also sums in 1/2 LSB of random noise to decorrelate the (re)quantization noise.

However the best way, especially with an oversampled signal is to scale the samples at extra precision, then low-pass filter to the audio band, then requantize. This uses the extra information in the upsampled stream to lower the effective requantization noise level.

A worst case signal to consider is a very slowly varying value (a low volume low frequency tone for instance). Just multiplying samples with a ratio will produce uneven steps in the output - for instance scaling by 2/3rds will map 1,2,3,4,5,6,7 to 1,1,2,3,3,4,5,5 etc. So on long runs: 1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5 you get 1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5,5,5,5,5, which adds new frequency spurs. Doing the full process averages out those steps over many samples and keeps the spurs under control.

So depending on what sophistication in involved in each piece of equipment there may well be a better site to do gain control, especially with 16 bit sources.
 
1.
Resampling and filtering add their own flaws. You're fighting fire with more fire.
To do proper upsampling and lowpass filtering you'd need to attenuate the signal.
With this method you'd run digital volume control twice - before and after.
Let's not talk about filter associated flaws.


2.
Many DAC chips offer rather basic (mediocre) DSP functionality. Some DAC "device" manufacturers try to fight it by
introducing high performance FPGAs to implement their own high quality DSP algorithms.
They even introduce 64bit processing and so forth.. "Some!!!"
Using mediocre filters and DSPs won't help anybody.

I'm not sure how the OP concluded it's been "gospel" to use on-DAC VC.

3.
If the On-DAC volume control or the host sided volume control is the one to go for depends.

First of all the DAC device, through its firmware and the host-OS usb-audio driver, has to offer external on-DAC volume control.
Just because a e.g. ES9018 offers on-chip volume control doesn't mean you can access it on the operating system.
2nd. If you have both options. Just try it. And make up your own mind.
3rd. Try to figure out how volume control and DSP is done on both sides. That might lead you into the right direction. A well done DSP on the host (Android/Linux/Windows)
can beat a on-DAC VC - IMO.


4.
Another - to me - important factor is the volume control curve.
That curve can heavily differ on host (app) and DAC. Running two (or more) different curves could make a weird impression towards the listener.
And usually these curves (= your VC experience) are different. There is no standard. It's a jungle.

Talking about my approach: Being annoyed by that VC jungle I rewrote the squeezelite volume control to get exactly 1dB per click for external and internal VCs.
Most apps run scales with 101 steps/clicks. I changed it that way that now exactly 100=0dB, 94=-6dB, 88=-12dB asf. "Exactly" is of course not true, since you round to the next integer, while doing the scale/curve mapping.


I'm running my Khadas Toneboard (ES9038Q2M) with host based VC (my squeezelite version) and am not using the Toneboard on-DAC VC ( which they made available via firmware upgrade not long ago).

Enjoy.
 

chinook9

Member
2013-08-15 4:00 pm
Thank you guys for your input. I only understand a slight bit of it but this is great information to be available to others researching this subject.

I though it was a common belief that, when not using a preamp, on-DAC VC was better. Not sure where I got that. Either way I know better now.

The good news is that I am OK using the volume control in USBAudioPlayerPro. I haven't noticed any degredation in the sound.

I'm not sure I can do upsampling in USBAudioPlayerPro but I'll check. I normally leave upsampling to the DAC chips. Its my understanding that ES and AK chip both do upsampling within the chip.

I have a Dennafrips Ares 2 on the way so I may check out upsampling options when I'm checking it out.