how? switch between pure pulseaudio and pipewire, and back again as required
I am trying to adapt a whole bunch of scripts to pipewire. However it hasn't been as simple as I had hoped, so I want to be able to use some scripted enabling and disabling of the correct respective services to selectively switch between running a 'pure' pulseaudio or pipewire environment, until I can get everything i need to solve in pipewire solved and migrate to it completely. I'm thinking I can probably do this without rebooting.
Currently I have disabled pipewire, and enabled pulseaudio, it's been a few months so I think what i did was:
systemctl --user stop wireplumber pipewire pipewire-pulse
systemctl --user --now disable wireplumber pipewire pipewire-pulse pipewire-media-session.service
systemctl --user unmask pulseaudio
systemctl --user --now enable pulseaudio.service pulseaudio.socket
sudo apt remove pipewire-audio-client-libraries pipewire
I assume I probably dont need to apt remove anything, i was just getting tired of pipewire refusing to let go when i originally did this. However advice on the full list of apt install components for complete pipewire install would be appreciated.
Lets call that pure-pulseaudio.sh
Therefore pure-pipewire.sh
needs to disable pulse and enable pipewire.
systemctl --user stop pulseaudio.service pulseaudio.socket
systemctl --user --now disable pulseaudio.service pulseaudio.socket
systemctl --user mask pulseaudio
systemctl --user unmask pipewire
systemctl --user --now start wireplumber pipewire pipewire-pulse pipewire-media-session.service
systemctl --user --now enable wireplumber pipewire pipewire-pulse pipewire-media-session.service
Can someone who knows what they are doing help me out with both of these scripts before I spend the next few days wanting to utterly destroy both audio systems?