[pulseaudio-discuss] Mic input volume controls

Kulikov, Vitaliy Vitaliy.Kulikov at idt.com
Wed Dec 1 09:34:05 PST 2010


Hello everybody,

I would like to add more details for issue #1. Just changing order of
the capture and MIC volume controls in the path is not enough if those
volumes have gain only ranges and the reason is that, AFAIK, currently
PA adjusts requested volume to the higher HW volume step. But if we
change it to lower HW step it should work just fine. Here is the example
how that works. 
Let's say we have 22.5 dB gain only range with the 1.5 dB steps for
capture HW control and 40 dB gain only range with the 10 dB steps for
MIC boost control. Now, for all volumes between 0 and 10 dB PA will keep
MIC boost level at 0 dB (when it is first in the path) and set capture
level to 1.5, 3, 4.5 etc levels. And when level reaches 10 dB, then MIC
boost will be set at 10 dB and capture at 0 dB. For the requested levels
between 10 and 20 db, MIC boost will be kept at 10 dB and capture level
will take the difference and so on.

Vitaliy Kulikov, 
Integrated Device Technology, Inc
 

> -----Original Message-----
> From: David Henningsson [mailto:david.henningsson at canonical.com] 
> Sent: Wednesday, December 01, 2010 7:56 AM
> To: General PulseAudio Discussion
> Cc: Kulikov, Vitaliy
> Subject: Mic input volume controls
> 
> Hi folks,
> 
> The way we control mic input is quite broken. I've tested 
> here with both IDT codecs and Realtek codecs (the two most 
> common HDA Codecs AFAIK) and as far as I see they're both 
> broken in the same ways.
> 
> Let's assume that we have an internal mic and an external mic 
> jack, with autoswitching in the kernel. We have a "Mic Boost" 
> affecting the external mic jack, a "Front Mic Boost" 
> affecting internal mic, and a "Capture" control affecting both.
> "Mic Boost" and "Front Mic Boost" go from 0 to 60 dB in 20 dB 
> steps, and "Capture" goes from 0 to 22.5 dB in 1.5 dB steps.
> 
> 1)
> The first problem is PA is unable to combine both of them 
> correctly: for the first 0 to 22.5 dB, PA moves the "Capture" 
> control only. After that say at 25 dB, "Mic Boost" moves to 
> +20 dB, keeping "Capture" at 22.5 dB, then using softvol to 
> compensate, instead of lowering "Capture". I've been 
> suggested that changing the order of "Mic Boost" and "Capture" 
> improves this situation, so we should probably do that. Any 
> objections?
> 
> 2)
> The harder problem is that PulseAudio does not know whether 
> to control "Mic Boost" or "Front Mic Boost", since it doesn't 
> know what path is active at the moment. While we really need 
> some kind of module, and appropriate kernel support, the 
> question is what we do before that becomes sufficiently 
> available. The next best solution, would probably be to have 
> different profiles and manual autoswitching. While I yet have 
> to look into the details, I guess we'll have to add different 
> profiles for "Mic", "Front Mic", "Rear Mic" and so on, 
> instead of having them in the same file as we have today. Any 
> thoughts?
> 
> 3)
> It'd be great if we could present something else than 
> "Microphone 1", "Microphone 2" and so on when we have more 
> than one mic input. Any idea of where this name actually 
> comes from, and how we can make it better?
> 
> Thanks/credits to Vitaliy Kulikov for helping with the analysis.
> 
> 
> --
> David Henningsson, Canonical Ltd.
> http://launchpad.net/~diwic
> 



More information about the pulseaudio-discuss mailing list