Skip to content

pulse-server: sync manager after module (un)load + wait for node in combine-sink

P V requested to merge pvir/pipewire:pa-module-loadwait into master

See #1636 (closed)

This seems to fix Zoom desktop audio sharing on pipewire-media-session. On wireplumber, Zoom desktop audio sharing doesn't work, but that seems to be some issues/differences in its policy-node reconnect:false handling.

I think the changes in this MR are OK, and make things work more like Pulseaudio.

pulse-server/combine-sink: mark loaded after streams appear

module-combine-sink should become loaded only after its input stream, and all explicitly specified output sink stream nodes appear. Since output sinks may appear on the manager after a delay, wait for them only up to a timeout, and fail load after that.

Fail load if there are errors in input stream, or in an explicitly specified output.

This is needed for Zoom sound sharing to work. Pulseaudio additionally fails the module load if streams fail to connect, but we do not do that here at the moment.

pulse-server: sync client manager before returning from LOAD_MODULE

Sync client's manager, before returning from module load, also for async module loads. This is because the module load may have its own core, so even though it has made changes on server, the client manager might not see them yet.

Fix this by syncing client->manager before operation return.

pulse-server: sync manager before module unload completion

Operations sync manager, so use that.

On Pulseaudio, module unload is async procedure. However, this race condition may be hard to hit in practice, whereas on pipewire-pulse it's not hard. E.g. Zoom appears to assume that modules are unloaded synchronously.

Edited by P V

Merge request reports