* Re: [PATCH] alsa: use subsys_initcall for sound core instead of module_init
@ 2010-01-13 6:48 ` Takashi Iwai
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2010-01-13 6:48 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo
Cc: alsa-devel, ibm-acpi, Jaroslav Kysela, linux-kernel
At Tue, 12 Jan 2010 20:20:39 -0200,
Thadeu Lima de Souza Cascardo wrote:
>
> This is needed for built-in drivers which are built before the sound directory,
> like thinkpad_acpi.
>
> Otherwise, registering a card fails.
Oh well, this kind of problem hits again.
I don't remember why subsys_init() wasn't taken before... Maybe some
dependency between sound and V4L or so. But, it's worth to check again.
I'll apply this after some testing.
thanks,
Takashi
>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
> ---
> sound/core/sound.c | 4 ++--
> sound/sound_core.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/sound/core/sound.c b/sound/core/sound.c
> index 7872a02..563d196 100644
> --- a/sound/core/sound.c
> +++ b/sound/core/sound.c
> @@ -468,5 +468,5 @@ static void __exit alsa_sound_exit(void)
> unregister_chrdev(major, "alsa");
> }
>
> -module_init(alsa_sound_init)
> -module_exit(alsa_sound_exit)
> +subsys_initcall(alsa_sound_init);
> +module_exit(alsa_sound_exit);
> diff --git a/sound/sound_core.c b/sound/sound_core.c
> index dbca7c9..7c2d677 100644
> --- a/sound/sound_core.c
> +++ b/sound/sound_core.c
> @@ -61,7 +61,7 @@ static void __exit cleanup_soundcore(void)
> class_destroy(sound_class);
> }
>
> -module_init(init_soundcore);
> +subsys_initcall(init_soundcore);
> module_exit(cleanup_soundcore);
>
>
> --
> 1.6.6
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] alsa: use subsys_initcall for sound core instead of module_init
2010-01-13 6:48 ` Takashi Iwai
(?)
@ 2010-01-14 15:53 ` Thadeu Lima de Souza Cascardo
2010-01-14 16:18 ` Takashi Iwai
-1 siblings, 1 reply; 11+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2010-01-14 15:53 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, ibm-acpi, Jaroslav Kysela, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1948 bytes --]
On Wed, Jan 13, 2010 at 07:48:07AM +0100, Takashi Iwai wrote:
> At Tue, 12 Jan 2010 20:20:39 -0200,
> Thadeu Lima de Souza Cascardo wrote:
> >
> > This is needed for built-in drivers which are built before the sound directory,
> > like thinkpad_acpi.
> >
> > Otherwise, registering a card fails.
>
> Oh well, this kind of problem hits again.
>
> I don't remember why subsys_init() wasn't taken before... Maybe some
> dependency between sound and V4L or so. But, it's worth to check again.
>
Any references to this dependency problem, so I can try to help and investigate
about it and do some tests?
> I'll apply this after some testing.
>
Built-in thinkpad-acpi started working for me after these changes. I can't tell
you about any subsystem that stopped working, like some V4L driver.
>
> thanks,
>
> Takashi
>
Regards,
Cascardo.
> >
> > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
> > ---
> > sound/core/sound.c | 4 ++--
> > sound/sound_core.c | 2 +-
> > 2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/sound/core/sound.c b/sound/core/sound.c
> > index 7872a02..563d196 100644
> > --- a/sound/core/sound.c
> > +++ b/sound/core/sound.c
> > @@ -468,5 +468,5 @@ static void __exit alsa_sound_exit(void)
> > unregister_chrdev(major, "alsa");
> > }
> >
> > -module_init(alsa_sound_init)
> > -module_exit(alsa_sound_exit)
> > +subsys_initcall(alsa_sound_init);
> > +module_exit(alsa_sound_exit);
> > diff --git a/sound/sound_core.c b/sound/sound_core.c
> > index dbca7c9..7c2d677 100644
> > --- a/sound/sound_core.c
> > +++ b/sound/sound_core.c
> > @@ -61,7 +61,7 @@ static void __exit cleanup_soundcore(void)
> > class_destroy(sound_class);
> > }
> >
> > -module_init(init_soundcore);
> > +subsys_initcall(init_soundcore);
> > module_exit(cleanup_soundcore);
> >
> >
> > --
> > 1.6.6
> >
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] alsa: use subsys_initcall for sound core instead of module_init
2010-01-14 15:53 ` Thadeu Lima de Souza Cascardo
@ 2010-01-14 16:18 ` Takashi Iwai
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2010-01-14 16:18 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo; +Cc: alsa-devel, ibm-acpi, linux-kernel
At Thu, 14 Jan 2010 13:53:43 -0200,
Thadeu Lima de Souza Cascardo wrote:
>
> On Wed, Jan 13, 2010 at 07:48:07AM +0100, Takashi Iwai wrote:
> > At Tue, 12 Jan 2010 20:20:39 -0200,
> > Thadeu Lima de Souza Cascardo wrote:
> > >
> > > This is needed for built-in drivers which are built before the sound directory,
> > > like thinkpad_acpi.
> > >
> > > Otherwise, registering a card fails.
> >
> > Oh well, this kind of problem hits again.
> >
> > I don't remember why subsys_init() wasn't taken before... Maybe some
> > dependency between sound and V4L or so. But, it's worth to check again.
> >
>
> Any references to this dependency problem, so I can try to help and investigate
> about it and do some tests?
I also don't remember. That was a long long ago... :)
> > I'll apply this after some testing.
> >
>
> Built-in thinkpad-acpi started working for me after these changes. I can't tell
> you about any subsystem that stopped working, like some V4L driver.
Did you test whether the sound subsystem still works as modules?
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] alsa: use subsys_initcall for sound core instead of module_init
@ 2010-01-14 16:18 ` Takashi Iwai
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2010-01-14 16:18 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo
Cc: alsa-devel, ibm-acpi, Jaroslav Kysela, linux-kernel
At Thu, 14 Jan 2010 13:53:43 -0200,
Thadeu Lima de Souza Cascardo wrote:
>
> On Wed, Jan 13, 2010 at 07:48:07AM +0100, Takashi Iwai wrote:
> > At Tue, 12 Jan 2010 20:20:39 -0200,
> > Thadeu Lima de Souza Cascardo wrote:
> > >
> > > This is needed for built-in drivers which are built before the sound directory,
> > > like thinkpad_acpi.
> > >
> > > Otherwise, registering a card fails.
> >
> > Oh well, this kind of problem hits again.
> >
> > I don't remember why subsys_init() wasn't taken before... Maybe some
> > dependency between sound and V4L or so. But, it's worth to check again.
> >
>
> Any references to this dependency problem, so I can try to help and investigate
> about it and do some tests?
I also don't remember. That was a long long ago... :)
> > I'll apply this after some testing.
> >
>
> Built-in thinkpad-acpi started working for me after these changes. I can't tell
> you about any subsystem that stopped working, like some V4L driver.
Did you test whether the sound subsystem still works as modules?
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] alsa: use subsys_initcall for sound core instead of module_init
2010-01-14 16:18 ` Takashi Iwai
(?)
@ 2010-01-14 16:22 ` Thadeu Lima de Souza Cascardo
2010-01-14 16:31 ` Takashi Iwai
-1 siblings, 1 reply; 11+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2010-01-14 16:22 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, ibm-acpi, Jaroslav Kysela, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]
On Thu, Jan 14, 2010 at 05:18:26PM +0100, Takashi Iwai wrote:
> At Thu, 14 Jan 2010 13:53:43 -0200,
> Thadeu Lima de Souza Cascardo wrote:
> >
> > On Wed, Jan 13, 2010 at 07:48:07AM +0100, Takashi Iwai wrote:
> > > At Tue, 12 Jan 2010 20:20:39 -0200,
> > > Thadeu Lima de Souza Cascardo wrote:
> > > >
> > > > This is needed for built-in drivers which are built before the sound directory,
> > > > like thinkpad_acpi.
> > > >
> > > > Otherwise, registering a card fails.
> > >
> > > Oh well, this kind of problem hits again.
> > >
> > > I don't remember why subsys_init() wasn't taken before... Maybe some
> > > dependency between sound and V4L or so. But, it's worth to check again.
> > >
> >
> > Any references to this dependency problem, so I can try to help and investigate
> > about it and do some tests?
>
> I also don't remember. That was a long long ago... :)
>
> > > I'll apply this after some testing.
> > >
> >
> > Built-in thinkpad-acpi started working for me after these changes. I can't tell
> > you about any subsystem that stopped working, like some V4L driver.
>
> Did you test whether the sound subsystem still works as modules?
>
It does. I've just reapplied those patches on top of rc4, and I'm currently
running it with CONFIG_SOUND=m, and my sound card works nicely, thanks.
>
> Takashi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] alsa: use subsys_initcall for sound core instead of module_init
2010-01-14 16:22 ` Thadeu Lima de Souza Cascardo
@ 2010-01-14 16:31 ` Takashi Iwai
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2010-01-14 16:31 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo; +Cc: alsa-devel, ibm-acpi, linux-kernel
At Thu, 14 Jan 2010 14:22:31 -0200,
Thadeu Lima de Souza Cascardo wrote:
>
> On Thu, Jan 14, 2010 at 05:18:26PM +0100, Takashi Iwai wrote:
> > At Thu, 14 Jan 2010 13:53:43 -0200,
> > Thadeu Lima de Souza Cascardo wrote:
> > >
> > > On Wed, Jan 13, 2010 at 07:48:07AM +0100, Takashi Iwai wrote:
> > > > At Tue, 12 Jan 2010 20:20:39 -0200,
> > > > Thadeu Lima de Souza Cascardo wrote:
> > > > >
> > > > > This is needed for built-in drivers which are built before the sound directory,
> > > > > like thinkpad_acpi.
> > > > >
> > > > > Otherwise, registering a card fails.
> > > >
> > > > Oh well, this kind of problem hits again.
> > > >
> > > > I don't remember why subsys_init() wasn't taken before... Maybe some
> > > > dependency between sound and V4L or so. But, it's worth to check again.
> > > >
> > >
> > > Any references to this dependency problem, so I can try to help and investigate
> > > about it and do some tests?
> >
> > I also don't remember. That was a long long ago... :)
> >
> > > > I'll apply this after some testing.
> > > >
> > >
> > > Built-in thinkpad-acpi started working for me after these changes. I can't tell
> > > you about any subsystem that stopped working, like some V4L driver.
> >
> > Did you test whether the sound subsystem still works as modules?
> >
>
> It does. I've just reapplied those patches on top of rc4, and I'm currently
> running it with CONFIG_SOUND=m, and my sound card works nicely, thanks.
Good, it's clear it must, but just to be sure :)
thanks,
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] alsa: use subsys_initcall for sound core instead of module_init
@ 2010-01-14 16:31 ` Takashi Iwai
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2010-01-14 16:31 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo
Cc: alsa-devel, ibm-acpi, Jaroslav Kysela, linux-kernel
At Thu, 14 Jan 2010 14:22:31 -0200,
Thadeu Lima de Souza Cascardo wrote:
>
> On Thu, Jan 14, 2010 at 05:18:26PM +0100, Takashi Iwai wrote:
> > At Thu, 14 Jan 2010 13:53:43 -0200,
> > Thadeu Lima de Souza Cascardo wrote:
> > >
> > > On Wed, Jan 13, 2010 at 07:48:07AM +0100, Takashi Iwai wrote:
> > > > At Tue, 12 Jan 2010 20:20:39 -0200,
> > > > Thadeu Lima de Souza Cascardo wrote:
> > > > >
> > > > > This is needed for built-in drivers which are built before the sound directory,
> > > > > like thinkpad_acpi.
> > > > >
> > > > > Otherwise, registering a card fails.
> > > >
> > > > Oh well, this kind of problem hits again.
> > > >
> > > > I don't remember why subsys_init() wasn't taken before... Maybe some
> > > > dependency between sound and V4L or so. But, it's worth to check again.
> > > >
> > >
> > > Any references to this dependency problem, so I can try to help and investigate
> > > about it and do some tests?
> >
> > I also don't remember. That was a long long ago... :)
> >
> > > > I'll apply this after some testing.
> > > >
> > >
> > > Built-in thinkpad-acpi started working for me after these changes. I can't tell
> > > you about any subsystem that stopped working, like some V4L driver.
> >
> > Did you test whether the sound subsystem still works as modules?
> >
>
> It does. I've just reapplied those patches on top of rc4, and I'm currently
> running it with CONFIG_SOUND=m, and my sound card works nicely, thanks.
Good, it's clear it must, but just to be sure :)
thanks,
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] alsa: use subsys_initcall for sound core instead of module_init
2010-01-13 6:48 ` Takashi Iwai
@ 2010-01-15 14:40 ` Takashi Iwai
-1 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2010-01-15 14:40 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo; +Cc: alsa-devel, ibm-acpi, linux-kernel
At Wed, 13 Jan 2010 07:48:07 +0100,
I wrote:
>
> At Tue, 12 Jan 2010 20:20:39 -0200,
> Thadeu Lima de Souza Cascardo wrote:
> >
> > This is needed for built-in drivers which are built before the sound directory,
> > like thinkpad_acpi.
> >
> > Otherwise, registering a card fails.
>
> Oh well, this kind of problem hits again.
>
> I don't remember why subsys_init() wasn't taken before... Maybe some
> dependency between sound and V4L or so. But, it's worth to check again.
>
> I'll apply this after some testing.
The patch is merged now to sound git tree.
thanks,
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] alsa: use subsys_initcall for sound core instead of module_init
@ 2010-01-15 14:40 ` Takashi Iwai
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2010-01-15 14:40 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo
Cc: alsa-devel, ibm-acpi, Jaroslav Kysela, linux-kernel
At Wed, 13 Jan 2010 07:48:07 +0100,
I wrote:
>
> At Tue, 12 Jan 2010 20:20:39 -0200,
> Thadeu Lima de Souza Cascardo wrote:
> >
> > This is needed for built-in drivers which are built before the sound directory,
> > like thinkpad_acpi.
> >
> > Otherwise, registering a card fails.
>
> Oh well, this kind of problem hits again.
>
> I don't remember why subsys_init() wasn't taken before... Maybe some
> dependency between sound and V4L or so. But, it's worth to check again.
>
> I'll apply this after some testing.
The patch is merged now to sound git tree.
thanks,
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread