I frequently switch between two sound settings: One directly connecting an analog headphone to the computer, and another is I connect an audio device to the HDMI audio output on the monitor. I want to switch between them quickly by writing a short script to switch between the two settings. How can I do this?
I think you should be looking at something like this:
alsactl save CARD #
to save the configurationalsactl restore CARD #
to restore the configuration