diff mbox series

[045/113] ASoC: adi: use snd_pcm_is_playback/capture()

Message ID 87bk27ztuu.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:38 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/adi/axi-i2s.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/adi/axi-i2s.c b/sound/soc/adi/axi-i2s.c
index 7b25630757436..7c950a7b71eec 100644
--- a/sound/soc/adi/axi-i2s.c
+++ b/sound/soc/adi/axi-i2s.c
@@ -60,7 +60,7 @@  static int axi_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
 	struct axi_i2s *i2s = snd_soc_dai_get_drvdata(dai);
 	unsigned int mask, val;
 
-	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
+	if (snd_pcm_is_capture(substream))
 		mask = AXI_I2S_CTRL_RX_EN;
 	else
 		mask = AXI_I2S_CTRL_TX_EN;
@@ -110,7 +110,7 @@  static int axi_i2s_startup(struct snd_pcm_substream *substream,
 	uint32_t mask;
 	int ret;
 
-	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
+	if (snd_pcm_is_capture(substream))
 		mask = AXI_I2S_RESET_RX_FIFO;
 	else
 		mask = AXI_I2S_RESET_TX_FIFO;