[alsa-devel] [PATCH 1/2] ASoC: core: call snd_soc_unregister_card() when component cleanup
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Thu Feb 5 06:33:55 CET 2015
From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
ASoC devices are organized as [CPU]-[CARD]-[CODEC]. Then, [CPU]/[CODEC]
are based on [component] structure. Now, each [CARD] device knows that
it has organized from which [component]. But current [component] doesn't
inform to [CARD] that it was removed when user called rmmod or unbind it.
Thus, [CARD] which lost some [components] still exist in system.
And then, ALSA sound card will have some problem if user used this [CARD]
in such timing. This patch unregister [CARD] when [component] was removed.
If you want to use this [CARD] again,
you need to re-insmod or re-bind removed [component] and [CARD] again.
Reported-by: Nguyen Viet Dung <nv-dung at jinso.co.jp>
Reported-by: Bui Duc Phuc <bd-phuc at jinso.co.jp>
Reported-by: Cao Minh Hiep <cm-hiep at jinso.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
sound/soc/soc-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index ededb97..cd5db21 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2695,6 +2695,7 @@ static void snd_soc_component_add(struct snd_soc_component *component)
static void snd_soc_component_cleanup(struct snd_soc_component *component)
{
snd_soc_unregister_dais(component);
+ snd_soc_unregister_card(component->card);
kfree(component->name);
}
--
1.7.9.5
More information about the Alsa-devel
mailing list