diff mbox series

[082/113] ASoC: codecs: sta529: use snd_pcm_is_playback/capture()

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

Patch

diff --git a/sound/soc/codecs/sta529.c b/sound/soc/codecs/sta529.c
index f7718491c8996..e750536b1f740 100644
--- a/sound/soc/codecs/sta529.c
+++ b/sound/soc/codecs/sta529.c
@@ -232,7 +232,7 @@  static int sta529_hw_params(struct snd_pcm_substream *substream,
 		return -EINVAL;
 	}
 
-	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+	if (snd_pcm_is_playback(substream)) {
 		snd_soc_component_update_bits(component, STA529_S2PCFG1, PDATA_LEN_MSK,
 				pdata << 6);
 		snd_soc_component_update_bits(component, STA529_S2PCFG1, BCLK_TO_FS_MSK,