diff mbox series

[100/113] ASoC: codecs: idt821034: use snd_pcm_is_playback/capture()

Message ID 874j7zx0hu.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State New
Headers show
Series ALSA: add snd_pcm_is_playback/capture() macro | expand

Commit Message

Kuninori Morimoto Aug. 5, 2024, 12:43 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/codecs/idt821034.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/codecs/idt821034.c b/sound/soc/codecs/idt821034.c
index cb7a68c799f8f..82279f6d3ce84 100644
--- a/sound/soc/codecs/idt821034.c
+++ b/sound/soc/codecs/idt821034.c
@@ -839,7 +839,7 @@  static int idt821034_dai_startup(struct snd_pcm_substream *substream,
 	unsigned int max_ch = 0;
 	int ret;
 
-	max_ch = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
+	max_ch = snd_pcm_is_playback(substream) ?
 		idt821034->max_ch_playback : idt821034->max_ch_capture;
 
 	/*