PDA

View Full Version : [ubuntu] Use headphones when available, otherwise speakers?



noerrorsfound
May 22nd, 2008, 12:34 AM
When I want to start using my USB headset for audio playback, I have to go to the sound options and select it. Then, when I'm done, I have to go back to the sound options and change it back. How can I just use the USB headset when it's available (plugged in) and use the speakers when it's not?

Xiong Chiamiov
May 23rd, 2008, 05:02 AM
With your headset plugged in, running


asoundconf list

should give you something like this:


Names of available sound cards:
Headset
CA0106

You can then set the default card to be the headset by


asoundconf set-default-card Headset

However, this seems to not quite be perfect for me. For whatever reason, amarok is the only app that actually plays through my speakers when the headset's not plugged in; nothing else seems to want to fall back to my sound card. At the moment, I'm just happy I can use them at all, but let me know if you find a better solution.

noerrorsfound
June 24th, 2008, 03:28 PM
With your headset plugged in, running


asoundconf list

should give you something like this:


Names of available sound cards:
Headset
CA0106

It lists the following:

Names of available sound cards:
CK804
default

Xiong Chiamiov
June 26th, 2008, 06:22 AM
My memory's a bit faint, but I seem to remember that there's some file somewhere where you can change the name of soundcards, and I also seem to remember that some guide somewhere told me to change the card I wanted as default to be named "default", so I'm guessing that's what happened to you. Have you tried


asoundconf set-default-card default

?

noerrorsfound
July 16th, 2008, 11:46 AM
Unfortunately that doesn't work for me.

noerrorsfound
December 22nd, 2008, 01:32 AM
When I actually get Ubuntu to output sound to my headset again (apparently the switch to PulseAudio screwed things up) it would be nice to have this basic functionality.