Skip to content

Commit e8b4eb5

Browse files
ujfalusigregkh
authored andcommitted
ASoC: SOF: pcm: Clear the susbstream pointer to NULL on close
commit 46c7b901e2a03536df5a3cb40b3b26e2be505df6 upstream. The spcm->stream[substream->stream].substream is set during open and was left untouched. After the first PCM stream it will never be NULL and we have code which checks for substream NULLity as indication if the stream is active or not. For the compressed cstream pointer the same has been done, this change will correct the handling of PCM streams. Fixes: 090349a ("ASoC: SOF: Add support for compress API for stream data/offset") Cc: [email protected] Reported-by: Curtis Malainey <[email protected]> Closes: thesofproject/linux#5214 Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Curtis Malainey <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1cce98b commit e8b4eb5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/soc/sof/pcm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,8 @@ static int sof_pcm_close(struct snd_soc_component *component,
511511
*/
512512
}
513513

514+
spcm->stream[substream->stream].substream = NULL;
515+
514516
return 0;
515517
}
516518

0 commit comments

Comments
 (0)