diff mbox series

[057/113] ASoC: sprd: use snd_pcm_is_playback/capture()

Message ID 87ttfzyf8p.wl-kuninori.morimoto.gx@renesas.com
State New
Headers show
Series [001/113] 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/sprd/sprd-pcm-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/sprd/sprd-pcm-dma.c b/sound/soc/sprd/sprd-pcm-dma.c
index d6b96cc2f7087..b7149322b9858 100644
--- a/sound/soc/sprd/sprd-pcm-dma.c
+++ b/sound/soc/sprd/sprd-pcm-dma.c
@@ -195,7 +195,7 @@  static int sprd_pcm_hw_params(struct snd_soc_component *component,
 	size_t totsize = params_buffer_bytes(params);
 	size_t period = params_period_bytes(params);
 	int channels = params_channels(params);
-	int is_playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
+	int is_playback = snd_pcm_is_playback(substream);
 	struct scatterlist *sg;
 	unsigned long flags;
 	int ret, i, j, sg_num;