diff mbox series

[088/113] ASoC: codecs: sma1303: use snd_pcm_is_playback/capture()

Message ID 87le1bx0jd.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/sma1303.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/codecs/sma1303.c b/sound/soc/codecs/sma1303.c
index 980c48cbc3482..4da80cbab7946 100644
--- a/sound/soc/codecs/sma1303.c
+++ b/sound/soc/codecs/sma1303.c
@@ -997,7 +997,7 @@  static int sma1303_dai_hw_params_amp(struct snd_pcm_substream *substream,
 			__func__, params_rate(params), params_width(params),
 			params_channels(params));
 
-	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+	if (snd_pcm_is_playback(substream)) {
 		if (sma1303->sys_clk_id == SMA1303_PLL_CLKIN_BCLK) {
 			if (sma1303->last_bclk != bclk) {
 				sma1303_setup_pll(component, bclk);
@@ -1195,7 +1195,7 @@  static int sma1303_dai_mute(struct snd_soc_dai *dai, int mute, int stream)
 	struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component);
 	int ret = 0;
 
-	if (stream == SNDRV_PCM_STREAM_CAPTURE)
+	if (snd_pcm_is_capture(stream))
 		return ret;
 
 	if (mute) {