switch-on-port-available: only switch profile if not selected by user
When switching to/from a newly available port, pulseaudio automatically switches to the preferred profile if not active. However, if the current profile has been selected by the user, this doesn't make sense, as the user probably wants to keep using the same profile with a different port combination.
For example, this happens when switching to a "Voice Call" profile, then plugging a headset. The profile is then switched to the default "HiFi" profile, even though the phone call is still ongoing and the user still needs the "Voice Call" profile to be active.
This patch keeps track of user-initiated profile changes, and adds a new condition so that profile is automatically switched only when it wasn't previously selected by the user.
Signed-off-by: Arnaud Ferraris email@example.com