alsa: use subsys_initcall for sound core instead of module_init
PATCH 1/1 alsa: use subsys_initcall for sound core instead of module_init
This is needed for built-in drivers which are built before the sound directory, like thinkpad_acpi.
Otherwise, registering a card fails.
--- sound/core/sound.c | 4 ++-- sound/sound_core.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
sound/core/sound.c +2 -2
@@ -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);
sound/sound_core.c +1 -1
@@ -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);
Signature · 1 line
1.6.6
At Tue, 12 Jan 2010 20:20:39 -0200,
Quoted 5 lines · Thadeu Lima de Souza Cascardo
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
Quoted 35 lines
Signed-off-by Thadeu Lima de Souza Cascardo <[email protected]>--- sound/core/sound.c | 4 ++-- sound/sound_core.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)sound/core/sound.c +2
-2@@ -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);sound/sound_core.c +1
-1@@ -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);Signature · 1 line
1.6.6
Quoted 6 lines · Takashi Iwai
At Tue, 12 Jan 2010 20:20:39 -0200,
Quoted 4 lines · Thadeu Lima de Souza Cascardo
This is needed for built-in drivers which are built before the sound directory, like
thinkpad_acpi.
Quoted 7 lines
Quoted 1 line
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?
Quoted 2 lines
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.
Quoted 5 lines
thanks,
Takashi
Regards,
Cascardo.
Quoted 35 lines
Quoted 35 lines
Signed-off-by Thadeu Lima de Souza Cascardo <[email protected]>--- sound/core/sound.c | 4 ++-- sound/sound_core.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)sound/core/sound.c +2
-2@@ -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);sound/sound_core.c +1
-1@@ -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);Signature · 1 line
1.6.6
At Thu, 14 Jan 2010 13:53:43 -0200,
Quoted 10 lines · Thadeu Lima de Souza Cascardo
Quoted 8 lines · Takashi Iwai
At Tue, 12 Jan 2010 20:20:39 -0200,
Quoted 5 lines · Thadeu Lima de Souza Cascardo
This is needed for built-in drivers which are built before the sound directory, like
thinkpad_acpi.Otherwise, registering a card fails.
Quoted 8 lines
Quoted 5 lines
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... :)
Quoted 5 lines
Quoted 2 lines
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
Quoted 23 lines · Takashi Iwai
At Thu, 14 Jan 2010 13:53:43 -0200,
Quoted 10 lines · Thadeu Lima de Souza Cascardo
Quoted 8 lines · Takashi Iwai
At Tue, 12 Jan 2010 20:20:39 -0200,
Quoted 5 lines · Thadeu Lima de Souza Cascardo
This is needed for built-in drivers which are built before the sound directory, like
thinkpad_acpi.Otherwise, registering a card fails.
Quoted 8 lines
Quoted 5 lines
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... :)
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
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.
Quoted 2 lines
Takashi
At Thu, 14 Jan 2010 14:22:31 -0200,
Quoted 28 lines · Thadeu Lima de Souza Cascardo
Quoted 26 lines · Takashi Iwai
At Thu, 14 Jan 2010 13:53:43 -0200,
Quoted 10 lines · Thadeu Lima de Souza Cascardo
Quoted 8 lines · Takashi Iwai
At Tue, 12 Jan 2010 20:20:39 -0200,
Quoted 5 lines · Thadeu Lima de Souza Cascardo
This is needed for built-in drivers which are built before the sound directory, like
thinkpad_acpi.Otherwise, registering a card fails.
Quoted 8 lines
Quoted 5 lines
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... :)
Quoted 3 lines
Quoted 2 lines
I'll apply this after some testing.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
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
At Wed, 13 Jan 2010 07:48:07 +0100,
Quoted 7 lines · I wrote:
At Tue, 12 Jan 2010 20:20:39 -0200,
Quoted 4 lines · Thadeu Lima de Souza Cascardo
This is needed for built-in drivers which are built before the sound directory, like
thinkpad_acpi.
Quoted 8 lines
Quoted 1 line
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