Commit aaeb5fb5 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: pxa: use snd_soc_xxx_active()

We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87o8qq58ia.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1f79aab5
...@@ -94,7 +94,7 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream, ...@@ -94,7 +94,7 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream,
struct snd_dmaengine_dai_dma_data *dma; struct snd_dmaengine_dai_dma_data *dma;
int ret = 0; int ret = 0;
if (!cpu_dai->active) { if (!snd_soc_dai_active(cpu_dai)) {
clk_prepare_enable(ssp->clk); clk_prepare_enable(ssp->clk);
pxa_ssp_disable(ssp); pxa_ssp_disable(ssp);
} }
...@@ -119,7 +119,7 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream, ...@@ -119,7 +119,7 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream,
struct ssp_priv *priv = snd_soc_dai_get_drvdata(cpu_dai); struct ssp_priv *priv = snd_soc_dai_get_drvdata(cpu_dai);
struct ssp_device *ssp = priv->ssp; struct ssp_device *ssp = priv->ssp;
if (!cpu_dai->active) { if (!snd_soc_dai_active(cpu_dai)) {
pxa_ssp_disable(ssp); pxa_ssp_disable(ssp);
clk_disable_unprepare(ssp->clk); clk_disable_unprepare(ssp->clk);
} }
...@@ -138,7 +138,7 @@ static int pxa_ssp_suspend(struct snd_soc_component *component) ...@@ -138,7 +138,7 @@ static int pxa_ssp_suspend(struct snd_soc_component *component)
struct ssp_priv *priv = snd_soc_component_get_drvdata(component); struct ssp_priv *priv = snd_soc_component_get_drvdata(component);
struct ssp_device *ssp = priv->ssp; struct ssp_device *ssp = priv->ssp;
if (!component->active) if (!snd_soc_component_active(component))
clk_prepare_enable(ssp->clk); clk_prepare_enable(ssp->clk);
priv->cr0 = __raw_readl(ssp->mmio_base + SSCR0); priv->cr0 = __raw_readl(ssp->mmio_base + SSCR0);
...@@ -165,7 +165,7 @@ static int pxa_ssp_resume(struct snd_soc_component *component) ...@@ -165,7 +165,7 @@ static int pxa_ssp_resume(struct snd_soc_component *component)
__raw_writel(priv->to, ssp->mmio_base + SSTO); __raw_writel(priv->to, ssp->mmio_base + SSTO);
__raw_writel(priv->psp, ssp->mmio_base + SSPSP); __raw_writel(priv->psp, ssp->mmio_base + SSPSP);
if (component->active) if (snd_soc_component_active(component))
pxa_ssp_enable(ssp); pxa_ssp_enable(ssp);
else else
clk_disable_unprepare(ssp->clk); clk_disable_unprepare(ssp->clk);
......
...@@ -101,7 +101,7 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream, ...@@ -101,7 +101,7 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
if (IS_ERR(clk_i2s)) if (IS_ERR(clk_i2s))
return PTR_ERR(clk_i2s); return PTR_ERR(clk_i2s);
if (!cpu_dai->active) if (!snd_soc_dai_active(cpu_dai))
SACR0 = 0; SACR0 = 0;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment