2006-11-02 10:26:16

by Damien Wyart

[permalink] [raw]
Subject: ALSA message with 2.6.19-rc4-mm2 (not -mm1)

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 ?
Full dmesg and lspci attached. Can provide more details if needed.

Nov 2 11:06:49 brouette kernel: Advanced Linux Sound Architecture Driver Version 1.0.13 (Sun Oct 22 08:56:16 2006 UTC).
Nov 2 11:06:49 brouette kernel: ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 21 (level, low) -> IRQ 21
Nov 2 11:06:49 brouette kernel: kobject_add failed for card0 with -EEXIST, don't try to register things with the same name in the same directory.
Nov 2 11:06:49 brouette kernel: [<c02b810e>] kobject_add+0x114/0x192
Nov 2 11:06:49 brouette kernel: input: AT Translated Set 2 keyboard as /class/input/input0
Nov 2 11:06:49 brouette kernel: [<c02bb516>] vsnprintf+0x2ef/0x5f8
Nov 2 11:06:49 brouette kernel: [<c03131a8>] device_add+0x99/0x446
Nov 2 11:06:49 brouette kernel: [<c03135e0>] device_create+0x7b/0x9c
Nov 2 11:06:49 brouette kernel: [<c037bc6d>] snd_card_register+0x36/0x2f6
Nov 2 11:06:49 brouette kernel: [<c03807f7>] snd_hwdep_new+0x8d/0xc3
Nov 2 11:06:49 brouette kernel: usb 2-1: new device found, idVendor=056d, idProduct=0002
Nov 2 11:06:49 brouette kernel: usb 2-1: new device strings: Mfr=4, Product=14, SerialNumber=0
Nov 2 11:06:49 brouette kernel: usb 2-1: Product: EIZO USB HID Monitor
Nov 2 11:06:49 brouette kernel: usb 2-1: Manufacturer: EIZO
Nov 2 11:06:49 brouette kernel: usb 2-1: configuration #1 chosen from 1 choice
Nov 2 11:06:49 brouette kernel: [<c03c0c0f>] snd_emux_init_hwdep+0x8f/0x9f
Nov 2 11:06:49 brouette kernel: [<c03be44d>] snd_emu10k1_sample_new+0x0/0x1a3
Nov 2 11:06:49 brouette kernel: [<c03be990>] snd_emux_register+0xda/0x11e
Nov 2 11:06:49 brouette kernel: [<c03be800>] sf_sample_new+0x0/0x1f
Nov 2 11:06:49 brouette kernel: [<c03be81f>] sf_sample_free+0x0/0x8
Nov 2 11:06:49 brouette kernel: [<c03bda90>] snd_emu10k1_synth_new_device+0xdc/0x14c
Nov 2 11:06:49 brouette kernel: [<c03a098d>] init_device+0x28/0x8e
Nov 2 11:06:49 brouette kernel: [<c03a0ad7>] find_driver+0x6f/0x115
Nov 2 11:06:49 brouette kernel: [<c0418040>] mutex_lock+0xb/0x1c
Nov 2 11:06:49 brouette kernel: [<c03a1050>] snd_seq_device_register_driver+0x9b/0x11b
Nov 2 11:06:49 brouette kernel: [<c01004b1>] init+0x10d/0x306
Nov 2 11:06:49 brouette kernel: [<c0102b96>] ret_from_fork+0x6/0x1c
Nov 2 11:06:49 brouette kernel: [<c01003a4>] init+0x0/0x306
Nov 2 11:06:49 brouette kernel: [<c01003a4>] init+0x0/0x306
Nov 2 11:06:49 brouette kernel: [<c010389b>] kernel_thread_helper+0x7/0x1c
Nov 2 11:06:49 brouette kernel: =======================
Nov 2 11:06:49 brouette kernel: ALSA device list:
Nov 2 11:06:49 brouette kernel: #0: SB Live [Unknown] (rev.10, serial:0x80671102) at 0xdf20, irq 21

--
Damien Wyart


Attachments:
(No filename) (2.76 kB)
kern.log (33.25 kB)
lspci (8.89 kB)
Download all attachments

2006-11-02 18:27:57

by Andrew Morton

[permalink] [raw]
Subject: Re: ALSA message with 2.6.19-rc4-mm2 (not -mm1)

On Thu, 2 Nov 2006 11:26:07 +0100
Damien Wyart <[email protected]> wrote:

