summaryrefslogtreecommitdiff
path: root/sound/soc/pxa
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2018-10-03 21:36:27 +0200
committerMark Brown <broonie@kernel.org>2018-10-04 11:41:38 +0100
commitcfe9ee5f2b7808ceec21df83a45e38afcc647153 (patch)
tree01a5c9cac0eee8fdd7604c8ab0fbd4239c27099d /sound/soc/pxa
parent8e9f7265eda9f3a662ca1ca47a69042a7840735b (diff)
ASoC: pxa-ssp: enable and disable extclk if given
If a "extclk" clock is given, enable and disable it when appropriate. Signed-off-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r--sound/soc/pxa/pxa-ssp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 69033e1a84e6..adcf8ba9d287 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -103,6 +103,9 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream,
pxa_ssp_disable(ssp);
}
+ if (priv->extclk)
+ clk_prepare_enable(priv->extclk);
+
dma = kzalloc(sizeof(struct snd_dmaengine_dai_dma_data), GFP_KERNEL);
if (!dma)
return -ENOMEM;
@@ -125,6 +128,9 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream,
clk_disable_unprepare(ssp->clk);
}
+ if (priv->extclk)
+ clk_disable_unprepare(priv->extclk);
+
kfree(snd_soc_dai_get_dma_data(cpu_dai, substream));
snd_soc_dai_set_dma_data(cpu_dai, substream, NULL);
}