[pulseaudio-tickets] [Bug 93855] Module restore restores volume and mute settings from wrong sink input

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jan 25 09:48:40 PST 2016


https://bugs.freedesktop.org/show_bug.cgi?id=93855

--- Comment #7 from Leonard den Ottolander <leonard-rh-bugzilla at den.ottolander.nl> ---
> Your proposal of using the pid as the identifier would not restore 12022's
> volume for 12023 either, because there would be nothing linking 12023 back
> to 12022.

Yes it does because yes there is! The entry for 12022 still exists at the point
of restoration even if the pid no longer does. This patch DOES work. I am
running with this patch atm and it fixes the issue I describe.

It is very much like the PULSE_PROP="module-stream-restore.id=foo" workaround
you suggest. However, it seems rather ugly to have the user to provide a unique
id to identify the stream instead of having pulse keeping track of this by
itself.

Of course instead of using the pid using the sink input id itself would be even
nicer, but it seems not to be available in the property list, which is why I
fall back to using the pid or a unique string if no pid is available.

> It's working as designed. However, I disagree with the design in one thing:
> when you set the volume for 11664, I think the volume should be updated for
> all streams in the group. That is, 11484 and 12022 should change to 9% volume
> too. It should be pretty easy to make a patch to change this, but somehow I
> haven't got around to doing that...

Not agreeing with you. If I set the volume on a single sink input I want only
that volume to change. pactl set-sink-input-volume should work on a single sink
input volume. The behaviour you describe could be implemented as volinset pactl
set-sink-input-group-volume.

The point is that on restoration NOTHING should change. No group setting should
be applied. Only the current values should be restored.

I think the main confusion here is that the apply filter and stream restore
modules use the same function pa_proplist_get_stream_group() to identify the
streams. Using this function in module-filter-apply.c is fine but for stream
restoration the entry should be uniquely identified. The attached patch defines
the pa_proplist_get_stream_id() for this purpose and leaves
pa_proplist_get_stream_group() intact for use by the apply filter module.

 > If all current streams in a group would update their volumes when you set
 > the volume of one stream, this source of confusion would disappear.

The source of confusion would disappear if a restored stream just takes it's
orginal values. This can be accomplished by identifying the entry with a unique
name, unrelated to the group name that you can still use for the application of
filters.

By the way, are you sure module-filter-apply.c even relies on the
module-stream-restore.id? I think that particular identification string is only
used by module-stream-restore.c so if I am not mistaken there is no reason not
to make this identifier unique.

To summarize: filter apply work on groups which I believe not to be impacted by
identifying a stream with a unique id as proposed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20160125/478d53b1/attachment.html>


More information about the pulseaudio-bugs mailing list