the current udev.rules file has the line KERNEL="midi[CD0-9]*", NAME="snd/%k" to capture alsa midi devices. This also captures oss midi devices other then than /dev/midi incorrectly. For example, /dev/midi2 doesn't show up properly, it's showing up in /dev/snd/midi2, it's being grabbed by the regex which it shouldn't be. Changing this to KERNEL="midiC[D0-9]*", NAME="snd/%k" solves the problem. In my patch (which will be posted as soon as I submit this,) as well as fixing this, it also puts all oss devices into /dev/sound and links them back to /dev. The current udev.rules only does this partially. The way I did it is a little more complex then it has to be, it seems udev regex doesn't work properly. AFAIK, something like dsp[0-9]* should grab "dsp" as well as "dsp1" "dsp2" etc, but it's only grabbing things it matches. It's acting like * means "one or more" when it should be "zero or more." I see something similar to what I did in the udev rules in the "vc devices" section so apparently I'm not the first to realize this.
Created attachment 26814 [details, diff] patch to udev.rules patch to the default udev.rules (${FILESDIR}/udev.rules-18)
Created attachment 26815 [details, diff] further simplified this just swaps a few names with %k to shorten things up.
Re: the initial comment. Jordan, I belive you are confusing regex pattern matching and glob patterns. if you do a: $ ls /dev/dsp[0-9]* you will never see "/dev/dsp" listed, nor should you.
I see now, thanks. The patch still takes care of it so it's no big deal anyway, just would have been a lot nicer if I could have done it with fewer lines.
This isn't needed anymore, correct?
as far as I know despite udev 022 being released, this problem is still there, as it's not a udev problem, it's because the rules written in udev.rules are grabbing more then they should (midi2 for example) and not enough in other cases (only grabbing and putting some, not all, dsp devices into /dev/sound.)
Ok, I'll look into fixing this for the next udev release.
fixed in 024 release.