Hi,
Recently I switch to devfs (kernels 2.4.20 and 2.4.21). On Alsa loading, I get this message : kernel: devfs: devfs_register(unknown): could not append to parent, err: -17 And all applications with oss were working with only one of my two sound cards (ie gnome-volume-control). So I found this mail from T.Iwai on lkml : http://www.cs.helsinki.fi/linux/linux-kernel/2001-49/0266.html So I've adapted this patch (modified patch joined with this mail) and all works well. Can somebody give me more informations about this ? Arnaud Patard
diff -ur linux-2.4.21/drivers/sound/sound_core.c /usr/src/linux/drivers/sound/sound_core.c --- linux-2.4.21/drivers/sound/sound_core.c 2001-09-30 21:26:08.000000000 +0200 +++ /usr/src/linux/drivers/sound/sound_core.c 2003-06-23 14:33:13.000000000 +0200 @@ -231,23 +231,29 @@ int register_sound_special(struct file_operations *fops, int unit) { - char *name; + char *name, name_ext[32]; + int suffix = 0; + - switch (unit) { + switch (unit & 15) { case 0: name = "mixer"; + suffix=1; break; case 1: name = "sequencer"; break; case 2: - name = "midi00"; + sprintf(name_ext, "midi0%d", unit / SOUND_STEP); + name = name_ext; break; case 3: name = "dsp"; + suffix = 1; break; case 4: name = "audio"; + suffix = 1; break; case 5: name = "unknown5"; @@ -263,26 +269,35 @@ break; case 9: name = "dmmidi"; + suffix = 1; break; case 10: name = "dmfm"; + suffix = 1; break; case 11: name = "unknown11"; break; case 12: name = "adsp"; + suffix = 1; break; case 13: name = "amidi"; + suffix = 1; break; case 14: name = "admmidi"; + suffix = 1; break; default: name = "unknown"; break; } + if (suffix && unit >= SOUND_STEP) { + sprintf(name_ext, "%s%d", name, unit / SOUND_STEP); + name = name_ext; + } return sound_insert_unit(&chains[unit&15], fops, -1, unit, unit+1, name, S_IRUSR | S_IWUSR); }