提交 0664678a 编写于 作者: P Philipp Zabel 提交者: Mark Brown

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: NPhilipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 5b247442
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/irq.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/pcm.h> #include <sound/pcm.h>
#include <sound/initval.h> #include <sound/initval.h>
...@@ -221,9 +223,9 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream, ...@@ -221,9 +223,9 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream,
int ret = 0; int ret = 0;
if (!cpu_dai->active) { if (!cpu_dai->active) {
ret = ssp_init(&priv->dev, cpu_dai->id + 1, SSP_NO_IRQ); priv->dev.port = cpu_dai->id + 1;
if (ret < 0) priv->dev.irq = NO_IRQ;
return ret; clk_enable(priv->dev.ssp->clk);
ssp_disable(&priv->dev); ssp_disable(&priv->dev);
} }
return ret; return ret;
...@@ -238,7 +240,7 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream, ...@@ -238,7 +240,7 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream,
if (!cpu_dai->active) { if (!cpu_dai->active) {
ssp_disable(&priv->dev); ssp_disable(&priv->dev);
ssp_exit(&priv->dev); clk_disable(priv->dev.ssp->clk);
} }
} }
...@@ -751,7 +753,7 @@ static int pxa_ssp_probe(struct platform_device *pdev, ...@@ -751,7 +753,7 @@ static int pxa_ssp_probe(struct platform_device *pdev,
if (!priv) if (!priv)
return -ENOMEM; return -ENOMEM;
priv->dev.ssp = ssp_request(dai->id, "SoC audio"); priv->dev.ssp = ssp_request(dai->id + 1, "SoC audio");
if (priv->dev.ssp == NULL) { if (priv->dev.ssp == NULL) {
ret = -ENODEV; ret = -ENODEV;
goto err_priv; goto err_priv;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册