diff options
author | Mark Brown <broonie@kernel.org> | 2017-10-26 09:45:35 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-10-26 09:45:35 +0200 |
commit | eefb175fc227492bfcfadce5409f48911923fa02 (patch) | |
tree | 45314543ec64a0b86521016b2b7d6f593a91d56c /sound/soc | |
parent | cc0b8139d87b6d9efa3ae24cdb8d92e48da0143f (diff) | |
parent | 5d61f0ba6524dcbad198126e5793157c8afdea91 (diff) | |
download | linux-eefb175fc227492bfcfadce5409f48911923fa02.tar.bz2 |
Merge remote-tracking branch 'asoc/fix/pcm' into asoc-linus
Diffstat (limited to 'sound/soc')
-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 94b88b897c3b..c0f0b09cb433 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2632,6 +2632,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) { @@ -2757,7 +2768,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, |