]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ASoC: rsnd: tidyup direction name on rsnd_dai_connect()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 26 Aug 2025 06:30:01 +0000 (06:30 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 28 Aug 2025 09:08:19 +0000 (11:08 +0200)
commit 2c6b6a3e8b93 ("ASoC: rsnd: use snd_pcm_direction_name()") uses
snd_pcm_direction_name() instead of original method to get string
"Playback" or "Capture". But io->substream might be NULL in this timing.
Let's re-use original method.

Fixes: 2c6b6a3e8b93 ("ASoC: rsnd: use snd_pcm_direction_name()")
Reported-by: Thuan Nguyen <thuan.nguyen-hong@banvien.com.vn>
Tested-by: Thuan Nguyen <thuan.nguyen-hong@banvien.com.vn>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-ID: <87zfbmwq6v.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/renesas/rcar/core.c

index 37d954495ea5a9a1876009bff44fd271aba1b657..9f086906a2e5c6bc13ead9c8b5bb53fda39da3a5 100644 (file)
@@ -597,7 +597,7 @@ int rsnd_dai_connect(struct rsnd_mod *mod,
 
        dev_dbg(dev, "%s is connected to io (%s)\n",
                rsnd_mod_name(mod),
-               snd_pcm_direction_name(io->substream->stream));
+               rsnd_io_is_play(io) ? "Playback" : "Capture");
 
        return 0;
 }