[pulseaudio-discuss] Mic Boost on AC97 audio causes bad behavior of mic volume control

Raymond Yau superquad.vortex2 at gmail.com
Tue Apr 21 19:24:58 PDT 2015

there has been some discussion about Mic Boost  / Dock Mic Boost in the
> past already. Some have reported no Mic output at all without Boost,
> other say that enabling Boost will cause high noise on their systems.
> I have another point here that AFAICS hasn't been reported yet.
> It has been caused by the commit e6051cdf "alsa-mixer: Prefer moving
> "Capture" before moving boosts"
> (
> http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=e6051cdf8db554c0bbd4257959c37a7ecc9c10c5
> )
> (see also
> https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1085402).
> In short, on my system, input volume control is hardly possible above
> 25% because of this patch.
> The effect that I am seeing is as follows: I have two merged volume
> controls for my Mic, "Capture" and "Dock Mic Boost". They are applied by
> PA in the order encountered in the path conf file. On my system (Fujitsu
> Lifebook E744 with Realtek ALC282 Codec), the "Capture" Amp has a range
> of -18..30 dB in 0.75 dB steps, and "Dock Mic Boost" has 4 12dB steps
> (0, 12, 24, 36). PA merges these two controls to a single volume control
> with an overall range of -18..66dB. Normalizing at the max, PA converts
> this to -84..0dB, where the Boost comes in at -36dB, or 25% of the
> scale. The "base volume", calculated from the "offset" of the ALSA amp,
> is at -66dB or 8%.
> Because of the above patch, the "Capture" control is used first. Thus
> the range from -84...-36 dB (or 0..25%, because of the non-linearity of
> PA's volume control) is covered with "Capture". Above that level,
> "Capture" is always held at 100% and only "Doc Mic Boost" changes. This
> means that above 25%, there are only 3 steps that are actually possible:
> -24dB / 40%, -12dB / 63%, and 0dB / 100%.
> => There is no "smooth" volume control above 25%.
> The graphical volume controls don't reflect this; thus user control
> input volume is almost impossible at higher levels than 25%. Volume will
> appear to change non-predictably to users.
> By changing the ordering of "Capture" and "Mic Boost" in the path conf
> file /usr/share/pulseaudio/alsa-mixer/paths/analog-input-dock-mic.conf,
> I can get smooth changes over the whole dynamic range again. Therefore I
> reckon that commit e6051cdf should be reverted because the effect
> described here is general, while the noise level seems to be different
> between models: On my system, there is no perceivable difference in
> noise level if the overall volume is the same (thus, 30dB "Capture" +
> 0dB "Boost" has the same noise level as 18 dB "Capture" and 12 dB
> "Boost" or -6dB "Capure" and 36dB "Boost").
> However, I tend to think that PA's concept of volume "merging" generally
> doesn't work well for a "Boost" control. The "Boost" is conceptually
> rather a switch than a slider. A dynamic range of 84 dB doesn't make a
> lot of sense for a cheap Mic like the typical laptop's Mic input. It
> would be more reasonable to nail the Mic Boost switch to a certain value
> that matches the hardware and just use the "Capture" dynamic range for
> volume control. In the short run, this could be done by setting Mic
> Boost to 0 or 1, e.g.:
> [Element Dock Mic Boost]
> required-any = any
> switch = select
> volume = 1
> override-map.1 = all
> override-map.2 = all-left,all-right
> Ultimately, this shouldn't be hidden deeply in path conf files,
> therefore it would be necessary in the future that PA exhibit the "Mic
> Boost" control to users somewhere in the API / UI, unless some way is
> found to "guess" the optimal value for the boost on different systems.
The Capture Volume and Mic Boost are similar to fine adjustment and coarse
adjustment of the microscope

It is not easy to combine the "fine" and "coarse" adjustment into a single
volume slider which fit different scale in volume/boost

some user may prefer to adjust Boost first and Volume but other user may
prefer adjust Volume and keep Boost fixed

As pulseaudio is using floating point volume scale and combine volume and
boost to a single slider, the optimal solution may need a very complex
method of adjusting the fine and coarse adjustment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20150422/3d05fad5/attachment.html>

More information about the pulseaudio-discuss mailing list