Commit b89e2291 authored by Arnaud Pouliquen's avatar Arnaud Pouliquen Committed by Greg Kroah-Hartman

ASoC: STI: Fix reader substream pointer set


[ Upstream commit 3c9d3f1b ]

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>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 347848e0
......@@ -364,6 +364,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;
......@@ -393,6 +395,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 = {
......
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