Skip to content

monitors/alsa: decouple name deduplication from node objects

P V requested to merge pvir/wireplumber:fix-alsa-dedup into master

Node name deduplication relying on presence of node objects creates race conditions, as the name cannot be marked unused if the node object was not created or was destroyed.

Use separate (device_id, node_id) -> name table to track name ownership separately from the existence of node objects.

Also clear up the reserved names when device is destroyed, by the monitor or device reservation. In these cases "object-removed" for nodes is not called, so this fixes names leaking when e.g. pw-reserve is used.


Example of names previously leaking: pw-reserve -n Audio0 -r results to node names with .2, .3, ...

Merge request reports

Loading