FS#13278 - alsa midi devices appear in /dev/sound instead of /dev/snd, broken udev rule

Attached to Project: Arch Linux
Opened by Philipp (hollunder) - Saturday, 14 February 2009, 21:42 GMT
Last edited by Tobias Powalowski (tpowa) - Thursday, 12 March 2009, 17:50 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture All
Severity Medium
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
alsa midi devices appear in /dev/sound instead of /dev/snd
This causes several applications to malfunction and certain parts of midi hardware to not work at all.
Cause is likely a udev rule that matches alsa midi devices as well as oss midi devices and places the files in the wrong directory.

The udev maintainer was not responding.


Additional info:
The problem is likely in
/etc/udev/rules.d/less 81-arch.rules
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Thursday, 12 March 2009, 17:50 GMT
Reason for closing:  Fixed
Comment by Philipp (hollunder) - Monday, 16 February 2009, 14:37 GMT
The problem seems to be that
KERNEL=="midi*", NAME="sound/%k", SYMLINK+="%k"
matches alsa devices like midiC2D0

There might be other bugs as well.
I took udev rules from someplace else and merged/modified them.
As far as I cann tell it works but I don't know udev well.
Please check the following section for possible problems and update the arch udev rules.


# sound devices
# alsa devices
SUBSYSTEM=="sound", GROUP="audio"
# oss devices
KERNEL=="audio*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="dmmidi*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="admmidi*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="dsp*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="adsp*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="amidi*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="mixer*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="sequencer*", NAME="sound/%k", SYMLINK+="%k"

#added/modified for oss
KERNEL=="aload*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="amixer*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="music", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="dmfm*", NAME="sound/%k", SYMLINK+="%k"
KERNEL=="midi[0-9]", NAME="sound/%k", SYMLINK+="%k"

#added for alsa
KERNEL=="controlC[0-9]*", NAME="snd/%k", SYMLINK+="%k"
KERNEL=="hw[CD0-9]*", NAME="snd/%k", SYMLINK+="%k"
KERNEL=="pcm[CD0-9cp]*", NAME="snd/%k", SYMLINK+="%k"
KERNEL=="midiC[0-9D]*", NAME="snd/%k", SYMLINK+="%k"
KERNEL=="timer", NAME="snd/%k", SYMLINK+="%k"
KERNEL=="seq", NAME="snd/%k", SYMLINK+="%k"
Comment by Ray Rashif (schivmeister) - Friday, 06 March 2009, 22:25 GMT
Could you provide an example of an application that fails? Or any other site that talks about this issue or anything related?

One reason why this could be hard to troubleshoot on the packager's part would be the lack of a MIDI hardware device.
Comment by Philipp (hollunder) - Saturday, 07 March 2009, 12:00 GMT
One application I remember to fail is jackd running with -Xraw. With arch's set of udev rules midi hardware doesn't show up with this setting. With -Xseq it does, so alsa sequencer seems to find it anyway somehow.
This means that any app that doesn't use alsa sequencer and expects hardware in /dev/snd is affected, but I don't know any other off the top of my head and don't have time to investigate at the moment.

What might or might not be related is that midi thru ports don't show up either (not even with my set of rules).

Therefor I recommend to have a peek at what some major distriutions do in that respect.
Thanks in advance for tackling this bug.

Comment by Tobias Powalowski (tpowa) - Saturday, 07 March 2009, 14:09 GMT
fixed in next udev version

Loading...