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>
This commit is contained in:
Родитель
8e9f7265ed
Коммит
cfe9ee5f2b
|
@ -103,6 +103,9 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream,
|
||||||
pxa_ssp_disable(ssp);
|
pxa_ssp_disable(ssp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (priv->extclk)
|
||||||
|
clk_prepare_enable(priv->extclk);
|
||||||
|
|
||||||
dma = kzalloc(sizeof(struct snd_dmaengine_dai_dma_data), GFP_KERNEL);
|
dma = kzalloc(sizeof(struct snd_dmaengine_dai_dma_data), GFP_KERNEL);
|
||||||
if (!dma)
|
if (!dma)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -125,6 +128,9 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream,
|
||||||
clk_disable_unprepare(ssp->clk);
|
clk_disable_unprepare(ssp->clk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (priv->extclk)
|
||||||
|
clk_disable_unprepare(priv->extclk);
|
||||||
|
|
||||||
kfree(snd_soc_dai_get_dma_data(cpu_dai, substream));
|
kfree(snd_soc_dai_get_dma_data(cpu_dai, substream));
|
||||||
snd_soc_dai_set_dma_data(cpu_dai, substream, NULL);
|
snd_soc_dai_set_dma_data(cpu_dai, substream, NULL);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче