]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ASoC: STI: Fix reader substream pointer set
authorArnaud Pouliquen <arnaud.pouliquen@st.com>
Thu, 23 Mar 2017 18:39:54 +0000 (19:39 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 24 Mar 2017 18:44:07 +0000 (18:44 +0000)
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>
sound/soc/sti/uniperif_reader.c

index 5992c6ab3833ef60c15e21656fd7f5731b43c2d3..93a8df6ed880ea8cc32b62f94ab0b44befbe06ef 100644 (file)
@@ -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 = {