[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] sink, source: Don't change suspend cause when unlinking
Arun Raghavan
gitlab at gitlab.freedesktop.org
Mon Jun 10 13:50:15 UTC 2019
Arun Raghavan pushed to branch master at PulseAudio / pulseaudio
Commits:
7fb85e0a by Tanu Kaskinen at 2019-06-10T11:21:59Z
sink, source: Don't change suspend cause when unlinking
See the added comments for why this is necessary.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/667
- - - - -
2 changed files:
- src/pulsecore/sink.c
- src/pulsecore/source.c
Changes:
=====================================
src/pulsecore/sink.c
=====================================
@@ -767,7 +767,11 @@ void pa_sink_unlink(pa_sink* s) {
}
if (linked)
- sink_set_state(s, PA_SINK_UNLINKED, 0);
+ /* It's important to keep the suspend cause unchanged when unlinking,
+ * because if we remove the SESSION suspend cause here, the alsa sink
+ * will sync its volume with the hardware while another user is
+ * active, messing up the volume for that other user. */
+ sink_set_state(s, PA_SINK_UNLINKED, s->suspend_cause);
else
s->state = PA_SINK_UNLINKED;
=====================================
src/pulsecore/source.c
=====================================
@@ -708,7 +708,11 @@ void pa_source_unlink(pa_source *s) {
}
if (linked)
- source_set_state(s, PA_SOURCE_UNLINKED, 0);
+ /* It's important to keep the suspend cause unchanged when unlinking,
+ * because if we remove the SESSION suspend cause here, the alsa
+ * source will sync its volume with the hardware while another user is
+ * active, messing up the volume for that other user. */
+ source_set_state(s, PA_SOURCE_UNLINKED, s->suspend_cause);
else
s->state = PA_SOURCE_UNLINKED;
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/7fb85e0a5bfdec339fda9f7584f65cf9ddbd50a1
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/7fb85e0a5bfdec339fda9f7584f65cf9ddbd50a1
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20190610/240e4191/attachment.html>
More information about the pulseaudio-commits
mailing list