> 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 ?
> Full dmesg and lspci attached. Can provide more details if needed.
>
> Nov 2 11:06:49 brouette kernel: Advanced Linux Sound Architecture Driver Version 1.0.13 (Sun Oct 22 08:56:16 2006 UTC).
> Nov 2 11:06:49 brouette kernel: ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 21 (level, low) -> IRQ 21
> Nov 2 11:06:49 brouette kernel: kobject_add failed for card0 with -EEXIST, don't try to register things with the same name in the same directory.
> Nov 2 11:06:49 brouette kernel: [<c02b810e>] kobject_add+0x114/0x192
> Nov 2 11:06:49 brouette kernel: input: AT Translated Set 2 keyboard as /class/input/input0
> Nov 2 11:06:49 brouette kernel: [<c02bb516>] vsnprintf+0x2ef/0x5f8
> Nov 2 11:06:49 brouette kernel: [<c03131a8>] device_add+0x99/0x446
> Nov 2 11:06:49 brouette kernel: [<c03135e0>] device_create+0x7b/0x9c
> Nov 2 11:06:49 brouette kernel: [<c037bc6d>] snd_card_register+0x36/0x2f6
> Nov 2 11:06:49 brouette kernel: [<c03807f7>] snd_hwdep_new+0x8d/0xc3
> Nov 2 11:06:49 brouette kernel: usb 2-1: new device found, idVendor=056d, idProduct=0002
> Nov 2 11:06:49 brouette kernel: usb 2-1: new device strings: Mfr=4, Product=14, SerialNumber=0
> Nov 2 11:06:49 brouette kernel: usb 2-1: Product: EIZO USB HID Monitor
> Nov 2 11:06:49 brouette kernel: usb 2-1: Manufacturer: EIZO
> Nov 2 11:06:49 brouette kernel: usb 2-1: configuration #1 chosen from 1 choice
> Nov 2 11:06:49 brouette kernel: [<c03c0c0f>] snd_emux_init_hwdep+0x8f/0x9f
> Nov 2 11:06:49 brouette kernel: [<c03be44d>] snd_emu10k1_sample_new+0x0/0x1a3
> Nov 2 11:06:49 brouette kernel: [<c03be990>] snd_emux_register+0xda/0x11e
> Nov 2 11:06:49 brouette kernel: [<c03be800>] sf_sample_new+0x0/0x1f
> Nov 2 11:06:49 brouette kernel: [<c03be81f>] sf_sample_free+0x0/0x8
> Nov 2 11:06:49 brouette kernel: [<c03bda90>] snd_emu10k1_synth_new_device+0xdc/0x14c
> Nov 2 11:06:49 brouette kernel: [<c03a098d>] init_device+0x28/0x8e
> Nov 2 11:06:49 brouette kernel: [<c03a0ad7>] find_driver+0x6f/0x115
> Nov 2 11:06:49 brouette kernel: [<c0418040>] mutex_lock+0xb/0x1c
> Nov 2 11:06:49 brouette kernel: [<c03a1050>] snd_seq_device_register_driver+0x9b/0x11b
> Nov 2 11:06:49 brouette kernel: [<c01004b1>] init+0x10d/0x306
> Nov 2 11:06:49 brouette kernel: [<c0102b96>] ret_from_fork+0x6/0x1c
> Nov 2 11:06:49 brouette kernel: [<c01003a4>] init+0x0/0x306
> Nov 2 11:06:49 brouette kernel: [<c01003a4>] init+0x0/0x306
> Nov 2 11:06:49 brouette kernel: [<c010389b>] kernel_thread_helper+0x7/0x1c
> Nov 2 11:06:49 brouette kernel: =======================
> Nov 2 11:06:49 brouette kernel: ALSA device list:
> Nov 2 11:06:49 brouette kernel: #0: SB Live [Unknown] (rev.10, serial:0x80671102) at 0xdf20, irq 21

This could be an existing alsa bug which is now being detected by new
error-checking code. OTOH, the kobject_add() checking has been in there
for a while, so it could be a new alsa bug too.

But it's an alsa bug.

2006-11-02 19:26:14

by Greg KH

[permalink] [raw]
Subject: Re: ALSA message with 2.6.19-rc4-mm2 (not -mm1)

On Thu, Nov 02, 2006 at 11:26:07AM +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 ?
> Full dmesg and lspci attached. Can provide more details if needed.

How many different sound cards do you have in your machine?

Can you send me the output of 'ls /sys/class/sound/' with the 2.6.19-rc4
(or any other non-mm) kernel?

And yes, I'd blame this one on ALSA, but I want to make sure I didn't do
anything foolish here too :)

thanks,

greg k-h

2006-11-02 22:02:45

by Damien Wyart

