Managing Audio Devices Ubunutu 22.04

I am managing my audio devices and it seems like the behavior can be automatic. I have a lenovo laptop with a lenovo dock.

When on the dock It switches to “headset microphone - thinkpad thunderbolt 3 dock usb audio” – I never use this input and wish it would disappear forever. I want to use the internal mic on the laptop no matter if it is docked or mobile or using headphones.

For the output when docked I want it to use “Analog output - thinkpad 3 dock usb audio”

When undocked I want it to use the internal speakers

When I plug in headphones I want to it to output to those instead.

I may have a rare situation where I need to hook up to present somewhere and run audio out through hdmi, but I never want it to switch to that by default.

Thanks in advance.

If your DE doesn’t have any custom sound settings, then install pulse-mixer and if needed, pipewire-pulse (if you’re running pipewire). Then just type “pulsemixer” in your terminal and you get some easy ways to swap things. I don’t know how to set them to persist if your device names changes though, e.g. on my end HDMI 2 and HDMI 1 change order (despite the name, one of them is DP out, but they’re never in a consistent order, so I just switch between 1 or the other, when I connect my DP monitor).