diff mbox series

[111/113] ASoC: uniphier: use snd_pcm_is_playback/capture()

Message ID 87o767vlw5.wl-kuninori.morimoto.gx@renesas.com
State New
Headers show
Series ALSA: add snd_pcm_is_playback/capture() macro | expand

Commit Message

Kuninori Morimoto Aug. 5, 2024, 12:44 a.m. UTC
We can use snd_pcm_is_playback/capture(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/uniphier/aio-cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/uniphier/aio-cpu.c b/sound/soc/uniphier/aio-cpu.c
index 470f129166a4c..8207e8fed2a80 100644
--- a/sound/soc/uniphier/aio-cpu.c
+++ b/sound/soc/uniphier/aio-cpu.c
@@ -64,12 +64,12 @@  static struct uniphier_aio_sub *find_volume(struct uniphier_aio_chip *chip,
 static bool match_spec(const struct uniphier_aio_spec *spec,
 		       const char *name, int dir)
 {
-	if (dir == SNDRV_PCM_STREAM_PLAYBACK &&
+	if (snd_pcm_is_playback(dir) &&
 	    spec->swm.dir != PORT_DIR_OUTPUT) {
 		return false;
 	}
 
-	if (dir == SNDRV_PCM_STREAM_CAPTURE &&
+	if (snd_pcm_is_capture(dir) &&
 	    spec->swm.dir != PORT_DIR_INPUT) {
 		return false;
 	}