On 09/06/2007 09:58 AM, Giacomo Quinti wrote:
> as you can see my problem is similar but different from the post
> "Dynamically designating default device".
>
> I have 2 soundcards in my linux box (internal + usb audio UA-1EX) + 1
> midi USB device, i need to use all these cards.
>
> The problem is simple, i need to configure some application directly on
> my UA-1EX alsa device (jack audio server for example) and some other
> application generically to the default Alsa device (some player for
> example, and I wont the interna audio as my default device)...but... the
> number device assigned to the cards are not every time the same :-(, i
> can't understand the reason but I found everytime the usb audio as the
> number 1 device but the internal audio device and the USB midi device
> are swapping the id number, so, it's impossible for me tu set the
> interna device as a default alsa device...
>
> So, the question is: can I set a specific device number for each device
> ? And how ?
If you load the modules with a "index=N" parameter, this will fix the card
at number N. Nornally, you do this by sticking
options snd-foo index=0
options snd-bar index=1
lines in /etc/modprobe.conf (or /etc/modprobe.d/whatever). Moreover though,
you can also address the cards by their name instead of their number. Look
in /proc/asound after loading the modules for what the cards call themselves
(the value of the symbolic links to the cardN directories) then you can use
things like:
aplay -D default:NAME foo.wav
instead of
aplay -D default:0 foo.wav
Or, you can force the names:
options snd-foo index=0 id=INTERNAL
options snd-bar index=1 id=UA-1EX
options snd-baz index=2 id=MIDI
"aplay -D default:UA-1EX" and similar...
Rene.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user