Previously selected profile not remembered (for Bluetooth devices at least)
Wireplumber current master branch 071ad0e4 does not appear to remember the profile for previously selected Bluetooth devices.
In the logs on device connect, I see:
wp-object ../lib/wp/object.c:537:wp_object_update_features: <WpDevice:54:0x625000dfd160> features changed 0x11 -> 0x2b1
wp-core ../lib/wp/core.c:197:core_done: <WpCore:0x625000001010> done, seq 0x400000b9, task <GTask:0x6210001a20e0>
wp-registry ../lib/wp/object-manager.c:1065:expose_tmp_globals: <WpCore:0x625000001010> exposing 2 new globals
m-device-activatio ../modules/module-device-activation.c:200:handle_active_profile: <WpDeviceActivation:0x61d00000e360> active profile changed to: 12
m-device-activatio ../modules/module-device-activation.c:230:handle_best_profile: <WpDeviceActivation:0x61d00000e360> found new best profile: 9
m-device-activatio ../modules/module-device-activation.c:52:set_device_profile: <WpDeviceActivation:0x61d00000e360> profile 9 set on device <WpDevice:0x625000dfd160>
spa.bluez5.device ../spa/plugins/bluez5/bluez5-device.c:1877:impl_set_param: setting profile 2 codec:6
so it seems to set the profile to the one with the highest priority.
Because BT profiles have different characteristics (e.g. latency and presence of input route), it would seem better to remember the previous profile.
Currently, setting profile immediately after device connect also runs into a BlueZ issue, where codec switch immediately after connection causes A2DP profile to go missing, so A2DP will not be usable if the user has selected a different codec previously (BlueZ remembers the previous one). There's a workaround pipewire!1100 (merged) but also in principle remembering the previous profile would be better, or at least BT devices should be exempted from profile setting on startup.
The BlueZ issue seems to be bad enough to be a release blocker...