I haven't seen anyone adressing this issue yet. You might want to ask on the linuxaudio user list.

http://lists.linuxaudio.org/listinfo/

On 12/09/2011 10:53 AM, Miguel Negrao wrote:
Hi all,

I’m trying to configure a pc with puredyne and 2 RME HDSPM soundcards[1]. I 
manage to get sound perfectly, and I also managed to merge the two sound cards 
into one using .asoundrc. My problem is that the cards are identical and at 
every boot they get a random order. I was trying to follow [2] to try to give 
them a name based on the hardware location of the pci cards.

I created a file which I placed in /etc/udev/rules.d/85-wfs-script.rules with 
the following:

SUBSYSTEM!="sound", GOTO="wfs_pci_cards"
ACTION!="add", GOTO="wfs_pci_cards"

DEVPATH=="/devices/pci0000:00/0000:00:14.4/0000:02:0e.0/sound/card?", 
ATTR{id}="HDSPM_1"
DEVPATH=="/devices/pci0000:00/0000:00:14.4/0000:02:09.0/sound/card?", 
ATTR{id}="HDSPM_2"

LABEL="wfs_pci_cards"

Then when I reboot or reload the driver I get one of them with the correct name 
and the other one with “default”

/proc/asound/cards
0 [default      ]: HDSPM - HDSPM MADI
                        RME HDSPM MADI at 0xfdce0000, irq 16
1 [HDSPM_1      ]: HDSPM - HDSPM MADI
                        RME HDSPM MADI at 0xfdcd0000, irq 17

Which one gets the “default” name is random and changes every time I boot. I 
tried changing the number 85 to all sorts of numbers, to change the order in 
which the rule is run,  but it doesn’t really make a difference. Running udevd 
--debug and reloading the driver reports :

1323357358.505334 [3088] udev_rules_apply_to_event: ATTR 
'/sys/devices/pci0000:00/0000:00:14.4/0000:02:09.0/sound/card0/id' writing 
'HDSPM_2' /etc/udev/rules.d/90-wfs-pci-cards.rules:5
1323357358.505393 [3088] udev_rules_apply_to_event: error opening 
ATTR{/sys/devices/pci0000:00/0000:00:14.4/0000:02:09.0/sound/card0/id} for 
writing: No such file or directory

Btw, the file is there, and doing "more 
/sys/devices/pci0000:00/0000:00:14.4/0000:02:09.0/sound/card0/id” yields “default” 
or “default_1”.

How can I stop the “default” name overriding the names that I set in the .rules 
file ? Any help appreciated !!!!

best regards,

---
Puredyne@goto10.org
http://identi.ca/group/puredyne
irc://irc.goto10.org/puredyne

Reply via email to