m-device-activation: reevaluate current profile if params changed
Currently, WirePlumber does not listen for device profile changes. WirePlumber just selects the best available profile when a device is added, and then never changes the device profile again (the user would have to do it manually after that).
This is a problem when we want to switch automatically to a better profile if one becomes available (eg when a profile's availability changes from no
to yes
), for example, when plugging a headphone that needs the device to be on a specific profile so that the routes can be applied.
This MR improves WirePlumber to listen for profile changes, and automatically select the best profile when a profile changes using the same logic as pipewire media session (see relevant commit here: media-session@585f533d).
Fixes #98 (closed) and #118 (closed)