ASoC: fsl: use snd_soc_xxx_active()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 15 May 2020 00:47:17 +0000 (09:47 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 18 May 2020 15:15:08 +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/87v9ky58iy.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_esai.c
sound/soc/fsl/fsl_spdif.c

index bac65ba..cbcb70d 100644 (file)
@@ -514,7 +514,7 @@ static int fsl_esai_startup(struct snd_pcm_substream *substream,
 {
        struct fsl_esai *esai_priv = snd_soc_dai_get_drvdata(dai);
 
-       if (!dai->active) {
+       if (!snd_soc_dai_active(dai)) {
                /* Set synchronous mode */
                regmap_update_bits(esai_priv->regmap, REG_ESAI_SAICR,
                                   ESAI_SAICR_SYNC, esai_priv->synchronous ?
index c711d2d..1b2e516 100644 (file)
@@ -466,7 +466,7 @@ static int fsl_spdif_startup(struct snd_pcm_substream *substream,
        int ret;
 
        /* Reset module and interrupts only for first initialization */
-       if (!cpu_dai->active) {
+       if (!snd_soc_dai_active(cpu_dai)) {
                ret = clk_prepare_enable(spdif_priv->coreclk);
                if (ret) {
                        dev_err(&pdev->dev, "failed to enable core clock\n");
@@ -554,7 +554,7 @@ static void fsl_spdif_shutdown(struct snd_pcm_substream *substream,
        regmap_update_bits(regmap, REG_SPDIF_SCR, mask, scr);
 
        /* Power down SPDIF module only if tx&rx are both inactive */
-       if (!cpu_dai->active) {
+       if (!snd_soc_dai_active(cpu_dai)) {
                spdif_intr_status_clear(spdif_priv);
                regmap_update_bits(regmap, REG_SPDIF_SCR,
                                SCR_LOW_POWER, SCR_LOW_POWER);