diff mbox series

[097/113] ASoC: codecs: sgtl5000: use snd_pcm_is_playback/capture()

Message ID 878qxbx0i7.wl-kuninori.morimoto.gx@renesas.com
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/sgtl5000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 7aa89e34657ea..5b2544e05db7e 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1061,7 +1061,7 @@  static int sgtl5000_pcm_hw_params(struct snd_pcm_substream *substream,
 		return -EFAULT;
 	}
 
-	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+	if (snd_pcm_is_playback(substream))
 		stereo = SGTL5000_DAC_STEREO;
 	else
 		stereo = SGTL5000_ADC_STEREO;