ALSA: how to temporarily change the output device
If the USB device is listed as a sound card in the system, you may want to check man amixer
and use the unmute
parameter.
amixer -c 1 set Master playback 100% unmute
Check also the other channels (PCM etc.). The examples from the manual are:
amixer -c 1 sset Line,0 80%,40% unmute cap
will set the second soundcard's left line input volume to 80% and right line
input to 40%, unmute it, and select it as a source for capture (recording).
amixer -c 1 -- sset Master playback -20dB
will set the master volume of the second card to -20dB. If the master has
multiple channels, all channels are set to the same value.
amixer -c 1 set PCM 2dB+
will increase the PCM volume of the second card with 2dB. When both play‐
back and capture volumes exist, this is applied to both volumes.
amixer -c 2 cset iface=MIXER,name='Line Playback Volume",index=1 40%
will set the third soundcard's second line playback volume(s) to 40%
amixer -c 2 cset numid=34 40%
will set the 34th soundcard element to 40%