LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Switching between soundcards (https://www.linuxquestions.org/questions/linux-hardware-18/switching-between-soundcards-720527/)

nonis 04-20-2009 06:16 PM

Switching between soundcards
 
I have been using a simple PCI soundcard on linux and it works fine, but recently I bought a Lexicon Lambda audio interface, which I've read works with the snd_usb_audio module.

How can I switch alsa between the two cards? I'd like to write a script to switch while X is running if possible.

I'm using Slackware 12.1.

aus9 04-21-2009 04:41 AM

hi

if you have kde4....there is no need for a script you can change live at any time using
system settings/multimedia/click on output device...click on up arrow prefer button to move it to top and click on apply
but click on test to see if phonon actually can use it as well

Shadow_7 04-21-2009 12:08 PM

You can switch at will. Sound is independent of X. How you switch is a question of the applications in question. mplayer, xmms, audacity, and others let you choose the device. Mozilla, firefox, festival, .... don't.

Where they don't, you can either re-index your soundcard so the preferred one is device 0. Basically a bit complex on that one. For apps that use alsa natively, you can just put a defaults.pcm.card 0 to tell it which device to use in your .asoundrc. OSS based apps default to 0 no matter what you tell them. Sometimes usable if you start the app with aoss. Sometimes not. So it really depends on how you want to do the switching. If you're using jackd and pulse audio and other things, you can simplify it a bit. But it generally involves restarting the sound daemon, and or modifying a configuration file. And worst case scenario, all of the above in addition to restarting alsa and running alsamixer to restore levels. Some distros prepackage the scripting for these mods. Some don't.


All times are GMT -5. The time now is 09:08 PM.