[PATCH 045/113] ASoC: adi: 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/adi/axi-i2s.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux