Commit 026384d6 authored by Daniel Mack's avatar Daniel Mack Committed by Mark Brown

ASoC: fix PXA SSP port resume

Unconditionally save the register states when suspending and restore
them again at resume time. Register contents were not preserved over
suspend, and hence the driver takes false assumptions about them.

The clock must be enabled to access the register block.
Signed-off-by: default avatarDaniel Mack <daniel@caiaq.de>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 59cdd9bc
......@@ -135,10 +135,11 @@ static int pxa_ssp_suspend(struct snd_soc_dai *cpu_dai)
struct ssp_priv *priv = cpu_dai->private_data;
if (!cpu_dai->active)
return 0;
clk_enable(priv->dev.ssp->clk);
ssp_save_state(&priv->dev, &priv->state);
clk_disable(priv->dev.ssp->clk);
return 0;
}
......@@ -146,12 +147,13 @@ static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai)
{
struct ssp_priv *priv = cpu_dai->private_data;
if (!cpu_dai->active)
return 0;
clk_enable(priv->dev.ssp->clk);
ssp_restore_state(&priv->dev, &priv->state);
if (cpu_dai->active)
ssp_enable(&priv->dev);
else
clk_disable(priv->dev.ssp->clk);
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