diff mbox series

[019/113] ALSA: pci: au88x0: use snd_pcm_is_playback/capture()

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

Commit Message

Kuninori Morimoto Aug. 5, 2024, 12:36 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/pci/au88x0/au88x0_core.c | 2 +-
 sound/pci/au88x0/au88x0_pcm.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c
index e5d8676373368..192b5fe0d54d7 100644
--- a/sound/pci/au88x0/au88x0_core.c
+++ b/sound/pci/au88x0/au88x0_core.c
@@ -2132,7 +2132,7 @@  vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir,
 	stream->type = type;
 
 	/* PLAYBACK ROUTES. */
-	if (dir == SNDRV_PCM_STREAM_PLAYBACK) {
+	if (snd_pcm_is_playback(dir)) {
 		int src[4], mix[4], ch_top;
 #ifndef CHIP_AU8820
 		int a3d = 0;
diff --git a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c
index 546f712206040..53000e486986c 100644
--- a/sound/pci/au88x0/au88x0_pcm.c
+++ b/sound/pci/au88x0/au88x0_pcm.c
@@ -167,7 +167,7 @@  static int snd_vortex_pcm_open(struct snd_pcm_substream *substream)
 		    || VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_I2S)
 			runtime->hw = snd_vortex_playback_hw_adb;
 #ifdef CHIP_AU8830
-		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
+		if (snd_pcm_is_playback(substream) &&
 			VORTEX_IS_QUAD(vortex) &&
 			VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) {
 			runtime->hw.channels_max = 4;
@@ -308,7 +308,7 @@  static int snd_vortex_pcm_prepare(struct snd_pcm_substream *substream)
 	int dma = stream->dma, fmt, dir;
 
 	// set up the hardware with the current configuration.
-	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+	if (snd_pcm_is_playback(substream))
 		dir = 1;
 	else
 		dir = 0;