[permalink] [raw]
Subject: Re: ALSA message with 2.6.19-rc4-mm2 (not -mm1)

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 <[email protected]> [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.


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 ?

--
Damien Wyart

2006-11-02 22:24:39

by Greg KH

[permalink] [raw]
Subject: Re: ALSA message with 2.6.19-rc4-mm2 (not -mm1)

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 <[email protected]> [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?

thanks,

greg k-h

2006-11-03 07:08:26

by Greg KH

[permalink] [raw]
Subject: Re: ALSA message with 2.6.19-rc4-mm2 (not -mm1)

On Fri, Nov 03, 2006 at 07:53:41AM +0100, Damien Wyart wrote:
> > > > 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.
>
> * Greg KH <[email protected]> [061102 23:22]:
> > That should be a symlink right?
>
> The corresponding ls -l entry reads:
> lrwxrwxrwx 1 root root 0 Nov 3 2006 card0 -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0

That looks good.

And the other files in that directory are also symlinks pointing to one
directory below the card0 device (with the exception of the timer file),
right?

> > Well it will be if you have CONFIG_SYSFS_DEPRECATED disabled. What is
> > the setting of that config option?
>
> I have:
> # CONFIG_SYSFS_DEPRECATED is not set

Ok. That too looks good.

> I attach the full .config in case it is useful (had not sent it at
> first with the report).

Ok, I'm stumped. Takashi, any ideas?

thanks,

greg k-h

2006-11-03 09:59:09

by Damien Wyart

[permalink] [raw]
Subject: Re: ALSA message with 2.6.19-rc4-mm2 (not -mm1)

* Greg KH <[email protected]> [2006-11-02 23:08]: And the other files in
> that directory are also symlinks pointing to one directory below the
> card0 device (with the exception of the timer file), right?

Here is the full listing:

lrwxrwxrwx 1 root root 0 Nov 3 08:39 admmidi -> ../../devices/virtual/sound/admmidi
lrwxrwxrwx 1 root root 0 Nov 3 08:39 adsp -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/adsp
lrwxrwxrwx 1 root root 0 Nov 3 08:39 amidi -> ../../devices/virtual/sound/amidi
lrwxrwxrwx 1 root root 0 Nov 3 08:39 audio -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/audio
lrwxrwxrwx 1 root root 0 Nov 3 08:39 card0 -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0
lrwxrwxrwx 1 root root 0 Nov 3 08:39 controlC0 -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/controlC0
lrwxrwxrwx 1 root root 0 Nov 3 08:39 dmmidi -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/dmmidi
lrwxrwxrwx 1 root root 0 Nov 3 08:39 dsp -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/dsp
lrwxrwxrwx 1 root root 0 Nov 3 08:39 hwC0D0 -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/hwC0D0
lrwxrwxrwx 1 root root 0 Nov 3 08:39 hwC0D2 -> ../../devices/virtual/sound/hwC0D2
lrwxrwxrwx 1 root root 0 Nov 3 08:39 midi -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/midi
lrwxrwxrwx 1 root root 0 Nov 3 08:39 midiC0D0 -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/midiC0D0
lrwxrwxrwx 1 root root 0 Nov 3 08:39 midiC0D1 -> ../../devices/virtual/sound/midiC0D1
lrwxrwxrwx 1 root root 0 Nov 3 08:39 midiC0D2 -> ../../devices/virtual/sound/midiC0D2
lrwxrwxrwx 1 root root 0 Nov 3 08:39 mixer -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/mixer
lrwxrwxrwx 1 root root 0 Nov 3 08:39 pcmC0D0c -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/pcmC0D0c
lrwxrwxrwx 1 root root 0 Nov 3 08:39 pcmC0D0p -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/pcmC0D0p
lrwxrwxrwx 1 root root 0 Nov 3 08:39 pcmC0D1c -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/pcmC0D1c
lrwxrwxrwx 1 root root 0 Nov 3 08:39 pcmC0D2c -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/pcmC0D2c
lrwxrwxrwx 1 root root 0 Nov 3 08:39 pcmC0D2p -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/pcmC0D2p
lrwxrwxrwx 1 root root 0 Nov 3 08:39 pcmC0D3p -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0/card0/pcmC0D3p
lrwxrwxrwx 1 root root 0 Nov 3 08:39 seq -> ../../devices/virtual/sound/seq
lrwxrwxrwx 1 root root 0 Nov 3 08:39 sequencer -> ../../devices/virtual/sound/sequencer
lrwxrwxrwx 1 root root 0 Nov 3 08:39 sequencer2 -> ../../devices/virtual/sound/sequencer2
lrwxrwxrwx 1 root root 0 Nov 3 08:39 timer -> ../../devices/virtual/sound/timer

--
Damien Wyart

2006-11-06 15:34:54

by Takashi Iwai

[permalink] [raw]
Subject: Re: ALSA message with 2.6.19-rc4-mm2 (not -mm1)

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 <[email protected]> [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 <[email protected]>

--- 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);

2006-11-06 22:20:34

by Damien Wyart

[permalink] [raw]
Subject: Re: ALSA message with 2.6.19-rc4-mm2 (not -mm1)

* Takashi Iwai <[email protected]> [061106 16:34]:
> 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?

Yes, with with patch the offending message disappears from the bootlog.
Thanks for your answer!

--
Damien