Skip to content

Commit bdc4bda

Browse files
ujfalusibardliao
authored andcommitted
ASoC: SOF: pcm: Clear the susbstream pointer to NULL on close
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: ef8ba9f ("ASoC: SOF: Add support for compress API for stream data/offset") Cc: stable@vger.kernel.org Reported-by: Curtis Malainey <cujomalainey@chromium.org> Closes: #5214 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 1d6fc47 commit bdc4bda

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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)