Skip to content

Commit

Permalink
Merge branch 'fix/pcm' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/broonie/sound into asoc-core
  • Loading branch information
Mark Brown committed Sep 27, 2017
2 parents 75ab9eb + 5d61f0b commit 3b1b3a7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 3b1b3a7

Please sign in to comment.