diff mbox series

[089/113] ASoC: codecs: adav80x: use snd_pcm_is_playback/capture()

Message ID 87jzgvx0j8.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:42 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/adav80x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index c8c0fc9282116..21d20cb42d200 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -521,7 +521,7 @@  static int adav80x_hw_params(struct snd_pcm_substream *substream,
 	if (rate * 256 != adav80x->sysclk)
 		return -EINVAL;
 
-	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+	if (snd_pcm_is_playback(substream)) {
 		adav80x_set_playback_pcm_format(component, dai, params);
 		adav80x_set_dac_clock(component, rate);
 	} else {