I have a laptop with an integrated snd-card (which doesn't this days), but I
also
have two external USB-sound-cards..
They are almost never connected at the same time, yet if one is connected it's a
better choice then the internal sound card. I would like to automatically assign
output to the usb card if available for some apps (not for all). In mplayer it's
simple.
In it's config file:
ao=alsa:device=hw=default,alsa:device=hw=Xmod,alsa:device=default
The first default is not an error - the manufacturer of one of my cards has
called it "default"...
But in audacious it's not so simple, I can't simply list the cards in a
list..besides I need to assign the mixer as well.
Is it possible to make an pcm/ctl device in asoundrc file that would redirect
the
output to the correct card/mixer depending on they existence? The algorithm
should
look more or less like:
If "default" exist:
pcm.redir -> plughw:default
clt.redir -> default.Speaker
Elsif Xmod exists:
pcm.redir -> plughw:Xmod
ctl.redir -> Xmod.PCM
Else
pcm.redir -> default (underneath dmixed&dsnooped internal sound card)
ctl.redir -> card 0
fi
Any idea how to write that in the asound file?
My best regards to All!
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user