Skip to content

Commit

Permalink
ASoC: SOF: pcm: Clear the susbstream pointer to NULL on close
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
  • Loading branch information
ujfalusi committed Nov 1, 2024
1 parent 0202a15 commit 43e852f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/sof/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,8 @@ static int sof_pcm_close(struct snd_soc_component *component,
*/
}

spcm->stream[substream->stream].substream = NULL;

return 0;
}

Expand Down

0 comments on commit 43e852f

Please sign in to comment.