diff mbox series

[104/113] ASoC: codecs: framer-codec: use snd_pcm_is_playback/capture()

Message ID 87y15bvlwy.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State New, archived
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/framer-codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/codecs/framer-codec.c b/sound/soc/codecs/framer-codec.c
index 6f57a3aeecc89..10ad78e87a7cd 100644
--- a/sound/soc/codecs/framer-codec.c
+++ b/sound/soc/codecs/framer-codec.c
@@ -192,7 +192,7 @@  static int framer_dai_startup(struct snd_pcm_substream *substream,
 	u64 format;
 	int ret;
 
-	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
+	if (snd_pcm_is_capture(substream)) {
 		format = framer_formats(framer->max_chan_capture);
 		hw_rule_channels_by_format = framer_dai_hw_rule_capture_channels_by_format;
 		hw_rule_format_by_channels = framer_dai_hw_rule_capture_format_by_channels;