-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASoC: soc-core: fix kernel oops on dai link remove #1469
Conversation
soc_dai_link_remove() can be called from topology or on cleanup the card. The kernel oopses if soc_unbind_dai_link() is called in the first case, so add a boolean parameter and conditionally call soc_unbind_dai_link() Fixes: bc7a909 ("ASoC: soc-core: add soc_unbind_dai_link()") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@@ -1997,7 +2000,7 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card) | |||
soc_remove_link_dais(card); | |||
|
|||
for_each_card_links_safe(card, link, _link) | |||
snd_soc_remove_dai_link(card, link); | |||
snd_soc_remove_dai_link(card, link, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plbossart isnt the simpler thing to just remove soc_unbind_dai_link() from remove_dai_link() and add it after the call to soc_unbind_dai_link()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's what the code initially did, so that's essentially a revert, yes.
I still seeing errors like this either with this commit applied or Morimoto's commit reverted:
Can you help me to understand what it do happen and give a clean fix for it? |
well, this is on Cyan so not sure if it ever worked. Try bisecting with sof-dev-rebase-2019xxxx tags to see if the recent changes to the core changed stuff. I went as far as 20190821 in some cases... |
The initial change in thesofproject#1469 does not work on Baytrail. This fix suggested on November 13, 2019 by Morimoto-san seems to fix the issues. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This PR is not good enough on Baytrail/Cherrytrail, let's try PR #1504 |
The initial change in #1469 does not work on Baytrail. This fix suggested on November 13, 2019 by Morimoto-san seems to fix the issues. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
soc_dai_link_remove() can be called from topology or on cleanup the
card. The kernel oopses if soc_unbind_dai_link() is called in the
first case, so add a boolean parameter and conditionally call
soc_unbind_dai_link()
Fixes: bc7a909 ("ASoC: soc-core: add soc_unbind_dai_link()")
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Fixes: #1466