Commit 3c9d3f1b authored by Arnaud Pouliquen's avatar Arnaud Pouliquen Committed by Mark Brown

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: default avatarArnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent a5de5b74
...@@ -349,6 +349,8 @@ static int uni_reader_startup(struct snd_pcm_substream *substream, ...@@ -349,6 +349,8 @@ static int uni_reader_startup(struct snd_pcm_substream *substream,
struct uniperif *reader = priv->dai_data.uni; struct uniperif *reader = priv->dai_data.uni;
int ret; int ret;
reader->substream = substream;
if (!UNIPERIF_TYPE_IS_TDM(reader)) if (!UNIPERIF_TYPE_IS_TDM(reader))
return 0; return 0;
...@@ -378,6 +380,7 @@ static void uni_reader_shutdown(struct snd_pcm_substream *substream, ...@@ -378,6 +380,7 @@ static void uni_reader_shutdown(struct snd_pcm_substream *substream,
/* Stop the reader */ /* Stop the reader */
uni_reader_stop(reader); uni_reader_stop(reader);
} }
reader->substream = NULL;
} }
static const struct snd_soc_dai_ops uni_reader_dai_ops = { static const struct snd_soc_dai_ops uni_reader_dai_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment