Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 10 Dec 2001 05:47:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 10 Dec 2001 05:47:04 -0500 Received: from ns.suse.de ([213.95.15.193]:17927 "HELO Cantor.suse.de") by vger.kernel.org with SMTP id ; Mon, 10 Dec 2001 05:46:49 -0500 Date: Mon, 10 Dec 2001 11:46:48 +0100 Message-ID: From: Takashi Iwai To: Richard Gooch Cc: Rene Rebe , linux-kernel@vger.kernel.org, alsa-devel@lists.sourceforge.net Subject: Re: [Alsa-devel] Re: devfs unable to handle permission: 2.4.17-pre[4,5] / ALSA-0.9.0beta[9,10] In-Reply-To: <200112070609.fB769Eo08508@vindaloo.ras.ucalgary.ca> In-Reply-To: <20011207003528.1448673e.rene.rebe@gmx.net> <200112070609.fB769Eo08508@vindaloo.ras.ucalgary.ca> User-Agent: Wanderlust/2.6.0 (Twist And Shout) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.2 MULE XEmacs/21.4 (patch 4) (Artificial Intelligence) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: multipart/mixed; boundary="Multipart_Mon_Dec_10_11:46:48_2001-1" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org --Multipart_Mon_Dec_10_11:46:48_2001-1 Content-Type: text/plain; charset=US-ASCII At Thu, 6 Dec 2001 23:09:14 -0700, Richard Gooch wrote: > > > Also loading the modules gives me: > > Dec 7 00:31:58 jackson kernel: devfs: devfs_register(unknown): could not append to parent, err: -17 > > Two possibilities: > > - the module is trying to register "unknown" twice. The old devfs core > was forgiving about this (although it was always a driver bug to > attempt to create a duplicate). The new core won't let you do that. > Error 17 is EEXIST. Please fix the driver I guess that's a bug (or feature :) in soundcore. ALSA tries to register the sound devices via register_special(), which can handle only one card correctly. All devices on 2nd or 3rd cards are named as "unknown". The attached patch will fix this problem. Takashi --Multipart_Mon_Dec_10_11:46:48_2001-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="sound_core.c.dif" Content-Transfer-Encoding: 7bit --- linux-2.4.10/drivers/sound/sound_core.c Mon Oct 8 16:33:19 2001 +++ linux-2.4.10.SuSE+LL/drivers/sound/sound_core.c Mon Oct 8 17:17:49 2001 @@ -231,23 +231,28 @@ 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,25 +268,34 @@ 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); --Multipart_Mon_Dec_10_11:46:48_2001-1-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/