GNOME Bugzilla – Bug 581915
Please allow only discrete volume levels depending on pa_sink::n_volume_steps
Last modified: 2021-06-09 16:06:35 UTC
Please describe the problem: PA exports in pa_sink::n_volume_steps how many discrete volume steps are actually supported by a device. For devices where we have dB information for this will always be 65537 and doesn't matter much, but for devices like BT headsets an cheap USB sound cards we don't have that information and the supported volume steps can be very small (8 or so). It would be good if this could be reflected in the sliders, so that only those discrete points are actually selectable. n_volume_steps stores how many steps are supported between 0 and PA_VOLUME_NORM. If this value is e.g. 4 the four volume levels are calculated like this: PA_VOLUME_NORM*x/(4-1) for x in 0..3. i.e. 0, 21845, 43690, 65536 Or more general: PA_VOLUME_NORM*x/(m-1) for x in 0..m-1 Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Should we only use the b_volume_steps if the sink or source doesn't have dB info, or in all cases?
n_volume_steps is always valid. It is safe to use that in any case. Oh, dunno what I was smoking before, m is of course the same as n_volume_steps, so we can just write this like this: PA_VOLUME_NORM*x/(n_volume_steps-1) for x in 0..n_volume_steps-1
Created attachment 134697 [details] [review] gvc-n-volumes-start.patch To make discreet values work, we should modify update_slider_position(), and make the various steps work similarly to the marks.
Mass move to gnome-control-center.
Mass reassign, sorry for the noise.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new bug report at https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/ Thank you for your understanding and your help.