summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/tegra/tegra_pcm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c
index d5c76b28dd98..51903fdda089 100644
--- a/sound/soc/tegra/tegra_pcm.c
+++ b/sound/soc/tegra/tegra_pcm.c
@@ -104,11 +104,19 @@ static int tegra_pcm_open(struct snd_pcm_substream *substream)
static int tegra_pcm_close(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ struct tegra_runtime_data *tegra_prtd;
if (rtd->dai_link->no_pcm)
return 0;
+ tegra_prtd =
+ (struct tegra_runtime_data *)snd_dmaengine_pcm_get_data(
+ substream);
+ kfree(tegra_prtd);
+
+ snd_dmaengine_pcm_set_data(substream, NULL);
snd_dmaengine_pcm_close_release_chan(substream);
+
return 0;
}