diff mbox series

[083/113] ASoC: codecs: rk3308: use snd_pcm_is_playback/capture()

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

Patch

diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_codec.c
index 8b51e87a17115..7a36cffc4f3be 100644
--- a/sound/soc/codecs/rk3308_codec.c
+++ b/sound/soc/codecs/rk3308_codec.c
@@ -674,7 +674,7 @@  static int rk3308_codec_hw_params(struct snd_pcm_substream *substream,
 	struct snd_soc_component *component = dai->component;
 	struct rk3308_codec_priv *rk3308 = snd_soc_component_get_drvdata(component);
 
-	return (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
+	return (snd_pcm_is_playback(substream)) ?
 		rk3308_codec_dac_dig_config(rk3308, params) :
 		rk3308_codec_adc_dig_config(rk3308, params);
 }