diff mbox series

[078/113] ASoC: codecs: ad193x: use snd_pcm_is_playback/capture()

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

Patch

diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c
index 1d3c4d94b4ae9..34c309c0d96ff 100644
--- a/sound/soc/codecs/ad193x.c
+++ b/sound/soc/codecs/ad193x.c
@@ -316,7 +316,7 @@  static int ad193x_hw_params(struct snd_pcm_substream *substream,
 	int word_len = 0, master_rate = 0;
 	struct snd_soc_component *component = dai->component;
 	struct ad193x_priv *ad193x = snd_soc_component_get_drvdata(component);
-	bool is_playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
+	bool is_playback = snd_pcm_is_playback(substream);
 	u8 dacc0;
 
 	dev_dbg(dai->dev, "%s() rate=%u format=%#x width=%u channels=%u\n",