[PATCH 052/113] ASoC: sti: 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/sti/sti_uniperif.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/sti/sti_uniperif.c b/sound/soc/sti/sti_uniperif.c
index ba824f14a39cf..75520b8827ca1 100644
--- a/sound/soc/sti/sti_uniperif.c
+++ b/sound/soc/sti/sti_uniperif.c
@@ -337,7 +337,7 @@ static int sti_uniperiph_resume(struct snd_soc_component *component)
 	struct uniperif *uni = priv->dai_data.uni;
 	int ret;
 
-	if (priv->dai_data.stream == SNDRV_PCM_STREAM_PLAYBACK) {
+	if (snd_pcm_is_playback(priv->dai_data.stream)) {
 		ret = uni_player_resume(uni);
 		if (ret)
 			return ret;
@@ -358,7 +358,7 @@ static int sti_uniperiph_dai_probe(struct snd_soc_dai *dai)
 	struct sti_uniperiph_dai *dai_data = &priv->dai_data;
 
 	/* DMA settings*/
-	if (priv->dai_data.stream == SNDRV_PCM_STREAM_PLAYBACK)
+	if (snd_pcm_is_playback(priv->dai_data.stream))
 		snd_soc_dai_init_dma_data(dai, &dai_data->dma_data, NULL);
 	else
 		snd_soc_dai_init_dma_data(dai, NULL, &dai_data->dma_data);
@@ -440,7 +440,7 @@ static int sti_uniperiph_cpu_dai_of(struct device_node *node,
 	dai_data->uni = uni;
 	dai_data->stream = dev_data->stream;
 
-	if (priv->dai_data.stream == SNDRV_PCM_STREAM_PLAYBACK) {
+	if (snd_pcm_is_playback(priv->dai_data.stream)) {
 		ret = uni_player_init(priv->pdev, uni);
 		stream = &dai->playback;
 	} else {
-- 
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