Index: src/modules/module-tunnel-source-new.c =================================================================== --- src/modules/module-tunnel-source-new.c (revision 30653) +++ src/modules/module-tunnel-source-new.c (revision 30654) @@ -521,6 +521,12 @@ pa_operation_unref(operation); } +static void source_write_volume_cb(pa_source *s) { + /* A bit silly but this is to make sure we only access the server + * connection on the IO thread. */ + source_set_volume_cb(s); +} + static int source_get_mute_cb(pa_source *s, bool *mute) { struct userdata *u; @@ -701,6 +707,7 @@ u->source->update_requested_latency = source_update_requested_latency_cb; pa_source_set_get_volume_callback(u->source, source_get_volume_cb); pa_source_set_set_volume_callback(u->source, source_set_volume_cb); + pa_source_set_write_volume_callback(u->source, source_write_volume_cb); pa_source_set_get_mute_callback(u->source, source_get_mute_cb); pa_source_set_set_mute_callback(u->source, source_set_mute_cb); pa_source_enable_decibel_volume(u->source, true); Index: src/modules/module-tunnel-sink-new.c =================================================================== --- src/modules/module-tunnel-sink-new.c (revision 30653) +++ src/modules/module-tunnel-sink-new.c (revision 30654) @@ -569,6 +569,12 @@ pa_operation_unref(operation); } +static void sink_write_volume_cb(pa_sink *s) { + /* A bit silly but this is to make sure we only access the server + * connection on the IO thread. */ + sink_set_volume_cb(s); +} + static int sink_get_mute_cb(pa_sink *s, bool *mute) { struct userdata *u; @@ -745,6 +751,7 @@ u->sink->update_requested_latency = sink_update_requested_latency_cb; pa_sink_set_get_volume_callback(u->sink, sink_get_volume_cb); pa_sink_set_set_volume_callback(u->sink, sink_set_volume_cb); + pa_sink_set_write_volume_callback(u->sink, sink_write_volume_cb); pa_sink_set_get_mute_callback(u->sink, sink_get_mute_cb); pa_sink_set_set_mute_callback(u->sink, sink_set_mute_cb); pa_sink_enable_decibel_volume(u->sink, true);