From 82e3265487c018814b789e251fb8aee8e683674c Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Fri, 13 Feb 2026 19:24:34 +0200 Subject: [PATCH] ASoC: renesas: rz-ssi: Fix playback and capture In the current codebase the rz_ssi_stream_get() is called at the beginning of rz_ssi_dai_trigger() before rz_ssi_stream_init() is called. Since rz_ssi_stream_init() sets the ssi->{playback, capture}->substream, relying on it in rz_ssi_stream_get() is incorrect. Fix this by checking substream->stream instead as the original code did. Fixes: 53dfb2ad6fcf ("ASoC: renesas: rz-ssi: Simplify the logic in rz_ssi_stream_is_play()") Signed-off-by: Claudiu Beznea Link: https://patch.msgid.link/20260213172434.3801015-1-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown --- sound/soc/renesas/rz-ssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 39aa865bdca3..74e078c04150 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -180,7 +180,7 @@ static inline bool rz_ssi_stream_is_play(struct snd_pcm_substream *substream) static inline struct rz_ssi_stream * rz_ssi_stream_get(struct rz_ssi_priv *ssi, struct snd_pcm_substream *substream) { - return (ssi->playback.substream == substream) ? &ssi->playback : &ssi->capture; + return (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? &ssi->playback : &ssi->capture; } static inline bool rz_ssi_is_dma_enabled(struct rz_ssi_priv *ssi)