[pulseaudio-discuss] Reverting ade0a6f88464d8aecf83982d400ccfc402341920

David Henningsson david.henningsson at canonical.com
Fri May 13 13:11:55 PDT 2011


On 2011-05-13 18:20, Tanu Kaskinen wrote:
> On Fri, 2011-05-13 at 17:29 +0200, David Henningsson wrote:
>> In short; if we e g have Mic Boost levels at (0dB, 20dB, 40dB and 60dB)
>> and the user wants 30 dB, better have 20dB in hardware and +10dB in
>> software than 40dB in hardware and -10dB in software, as the latter one
>> is more likely to have digital distortion when the signal passes through
>> the ADC.
>>
>> There is a longer email on this list a while back, explaining more of
>> the philosophy behind, but I can't seem to find it right now.
>
> Ok, I think I understand why rounding down makes sense when recording.
> With playback, however, rounding towards 0 dB is definetely broken. My
> ability to think clearly happens to be currently a bit weakened, so I
> have to ask you: what's so magic about 0 dB?

Here's how I wrote it a while ago, quoting a thread named "Mic Input 
Volume Controls":

"
We want to maximise quality while avoiding digital distortion, that's 
basically the problem in a nutshell. We're assuming (sometimes 
incorrectly; but that's our best guess) that this golden spot will be 
achieved with all sliders at 0 dB.

I think my approach makes sense, unless I'm missing something: If we're 
aiming for something above 0 dB, let's round down to make sure we avoid 
distortion, and if we're below 0 dB, let's round up to make sure we get 
maximum quality.
And then we always start with the control that's closest to the physical 
hardware and work our way in.
"

Rethinking that, I don't think I've ever seen any playback volume 
control that goes above 0 dB. All HDA's I've seen go up to 0 dB only, 
whereas for recording there is both above and below 0 dB. Therefore the 
scenario you state has not crossed my mind. So maybe you're right about 
always rounding up with playback. If there actually was a say +6 dB 
switch and you wanted +4 dB, then we should do +6 dB in hw and -2 dB in 
sw as +4 dB in software would potentially cause digital distortion. Right?

 > With playback rounding should always be done up -
 > would it make sense to round always down with capture?

Maybe, if we give up the thought of 0 dB being magic.

-- 
David Henningsson
http://launchpad.net/~diwic



More information about the pulseaudio-discuss mailing list