GNOME Bugzilla – Bug 567536
Allow digital amplification for sources
Last modified: 2009-03-05 22:05:18 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:
Anyone have a patch for this?
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.
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)
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?
Adding a mark is a good idea in any case, so filed as bug 574312