After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 618551 - Total deciBel gain is incorrect
Total deciBel gain is incorrect
Status: RESOLVED NOTGNOME
Product: gnome-media
Classification: Deprecated
Component: gnome-volume-control
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: gnome media maintainers
gnome media maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-13 16:15 UTC by clubsoda
Modified: 2010-05-17 10:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description clubsoda 2010-05-13 16:15:52 UTC
Hello,

This report relates to the gnome-volume-control panel applet, which reports the total gain as a percentage and in deciBels whenever the user performs a mouse-over.

The dB gain reported seems to assume that "all sliders at max" is the zero dB reference level. However, this is not always the case. For example, on my system, 
Master ranges from -46.5dB to 0dB but
PCM ranges from -34.5dB to +12dB,
so if these are both set to maximum the total gain will be +12dB. This is important because if I use those maximum settings and play any audio which peaks above -12dB, the output will clip and sound distorted.

I find the percentages meaningless and I guess they are here to stay. :) But please keep the integrity of the deciBel scale so that "all sliders to 0dB" remains the foolproof recipe for clean audio.

Cheers.
Comment 1 Bastien Nocera 2010-05-13 16:54:05 UTC
Are you sure that your audio card's drivers correctly advertises those dB levels?

In any case, we only display what PulseAudio tells us, so you should poke the PulseAudio devs about this.

This is the code in question:
gdouble
gvc_mixer_stream_get_decibel (GvcMixerStream *stream)
{
        g_return_val_if_fail (GVC_IS_MIXER_STREAM (stream), 0); 

        return pa_sw_volume_to_dB(
                        (pa_volume_t) gvc_channel_map_get_volume(stream->priv->channel_map)[VOLUME]);
}
Comment 2 clubsoda 2010-05-17 10:20:25 UTC
Thanks for your informative reply.

One thing still puzzles me about this though. If the incorrect total dB values are coming from pulse, how is it possible that the gnome-volume-control-applet is aware of the difference between "unamplified" and "100%"?
If I right-click and open the Sound Preferences app, the output volume scale shows those reference points and they agree with the 0dB and all-sliders-max positions in the command-line version of alsamixer.

In any case, I have filed a bug with pulse here:-
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/581650

Regards.