[alsa-devel] [PATCH v3 06/19] ASoC: soc-core: add soc_unbind_dai_link()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Nov 12 06:37:50 CET 2019


Hi Pierre-Louis

Thank you for reporting

> > From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> > 
> > It is easy to read code if it is cleanly using paired function/naming,
> > like start <-> stop, register <-> unregister, etc, etc.
> > But, current ALSA SoC code is very random, unbalance, not paired, etc.
> > It is easy to create bug at the such code, and it will be difficult to
> > debug.
> > 
> > ALSA SoC has soc_bind_dai_link(), but its paired soc_unbind_dai_link()
> > is not implemented.
> > More confusable is that soc_remove_pcm_runtimes() which should be
> > soc_unbind_dai_link() is implemented without synchronised
> > to soc_bind_dai_link().
> > 
> > This patch cleanup this unbalance.
> > 
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> > Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
> 
> Morimoto-san, this patch seems to introduce a regression in our SOF
> module removal tests. Without a couple of load/unload modules cycles,
> we hit a kernel oops while freeing the card.
> 
> see https://github.com/thesofproject/linux/issues/1466 for some logs.
> 
> This issue did not happen with our November 6 rebase on Mark's tree,
> and showed up today. I couldn't really bisect the whole tree due to
> other issues, so manually applied your patches on top of this 11/06
> tree and bisected from there.
> 
> I will need to confirm this finding (it's quite late for me) but
> looking at the code I wonder if the move of pcm_runtime deletion is
> correct?

Hmm...
It is just merged verbose 2 functions into 1,
nothing changed from logic point of view
if my understanding was correct.

And now, I tried unbind test for cpu/codec/card on my side,
but nothing happen...

I'm using this commit

	bc7a9091e5b927ecc20dbb3bc07a5a09783fc27b
	("ASoC: soc-core: add soc_unbind_dai_link()")


Thank you for your help !!
Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list