ASoC: mediatek: use snd_soc_xxx_active()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 15 May 2020 00:47:31 +0000 (09:47 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 18 May 2020 15:15:11 +0000 (16:15 +0100)
We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87r1vm58ik.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c

index 1e3f2d7860666e9c6a5a1dde987da2d126881a39..1cc044425a9e52e99859180c3cc0fa95593004d0 100644 (file)
@@ -297,7 +297,7 @@ static int mt8173_afe_i2s_startup(struct snd_pcm_substream *substream,
 {
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
 
-       if (dai->active)
+       if (snd_soc_dai_active(dai))
                return 0;
 
        regmap_update_bits(afe->regmap, AUDIO_TOP_CON0,
@@ -310,7 +310,7 @@ static void mt8173_afe_i2s_shutdown(struct snd_pcm_substream *substream,
 {
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
 
-       if (dai->active)
+       if (snd_soc_dai_active(dai))
                return;
 
        mt8173_afe_set_i2s_enable(afe, false);
@@ -347,7 +347,7 @@ static int mt8173_afe_hdmi_startup(struct snd_pcm_substream *substream,
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
        struct mt8173_afe_private *afe_priv = afe->platform_priv;
 
-       if (dai->active)
+       if (snd_soc_dai_active(dai))
                return 0;
 
        mt8173_afe_dais_enable_clks(afe, afe_priv->clocks[MT8173_CLK_I2S3_M],
@@ -361,7 +361,7 @@ static void mt8173_afe_hdmi_shutdown(struct snd_pcm_substream *substream,
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
        struct mt8173_afe_private *afe_priv = afe->platform_priv;
 
-       if (dai->active)
+       if (snd_soc_dai_active(dai))
                return;
 
        mt8173_afe_dais_disable_clks(afe, afe_priv->clocks[MT8173_CLK_I2S3_M],