So this is the call trace I'm getting with my device:
1) module specific (droid in my case) -> pa_sink_new
2) pa_sink_new fires up PA_CORE_HOOK_SINK_FIXATE before finishing setting up 
the sink, giving the original data (pa_sink_new_data) to the callback;
3) module-device-restore gets PA_CORE_HOOK_SINK_FIXATE and calls 
sink_fixate_hook_callback, updating the real volume for pa_sink_new_data, and 
setting up save_volume;
4) pa_sink_new then correctly sets reference_volume and real_volume, getting it 
from pa_sink_new_data (which was used by module-device-restore)
5) pa_sink_new initializes soft_volume with the max value, causing this broken 
behavior

Code:
src/pulsecore/sink.c:
 169 /* Called from main context */
 170 pa_sink* pa_sink_new(
 171         pa_core *core,
 172         pa_sink_new_data *data,
 173         pa_sink_flags_t flags) {
 174 
...
 285     s->reference_volume = s->real_volume = data->volume;
 286     pa_cvolume_reset(&s->soft_volume, s->sample_spec.channels);
...

At the time you call pactl set-sink-volume (or set the volume via the
indicator), it'll call sink_port_hook_callback that will call
pa_sink_set_volume, which will then set the real_volume and soft_volume
to the same value (as my driver is not providing the set_volume
callback.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/598308

Title:
  Volume at login set to Maximum

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/598308/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to