On So, 2009-01-04 at 12:15 +0000, Dominique Michel wrote: > Le Sun, 04 Jan 2009 12:02:44 +0100, > Tobias Gödderz <goedd...@uni-bonn.de> a écrit :
> > I have a laptop and use an Aureon 5.1 USB card from Terratec at home, > > and my internal sound card if I'm on the road. I am, of course, too lazy > > to switch the default soundcard manually, so I wonder if there is a way > > to either > > > > i) make the USB soundcard the default, and automatically use the other > > if the USB card isn't available > > or > > ii) use a multi device to dupe the audio stream to both cards that > > doesn't fail if one card isn't available, but silently ignores that > > and just plays on the other one. > > > > Of course I could write a script that changes my ~/.asoundrc if the USB > > card is available or not, if there is no sane way to do it with alsa. > > > > It must be also possible to use udev. I am no an expert, but I know that, if > udev load your usb sound card before alsasound, no matter what is > in /etc/modprobe.conf, the usb sound card will be the first one, that imply > the > default card. > > Most users do not want that and blacklist usb_snd_audio > in /etc/modprobe,d/blacklist. Hm. I tried using the index=n option, and it works in the way that the order is preserved, but if card 0 isn't plugged in, even at boot time, alsa still tries to use it, which results in: ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:3513:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:3513:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:3513:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:3985:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM default -- open STDOUT, "|-" and print "uJa tsonrehtP lreahrekc" or print pack "nN"x4, unpack "vV"x4, <STDIN> ------------------------------------------------------------------------------ _______________________________________________ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user