Script or Terminal command to switch audio output?

Asked by jjsonp

I can switch the audio output by going to System -> Preferences -> Sound and changing the "Sound playback" device from 'Autodetect' to 'USB Audio'.

I want to be able to do this via terminal (and script).

asoundconf (whether run from the GTK GUI or terminal) doesn't seem to do anything. I suspect it changes the *default* sound output, but not the *active* one?

For instance if I switch from 'Headset' to 'ICH7' via asoundconf-gtk (the only two choices I have, except for 'PulseAudio') but then go to System->Preferences->Sound, the 'Sound Playback' still reads 'USB Audio', and if I press 'Test' the sound comes out over my headset, not my speakers.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
jjsonp
Solved:
Last query:
Last reply:
Revision history for this message
jjsonp (jjsonp) said :
#1

Actually using asoundconf *does* work...however the change is not reflected in System -> Preferences -> Sound; this appears to be a bug.