[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 07:42:03 CET 2019
Hi Pierre-Louis, again and again
> > I'm using this commit
> >
> > bc7a9091e5b927ecc20dbb3bc07a5a09783fc27b
> > ("ASoC: soc-core: add soc_unbind_dai_link()")
>
> Does it happen from soc-topology.c :: remove_link ?
I can't test, but can this patch solve your issue?
I guess topology related rtd free timing was changed by
this balanceup.
-----------
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1e8dd19..af89aad 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -384,6 +384,9 @@ static void soc_free_pcm_runtime(struct snd_soc_pcm_runtime *rtd)
if (!rtd)
return;
+ /* need to sync the delayed work before releasing resources */
+ flush_delayed_work(&rtd->delayed_work);
+
list_del(&rtd->list);
/*
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 1c00119..9865a2d 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2883,15 +2883,6 @@ static int dpcm_fe_dai_close(struct snd_pcm_substream *fe_substream)
return ret;
}
-static void soc_pcm_private_free(struct snd_pcm *pcm)
-{
- struct snd_soc_pcm_runtime *rtd = pcm->private_data;
-
- /* need to sync the delayed work before releasing resources */
- flush_delayed_work(&rtd->delayed_work);
- snd_soc_pcm_component_free(pcm);
-}
-
/* create a new pcm */
int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
{
@@ -3033,7 +3024,7 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
return ret;
}
- pcm->private_free = soc_pcm_private_free;
+ pcm->private_free = snd_soc_pcm_component_free;
pcm->no_device_suspend = true;
out:
dev_info(rtd->card->dev, "%s <-> %s mapping ok\n",
Thank you for your help !!
Best regards
---
Kuninori Morimoto
More information about the Alsa-devel
mailing list