diff options
author | Mark Brown <broonie@kernel.org> | 2017-09-27 10:11:06 -0700 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-09-27 10:11:06 -0700 |
commit | 3b1b3a7ba5536b4247024a5f00950d0932edf691 (patch) | |
tree | b3ea06cb08ea11720d95a5454e56696ba29e532a /sound/soc/soc-pcm.c | |
parent | 75ab9eb6f15bad78b3ce274c699c27dc98ab13ce (diff) | |
parent | 5d61f0ba6524dcbad198126e5793157c8afdea91 (diff) | |
download | linux-stable-3b1b3a7ba5536b4247024a5f00950d0932edf691.tar.gz linux-stable-3b1b3a7ba5536b4247024a5f00950d0932edf691.tar.bz2 linux-stable-3b1b3a7ba5536b4247024a5f00950d0932edf691.zip |
Merge branch 'fix/pcm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r-- | sound/soc/soc-pcm.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 23c251a6c587..09fed7014ed8 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2630,6 +2630,17 @@ 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; + struct snd_soc_platform *platform = rtd->platform; + + /* need to sync the delayed work before releasing resources */ + flush_delayed_work(&rtd->delayed_work); + if (platform->driver->pcm_free) + platform->driver->pcm_free(pcm); +} + /* create a new pcm */ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) { @@ -2755,7 +2766,7 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) } } - pcm->private_free = platform->driver->pcm_free; + pcm->private_free = soc_pcm_private_free; out: dev_info(rtd->card->dev, "%s <-> %s mapping ok\n", (rtd->num_codecs > 1) ? "multicodec" : rtd->codec_dai->name, |