<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Microphone has loud static/distortion when volume is not 100%"
href="https://bugs.freedesktop.org/show_bug.cgi?id=87814#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Microphone has loud static/distortion when volume is not 100%"
href="https://bugs.freedesktop.org/show_bug.cgi?id=87814">bug 87814</a>
from <span class="vcard"><a class="email" href="mailto:superquad.vortex2@gmail.com" title="Raymond <superquad.vortex2@gmail.com>"> <span class="fn">Raymond</span></a>
</span></b>
<pre><a href="http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/alsa-source.c">http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/alsa-source.c</a>
/* Shift down by the base volume, so that 0dB becomes maximum volume */
pa_sw_cvolume_multiply_scalar(&r, &r, s->base_volume);
pa_log_debug("Read hardware volume: %s",
pa_cvolume_snprint_verbose(volume_buf, sizeof(volume_buf), &r,
&s->channel_map, u->mixer_path->has_dB));
if (pa_cvolume_equal(&u->hardware_volume, &r))
return;
s->real_volume = u->hardware_volume = r;
you have to provide pulseaudio verbose when you change volume from min to max
as 0dB is not inside dB range
pa_log_debug("Requested volume: %s",
pa_cvolume_snprint_verbose(volume_buf, sizeof(volume_buf),
&s->real_volume, &s->channel_map, true));
pa_log_debug("Got hardware volume: %s",
pa_cvolume_snprint_verbose(volume_buf, sizeof(volume_buf),
&u->hardware_volume, &s->channel_map, true));
pa_log_debug("Calculated software volume: %s (accurate-enough=%s)",
pa_cvolume_snprint_verbose(volume_buf, sizeof(volume_buf),
&new_soft_volume, &s->channel_map, true),
pa_yes_no(accurate_enough));</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>