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 567536 - Allow digital amplification for sources
Allow digital amplification for sources
Status: RESOLVED FIXED
Product: gnome-media
Classification: Deprecated
Component: gnome-volume-control
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome media maintainers
gnome media maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-12 21:47 UTC by Lennart Poettering
Modified: 2009-03-05 22:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gvc-amplified-inputs.patch (9.33 KB, patch)
2009-02-17 19:20 UTC, Bastien Nocera
none Details | Review

Description Lennart Poettering 2009-01-12 21:47:16 UTC
Please describe the problem:
Some sound cards record in less than 16 bit resolution and stick that data in the LSBs of the PCM stream. To make those sounds hearable digital amplification needs to take place. An elegant way to allow this is extending the volume slider to a positive dB range. i.e. instead of limiting the volume slider to -60dB..0dB (aka 0%..100%) it should be something like -60dB..60dB or suchlike.

This should be done only for sources. Not for streams, not for sinks. 

This is solely an UI issue. PA will handle things correctly if you simply pass a pa_volume_t that is > 65536.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 William Jon McCann 2009-01-16 19:36:31 UTC
Anyone have a patch for this?
Comment 2 Bastien Nocera 2009-02-17 19:20:24 UTC
Created attachment 128919 [details] [review]
gvc-amplified-inputs.patch

That should work, but I can't seem to make it show up as > 100%  in pavucontrol, or the volume applet.
Comment 3 Bastien Nocera 2009-02-17 21:42:56 UTC
2009-02-17  Bastien Nocera  <hadess@hadess.net>

        * src/gvc-channel-bar.c (on_scale_scroll_event),
        (gvc_channel_bar_set_is_amplified), (gvc_channel_bar_set_property),
        (gvc_channel_bar_get_property), (gvc_channel_bar_class_init),
        (gvc_channel_bar_init):
        * src/gvc-channel-bar.h: Add "is-amplified" property. In this mode,
        the volume can be set above 100% (150% tops actually) for inputs
        that support giving us the dB information
        * src/gvc-mixer-dialog.c (on_mixer_control_default_source_changed),
        (add_stream): Disconnect the value-changed signal, and 
        reconnect it when we're done setting is_amplified for source streams
        that support giving dB info
        (Closes: #567536)
Comment 4 Michael Monreal 2009-03-05 21:21:38 UTC
Hi Lennart,

the idea is good, but I'm not sold on the "PA will handle things correctly" part :)

I reported https://bugzilla.redhat.com/show_bug.cgi?id=488779 today after trying to record on my laptop (which has a RawHide test system with the latest and greatest PA). Recording did not work. I played with alsamixer and found that recording works if I set the slider back to the 0-100 range.

Ok, this may be a driver bug (the laptop has some Intel HDA variant). Problem is, it doesn't seem to work that well with my Logitech usb headset as well. I can record it set to 150, but the sound is heavily distorted if it is larger than ~110.

If this cannot be fixed in PA easily, maybe introducing a scale mark at 100 would help a bit?
Comment 5 Bastien Nocera 2009-03-05 22:05:18 UTC
Adding a mark is a good idea in any case, so filed as bug 574312