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

diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index 4f8fdd574585b..7ef7b5fc927f2 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -556,7 +556,7 @@ static int uda1380_pcm_hw_params(struct snd_pcm_substream *substream,
 		uda1380_write(component, UDA1380_PM, R02_PON_PLL | pm);
 	}
 
-	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+	if (snd_pcm_is_playback(substream))
 		clk |= R00_EN_DAC | R00_EN_INT;
 	else
 		clk |= R00_EN_ADC | R00_EN_DEC;
@@ -577,7 +577,7 @@ static void uda1380_pcm_shutdown(struct snd_pcm_substream *substream,
 		uda1380_write(component, UDA1380_PM, ~R02_PON_PLL & pm);
 	}
 
-	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+	if (snd_pcm_is_playback(substream))
 		clk &= ~(R00_EN_DAC | R00_EN_INT);
 	else
 		clk &= ~(R00_EN_ADC | R00_EN_DEC);
-- 
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