diff mbox series

[052/113] ASoC: sti: use snd_pcm_is_playback/capture()

Message ID 871q33ztts.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:39 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/sti/sti_uniperif.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

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 {