Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753241AbWKFPey (ORCPT ); Mon, 6 Nov 2006 10:34:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753242AbWKFPey (ORCPT ); Mon, 6 Nov 2006 10:34:54 -0500 Received: from cantor.suse.de ([195.135.220.2]:11758 "EHLO mx1.suse.de") by vger.kernel.org with ESMTP id S1753241AbWKFPex (ORCPT ); Mon, 6 Nov 2006 10:34:53 -0500 Date: Mon, 06 Nov 2006 16:34:51 +0100 Message-ID: From: Takashi Iwai To: Greg KH Cc: Damien Wyart , LKML , Andrew Morton , James@superbug.demon.co.uk Subject: Re: ALSA message with 2.6.19-rc4-mm2 (not -mm1) In-Reply-To: <20061102222242.GA17744@kroah.com> References: <20061102102607.GA2176@localhost.localdomain> <20061102192607.GA13635@kroah.com> <878xitpkvy.fsf@brouette.noos.fr> <20061102222242.GA17744@kroah.com> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta25) (eggplant) (+CVS-20060326) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3809 Lines: 96 At Thu, 2 Nov 2006 14:22:42 -0800, Greg KH wrote: > > On Thu, Nov 02, 2006 at 11:02:41PM +0100, Damien Wyart wrote: > > Hello, > > > > > > I notice these messages when 2.6.19-rc4-mm2 boots (also with > > > > rc3-mm1) but 2.6.19-rc4-mm1 did NOT display them. Related to the > > > > driver tree ? > > > > * Greg KH [061102 20:26]: > > > How many different sound cards do you have in your machine? > > > > Only one, a Sound Blaster Live. > > > > > Can you send me the output of 'ls /sys/class/sound/' with the > > > 2.6.19-rc4 (or any other non-mm) kernel? > > > > With 2.6.19-rc4-mm2, this gives: > > admmidi amidi card0 dmmidi hwC0D0 midi midiC0D1 mixer pcmC0D0p pcmC0D2c pcmC0D3p sequencer timer > > adsp audio controlC0 dsp hwC0D2 midiC0D0 midiC0D2 pcmC0D0c pcmC0D1c pcmC0D2p seq sequencer2 > > > > While Vanilla 2.6.19-rc4 leads to: > > admmidi amidi controlC0 dsp hwC0D2 midiC0D0 midiC0D2 pcmC0D0c pcmC0D1c pcmC0D2p seq sequencer2 > > adsp audio dmmidi hwC0D0 midi midiC0D1 mixer pcmC0D0p pcmC0D2c pcmC0D3p sequencer timer > > > > Seems there is an additional 'card0' entry in the first case. > > That should be a symlink right? Well it will be if you have > CONFIG_SYSFS_DEPRECATED disabled. What is the setting of that config > option? > > > With Vanilla, the relevant part of the bootlog is: > > > > Nov 2 22:49:03 brouette kernel: Advanced Linux Sound Architecture Driver Version 1.0.13 (Sun Oct 22 08:56:16 2006 UTC). > > Nov 2 22:49:03 brouette kernel: ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 21 (level, low) -> IRQ 21 > > Nov 2 22:49:03 brouette kernel: ALSA device list: > > Nov 2 22:49:03 brouette kernel: #0: SB Live [Unknown] (rev.10, serial:0x80671102) at 0xdf20, irq 21 > > > > so exactly the same as in mm2, without the error messages. > > > > As rc4-mm1 doesn't show the problem (and so gives the very same output > > as plain rc4), I still wonder if this is an interaction with the driver > > tree ? > > I do have an alsa patch in my tree that adds the "card0" stuff, but it > looks like it is working for you. I wonder why we are trying to > register the same card twice. > > Maybe we always did that and never noticed the failure? > > Takashi, any thoughts? Well, I've not checked the problem in detail yet (since I'm back from vacation), but my rough guess is that snd_card_register() is indeed called multiple times. It's correct behavior as this function is supposed to be callable multiple times. Some components (like emux-synth) are implemented as a kind of "plug-in", and they call snd_card_register() to assure that the underlying card tree gets ready. A simple fix would be like below. Could you give it a try? Takashi === [PATCH] Don't register card* sysfs entry multiple times Signed-off-by: Takashi Iwai --- linux-2.6.19-rc4-mm2/sound/core/init.c 2006-11-06 16:29:21.000000000 +0100 +++ linux-2.6.19-rc4-mm2/sound/core/init.c 2006-11-06 16:29:51.000000000 +0100 @@ -496,10 +496,12 @@ int snd_card_register(struct snd_card *c int err; snd_assert(card != NULL, return -EINVAL); - card->dev = device_create(sound_class, card->parent, 0, "card%i", - card->number); - if (IS_ERR(card->dev)) - card->dev = NULL; + if (!card->dev) { + card->dev = device_create(sound_class, card->parent, 0, + "card%i", card->number); + if (IS_ERR(card->dev)) + card->dev = NULL; + } if ((err = snd_device_register_all(card)) < 0) return err; mutex_lock(&snd_card_mutex); - 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/