diff options
author | Philipp Zabel <philipp.zabel@gmail.com> | 2009-02-03 15:18:26 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-02-04 08:17:22 -0500 |
commit | 0664678a84c653bde844c7d91646259a25c6188b (patch) | |
tree | 1c35706bca8416d56ec76e2ca3f51bc7717fc558 /sound/soc/pxa/pxa-ssp.c | |
parent | 5b2474425ed2a625b75dcd8d648701e473b7d764 (diff) |
ASoC: pxa-ssp: fix SSP port request
PXA2xx/3xx SSP ports start from 1, not 0. Thus, the probe function
requested the wrong SSP port. Correcting this unveiled another bug
where ssp_init tries to request the already-requested SSP port again.
So this patch replaces the ssp_init/exit calls with their internals
from mach-pxa/ssp.c, leaving out the redundant ssp_request and the
unneeded IRQ request. Effectively, that leaves us with not much more
than enabling/disabling the SSP clock.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/pxa/pxa-ssp.c')
-rw-r--r-- | sound/soc/pxa/pxa-ssp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index 73cb6b4c2f2d..4a973ab710be 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | 23 | ||
24 | #include <asm/irq.h> | ||
25 | |||
24 | #include <sound/core.h> | 26 | #include <sound/core.h> |
25 | #include <sound/pcm.h> | 27 | #include <sound/pcm.h> |
26 | #include <sound/initval.h> | 28 | #include <sound/initval.h> |
@@ -221,9 +223,9 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream, | |||
221 | int ret = 0; | 223 | int ret = 0; |
222 | 224 | ||
223 | if (!cpu_dai->active) { | 225 | if (!cpu_dai->active) { |
224 | ret = ssp_init(&priv->dev, cpu_dai->id + 1, SSP_NO_IRQ); | 226 | priv->dev.port = cpu_dai->id + 1; |
225 | if (ret < 0) | 227 | priv->dev.irq = NO_IRQ; |
226 | return ret; | 228 | clk_enable(priv->dev.ssp->clk); |
227 | ssp_disable(&priv->dev); | 229 | ssp_disable(&priv->dev); |
228 | } | 230 | } |
229 | return ret; | 231 | return ret; |
@@ -238,7 +240,7 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream, | |||
238 | 240 | ||
239 | if (!cpu_dai->active) { | 241 | if (!cpu_dai->active) { |
240 | ssp_disable(&priv->dev); | 242 | ssp_disable(&priv->dev); |
241 | ssp_exit(&priv->dev); | 243 | clk_disable(priv->dev.ssp->clk); |
242 | } | 244 | } |
243 | } | 245 | } |
244 | 246 | ||
@@ -751,7 +753,7 @@ static int pxa_ssp_probe(struct platform_device *pdev, | |||
751 | if (!priv) | 753 | if (!priv) |
752 | return -ENOMEM; | 754 | return -ENOMEM; |
753 | 755 | ||
754 | priv->dev.ssp = ssp_request(dai->id, "SoC audio"); | 756 | priv->dev.ssp = ssp_request(dai->id + 1, "SoC audio"); |
755 | if (priv->dev.ssp == NULL) { | 757 | if (priv->dev.ssp == NULL) { |
756 | ret = -ENODEV; | 758 | ret = -ENODEV; |
757 | goto err_priv; | 759 | goto err_priv; |