Skip to content

Commit 3c9d3f1

Browse files
arnopobroonie
authored andcommitted
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent a5de5b7 commit 3c9d3f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sound/soc/sti/uniperif_reader.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,8 @@ static int uni_reader_startup(struct snd_pcm_substream *substream,
349349
struct uniperif *reader = priv->dai_data.uni;
350350
int ret;
351351

352+
reader->substream = substream;
353+
352354
if (!UNIPERIF_TYPE_IS_TDM(reader))
353355
return 0;
354356

@@ -378,6 +380,7 @@ static void uni_reader_shutdown(struct snd_pcm_substream *substream,
378380
/* Stop the reader */
379381
uni_reader_stop(reader);
380382
}
383+
reader->substream = NULL;
381384
}
382385

383386
static const struct snd_soc_dai_ops uni_reader_dai_ops = {

0 commit comments

Comments
 (0)