]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: sof: intel: use snd_pcm_direction_name()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 30 Jul 2024 02:05:53 +0000 (02:05 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 1 Aug 2024 13:54:50 +0000 (14:54 +0100)
We already have snd_pcm_direction_name(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87le1jk51b.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-stream.c

index 8213debde497c8fa2d71e7b203322d3a3c66b074..3ac63ce67ab1ceb837490a08e56c9cc9524bdd7d 100644 (file)
@@ -216,9 +216,7 @@ hda_dsp_stream_get(struct snd_sof_dev *sdev, int direction, u32 flags)
 
        /* stream found ? */
        if (!hext_stream) {
-               dev_err(sdev->dev, "error: no free %s streams\n",
-                       direction == SNDRV_PCM_STREAM_PLAYBACK ?
-                       "playback" : "capture");
+               dev_err(sdev->dev, "error: no free %s streams\n", snd_pcm_direction_name(direction));
                return hext_stream;
        }