Index: src/modules/module-tunnel-source-new.c =================================================================== --- src/modules/module-tunnel-source-new.c (revision 30798) +++ src/modules/module-tunnel-source-new.c (revision 30799) @@ -513,6 +513,10 @@ if (!u->connected) return; + /* See sink_set_volume_cb() in the sink tunnel module */ + if (!u->has_volume) + return; + operation = pa_context_set_source_output_volume(u->context, pa_stream_get_index(u->stream), &s->real_volume, @@ -553,6 +557,10 @@ if (!u->connected) return; + /* See source_set_volume_cb() */ + if (!u->has_volume) + return; + operation = pa_context_set_source_output_mute(u->context, pa_stream_get_index(u->stream), s->muted, Index: src/modules/module-tunnel-sink-new.c =================================================================== --- src/modules/module-tunnel-sink-new.c (revision 30798) +++ src/modules/module-tunnel-sink-new.c (revision 30799) @@ -561,6 +561,17 @@ if (!u->connected) return; + /* We have a race here since we create the sink before we are + * connected and fully updated with the server side volume. E.g. + * streams might be moved to this sink, and have their volumes + * calculated incorrectly because s->real_volume isn't properly + * set yet. We then propagate this error back in to the sink and + * over to the other end of the tunnel. Avoid this by simply + * ignoring volume changes until we have gotten the proper volume + * from the server. */ + if (!u->has_volume) + return; + operation = pa_context_set_sink_input_volume(u->context, pa_stream_get_index(u->stream), &s->real_volume, @@ -601,6 +612,10 @@ if (!u->connected) return; + /* See sink_set_volume_cb() */ + if (!u->has_volume) + return; + operation = pa_context_set_sink_input_mute(u->context, pa_stream_get_index(u->stream), s->muted,