summaryrefslogtreecommitdiffstats
path: root/sound/soc/sti
diff options
context:
space:
mode:
authorArnaud Pouliquen <arnaud.pouliquen@st.com>2017-03-23 19:39:54 +0100
committerMark Brown <broonie@kernel.org>2017-03-24 18:44:07 +0000
commit3c9d3f1bc2defd418b5933bbc928096c9c686d3b (patch)
tree8cffdd8b37941fa453bcb23c096bd3a71ee2aa4a /sound/soc/sti
parenta5de5b74a50113564a1e0850e2da96c37c35e55d (diff)
downloadlinux-3c9d3f1bc2defd418b5933bbc928096c9c686d3b.tar.gz
linux-3c9d3f1bc2defd418b5933bbc928096c9c686d3b.tar.bz2
linux-3c9d3f1bc2defd418b5933bbc928096c9c686d3b.zip
ASoC: STI: Fix reader substream pointer set
reader->substream is used in IRQ handler for error case but is never set. Set value to pcm substream on DAI startup and clean it on dai shutdown. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sti')
-rw-r--r--sound/soc/sti/uniperif_reader.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/sti/uniperif_reader.c b/sound/soc/sti/uniperif_reader.c
index 5992c6ab3833..93a8df6ed880 100644
--- a/sound/soc/sti/uniperif_reader.c
+++ b/sound/soc/sti/uniperif_reader.c
@@ -349,6 +349,8 @@ static int uni_reader_startup(struct snd_pcm_substream *substream,
struct uniperif *reader = priv->dai_data.uni;
int ret;
+ reader->substream = substream;
+
if (!UNIPERIF_TYPE_IS_TDM(reader))
return 0;
@@ -378,6 +380,7 @@ static void uni_reader_shutdown(struct snd_pcm_substream *substream,
/* Stop the reader */
uni_reader_stop(reader);
}
+ reader->substream = NULL;
}
static const struct snd_soc_dai_ops uni_reader_dai_ops = {