Prevent Microsoft Teams from Switching Audio Profile

This change prevents the automatic switching from A2DP (Advanced Audio Distribution Profile) to HSP (Handset Profile) in Ubuntu. In Microsoft Teams the profile switches to HSP when the call starts but doesn't switch back when ending it resulting in horrible sounding music afterwards.

This does mean your headset will stay on A2DP, so your microphone won't be enable. If you're using a laptop with build in microphone this won't be a problem though.

Edit /etc/pulse/ Then look for this line and add the auto_switch=false part.

load-module module-bluetooth-policy auto_switch=false

Then restart pulse

pulseaudio -k
pulseaudio -D