[LAU] Bridging alsa and jack midi

Ralf Mardorf ralf.mardorf at rocketmail.com
Tue Sep 30 19:35:30 UTC 2014


On Mon, 2014-09-29 at 00:40 -0400, Tim E. Real wrote:
> http://www.alsa-project.org/main/index.php/Changing_card_IDs_with_udev

Hi :)

I don't understand how to create the udev rule.

The target is, that
hw:0 is the RME card, named by it's original name
hw:1 is Envy card 1 , named by it's original name
hw:2 is Envy card 2 , named by a customized name
any USB device should become
hw:>=3 and get it's original name, even if snd_ice1712 isn't loaded.
Excepted of the customized name, this is provided
by /etc/modprobe.d/alsa-base.conf.

The below udev rule doesn't work [1].

Regards,
Ralf

[1]
[rocketmouse at archlinux ~]$ cat /etc/modprobe.d/alsa-base.conf 
# ALSA module ordering
options snd slots=snd_hdspm,snd_ice1712,snd_ice1712

[rocketmouse at archlinux ~]$ cat /lib/udev/rules.d/85-TerraTec_EWX24_96_2.rules
SUBSYSTEM!="sound", GOTO="TerraTec_EWX24_96_2_end"
ACTION!="add", GOTO="TerraTec_EWX24_96_2_end"

DEVPATH=="/devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card?", ATTR{id}="TerraTec EWX24/96_2"

LABEL="TerraTec_EWX24_96_2_end"
[rocketmouse at archlinux ~]$ cat /proc/asound/cards
 0 [HDSPMx579bcc   ]: HDSPM - RME AIO_579bcc
                      RME AIO S/N 0x579bcc at 0xfddf0000, irq 18
 1 [EWX2496        ]: ICE1712 - TerraTec EWX24/96
                      TerraTec EWX24/96 at 0xbf00, irq 20
 2 [EWX2496_1      ]: ICE1712 - TerraTec EWX24/96
                      TerraTec EWX24/96 at 0xbb00, irq 21
[rocketmouse at archlinux ~]$ amidi -l
Dir Device    Name
IO  hw:0,0    HDSPMx579bcc MIDI 1
IO  hw:1,0    TerraTec EWX24/96 MIDI
IO  hw:2,0    TerraTec EWX24/96 MIDI

[rocketmouse at archlinux ~]$ udevadm monitor --kernel --subsystem-match=sound
monitor will print the received events for:
KERNEL - the kernel uevent
        [rocketmouse at archlinux ~]$ sudo modprobe -r snd_ice1712 
        [rocketmouse at archlinux ~]$ sudo modprobe snd_ice1712
KERNEL[434.220676] remove   /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2/midi2 (sound)
KERNEL[434.220746] remove   /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2/dmmidi2 (sound)
KERNEL[434.222669] remove   /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2/midiC2D0 (sound)
KERNEL[434.222742] remove   /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2/pcmC2D0p (sound)
KERNEL[434.222772] remove   /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2/pcmC2D0c (sound)
KERNEL[434.222800] remove   /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2/controlC2 (sound)
KERNEL[434.222823] remove   /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2 (sound)
KERNEL[434.222851] remove   /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1/midi1 (sound)
KERNEL[434.222880] remove   /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1/dmmidi1 (sound)
KERNEL[434.222907] remove   /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1/midiC1D0 (sound)
KERNEL[434.222934] remove   /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1/pcmC1D0p (sound)
KERNEL[434.222961] remove   /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1/pcmC1D0c (sound)
KERNEL[434.222988] remove   /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1/controlC1 (sound)
KERNEL[434.223010] remove   /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1 (sound)
KERNEL[441.948404] add      /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1 (sound)
KERNEL[441.948627] add      /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1/controlC1 (sound)
KERNEL[441.948667] add      /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1/pcmC1D0p (sound)
KERNEL[441.948804] add      /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1/pcmC1D0c (sound)
KERNEL[441.948839] add      /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1/midiC1D0 (sound)
KERNEL[441.948973] add      /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1/midi1 (sound)
KERNEL[441.949009] add      /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1/dmmidi1 (sound)
KERNEL[441.956442] change   /devices/pci0000:00/0000:00:14.4/0000:04:05.0/sound/card1 (sound)
KERNEL[442.002086] add      /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2 (sound)
KERNEL[442.002242] add      /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2/controlC2 (sound)
KERNEL[442.002264] add      /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2/pcmC2D0p (sound)
KERNEL[442.002280] add      /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2/pcmC2D0c (sound)
KERNEL[442.002297] add      /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2/midiC2D0 (sound)
KERNEL[442.002379] add      /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2/midi2 (sound)
KERNEL[442.002399] add      /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2/dmmidi2 (sound)
KERNEL[442.016664] change   /devices/pci0000:00/0000:00:14.4/0000:04:06.0/sound/card2 (sound)



More information about the Linux-audio-user mailing list