1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00

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: 090349a9fe ("ASoC: SOF: Add support for compress API for stream data/offset")
Cc: stable@vger.kernel.org
Reported-by: Curtis Malainey <cujomalainey@chromium.org>
Closes: https://github.com/thesofproject/linux/pull/5214
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Link: https://patch.msgid.link/20250205135232.19762-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Peter Ujfalusi 2025-02-05 15:52:32 +02:00 committed by Mark Brown
parent d8d99c3b5c
commit 46c7b901e2
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0

View file

@ -511,6 +511,8 @@ static int sof_pcm_close(struct snd_soc_component *component,
*/
}
spcm->stream[substream->stream].substream = NULL;
return 0;
}