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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We can use snd_pcm_is_playback/capture(). Let's use it.

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

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;
 	}
-- 
2.43.0





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux