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

diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 3e3a62df3d7e3..2a3d8038d4362 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -489,7 +489,7 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
 	}
 
 	/* Tx/Rx config */
-	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+	if (snd_pcm_is_playback(substream)) {
 		/* enable TX mode */
 		scr &= ~BM_SAIF_CTRL_READ_MODE;
 	} else {
@@ -560,7 +560,7 @@ static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd,
 			__raw_writel(BM_SAIF_CTRL_RUN,
 				master_saif->base + SAIF_CTRL + MXS_SET_ADDR);
 
-		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+		if (snd_pcm_is_playback(substream)) {
 			/*
 			 * write data to saif data register to trigger
 			 * the transfer.
-- 
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