Skip to contentSkip to conversation

Regression in next with codec unload and snd_soc_component_get/put

DISCUSSION Tony Lindgren 4 participants 7 messages Aug 9, 2019 – Aug 13, 2019

lore
Share & tools
lore
#0 lore raw

Hi,

Looks like commit 4a81e8f30d0b ("ASoC: soc-component: add snd_soc_component_get/put()") causes a regression where trying to rmmod a codec driver fails with module is in use error after rmmod of snd-soc-audio-graph-card for example.

Any ideas what goes wrong there?

BTW, looks like the lore.kernel.org link in that commit also is unreachable?

Regards,

Tony

#1 lore raw
Quoted 9 lines · Tony Lindgren

Hi,

Looks like commit 4a81e8f30d0b ("ASoC: soc-component: add snd_soc_component_get/put()") causes a regression where trying to rmmod a codec driver fails with module is in use error after rmmod of snd-soc-audio-graph-card for example.

Any ideas what goes wrong there?

There is an obvious typo: soc_cleanup_component() should call snd_soc_component_module_put_when_remove() instead of *_close().

And the module_get_upon_open boolean switch is a bit hard to understand. Maybe using enum would be simpler there.

Quoted 2 lines

BTW, looks like the lore.kernel.org link in that commit also is unreachable?

It's because alsa-devel ML isn't tracked on lore.kernel.org, unfortunately.

Jaroslav, I asked this already. Shall we ask lore to track alsa-devel ML?
https://korg.wiki.kernel.org/userdoc/lore

thanks,

Takashi

#2 lore raw
Quoted 10 lines · Takashi Iwai
Quoted 8 lines · Tony Lindgren

Hi,

Looks like commit 4a81e8f30d0b ("ASoC: soc-component: add snd_soc_component_get/put()") causes a regression where trying to rmmod a codec driver fails with module is in use error after rmmod of snd-soc-audio-graph-card for example.

Quoted 4 lines
Quoted 1 line

Any ideas what goes wrong there?

There is an obvious typo: soc_cleanup_component() should call snd_soc_component_module_put_when_remove() instead of *_close().

Making that change locally seems to fix it thanks.

Quoted 6 lines

And the module_get_upon_open boolean switch is a bit hard to understand. Maybe using enum would be simpler there.

Quoted 2 lines

BTW, looks like the lore.kernel.org link in that commit also is unreachable?

Quoted 6 lines

It's because alsa-devel ML isn't tracked on lore.kernel.org, unfortunately.

Jaroslav, I asked this already. Shall we ask lore to track alsa-devel ML?
https://korg.wiki.kernel.org/userdoc/lore

Regards,

Tony

#3 lore raw
Quoted 12 lines · Tony Lindgren
Quoted 10 lines · Takashi Iwai
Quoted 8 lines · Tony Lindgren

Hi,

Looks like commit 4a81e8f30d0b ("ASoC: soc-component: add snd_soc_component_get/put()") causes a regression where trying to rmmod a codec driver fails with module is in use error after rmmod of snd-soc-audio-graph-card for example.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Any ideas what goes wrong there?

There is an obvious typo: soc_cleanup_component() should call snd_soc_component_module_put_when_remove() instead of *_close().

Making that change locally seems to fix it thanks.

... and it was already fixed in the later commit 0e36f36b04e7 "ASoC: soc-core: fix module_put() warning in soc_cleanup_component".

Takashi

#4 lore raw
Quoted 16 lines · Takashi Iwai
Quoted 14 lines · Tony Lindgren
Quoted 12 lines · Takashi Iwai
Quoted 9 lines · Tony Lindgren

Hi,

Looks like commit 4a81e8f30d0b ("ASoC: soc-component: add snd_soc_component_get/put()") causes a regression where trying to rmmod a codec driver fails with module is in use error after rmmod of snd-soc-audio-graph-card for example.

Any ideas what goes wrong there?

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

There is an obvious typo: soc_cleanup_component() should call snd_soc_component_module_put_when_remove() instead of *_close().

Making that change locally seems to fix it thanks.

... and it was already fixed in the later commit 0e36f36b04e7 "ASoC: soc-core: fix module_put() warning in soc_cleanup_component".

Mark, looks like this commit is still not in Linux next, forgot to push out something?

Regards,

Tony

#5 lore raw
Quoted 7 lines · Tony Lindgren
Quoted 2 lines · Takashi Iwai

... and it was already fixed in the later commit 0e36f36b04e7 "ASoC: soc-core: fix module_put() warning in soc_cleanup_component".

Mark, looks like this commit is still not in Linux next, forgot to push out something?

There's a build failure the Intel guys haven't fixed.

#6 lore raw
Quoted 10 lines · Mark Brown
Quoted 7 lines · Tony Lindgren
Quoted 2 lines · Takashi Iwai

... and it was already fixed in the later commit 0e36f36b04e7 "ASoC: soc-core: fix module_put() warning in soc_cleanup_component".

Mark, looks like this commit is still not in Linux next, forgot to push out something?

There's a build failure the Intel guys haven't fixed.

see ('ASoC: SOF: fix HDA direct MMIO access') posted on alsa-devel yesterday

https://mailman.alsa-project.org/pipermail/alsa-devel/2019-August/153914.html