> 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? You could try writing three asoundrc files, one for each card, then write a hotplug script which makes one of the asoundrc files the default when it detects one of the cards being connected/disconnected. The only problem with this is that I think all the ALSA configuration (reading and parsing the config files) is done by each and every program (presumably via alsa-lib.) This means that after the config file changes, you'll need to close and reopen any program using audio for the change to take effect. Cheers, Adam. ------------------------------------------------------------------------- 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 Alsa-user@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-user