On Tue, 2009-04-28 at 21:22 -0400, drew Roberts
wrote:
The
naming system exists for a reason, i.e. to allow you to easily
identify devices without remembering any cryptic numbers. It also
allows you to change the name during runtime via sysfs in case you
want to fix them up.
> 1. I *want* stable indices, and
Why?
Well, I don't care how I would do it so long as I can finally find a way
to do it.
I want to load up 1 box with 4 sound cards (preferably el cheapo USB
cards) and hoot the outputs of 4 radios to the inputs of the cards. (I
prefer identical cards if possible.) I want to tune each radio to a
different station and record each 24x7. now I want the stations to record
consistently.
So far I have not run across a solution that didn't assume different
cards. Any ideas anyone/
all the best,
As far as I am aware, the only way to do anything like this is with
udev. I don't have any spare sound cards in the office so I've done some
experimenting with 2 identical mice. Running the following command
udevadm info -a -p $(udevadm info -q path -n /dev/input/mouse0)
for each mouse (soundcard in your case) replacing mouse0 with mouse1,
mouse2 etc and comparing the results shows that the only way to uniquely
identify them is by the usb port number eg :-
ATTRS{phys}="usb-0000:00:1d.0-1/input0"
and
ATTRS{phys}="usb-0000:00:1d.0-2/input0"
Providing that your radio/soundcard/usb port triplets remain the same,
either by never unplugging them, or by labelling them so that the same
radio connects to the same soundcard connects to the same usb port every
time, you could use the above ATTRS to write udev rules
in /etc/udev/rules.d/ which will allow you to name your devices whatever
you wish eg :-
/dev/radios/luxembourg /dev/radios/texasbigbeat etc.
Caveat: I have never written a udev rule in my life so you may need to
do some research and testing of that yourself.
Hope this is of at least some slight help and/or interest.
Thanks, I have got to try this out... And remember to report back...
drew
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev(a)lists.linuxaudio.org