diff options
Diffstat (limited to 'sound/soc/pxa/mmp-sspa.c')
-rw-r--r-- | sound/soc/pxa/mmp-sspa.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c index 62142ce367c7..41752a5fe3b0 100644 --- a/sound/soc/pxa/mmp-sspa.c +++ b/sound/soc/pxa/mmp-sspa.c | |||
@@ -27,12 +27,15 @@ | |||
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/pxa2xx_ssp.h> | 28 | #include <linux/pxa2xx_ssp.h> |
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/dmaengine.h> | ||
31 | |||
30 | #include <sound/core.h> | 32 | #include <sound/core.h> |
31 | #include <sound/pcm.h> | 33 | #include <sound/pcm.h> |
32 | #include <sound/initval.h> | 34 | #include <sound/initval.h> |
33 | #include <sound/pcm_params.h> | 35 | #include <sound/pcm_params.h> |
34 | #include <sound/soc.h> | 36 | #include <sound/soc.h> |
35 | #include <sound/pxa2xx-lib.h> | 37 | #include <sound/pxa2xx-lib.h> |
38 | #include <sound/dmaengine_pcm.h> | ||
36 | #include "mmp-sspa.h" | 39 | #include "mmp-sspa.h" |
37 | 40 | ||
38 | /* | 41 | /* |
@@ -40,7 +43,7 @@ | |||
40 | */ | 43 | */ |
41 | struct sspa_priv { | 44 | struct sspa_priv { |
42 | struct ssp_device *sspa; | 45 | struct ssp_device *sspa; |
43 | struct pxa2xx_pcm_dma_params *dma_params; | 46 | struct snd_dmaengine_dai_dma_data *dma_params; |
44 | struct clk *audio_clk; | 47 | struct clk *audio_clk; |
45 | struct clk *sysclk; | 48 | struct clk *sysclk; |
46 | int dai_fmt; | 49 | int dai_fmt; |
@@ -266,7 +269,7 @@ static int mmp_sspa_hw_params(struct snd_pcm_substream *substream, | |||
266 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | 269 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
267 | struct sspa_priv *sspa_priv = snd_soc_dai_get_drvdata(dai); | 270 | struct sspa_priv *sspa_priv = snd_soc_dai_get_drvdata(dai); |
268 | struct ssp_device *sspa = sspa_priv->sspa; | 271 | struct ssp_device *sspa = sspa_priv->sspa; |
269 | struct pxa2xx_pcm_dma_params *dma_params; | 272 | struct snd_dmaengine_dai_dma_data *dma_params; |
270 | u32 sspa_ctrl; | 273 | u32 sspa_ctrl; |
271 | 274 | ||
272 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 275 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
@@ -309,7 +312,7 @@ static int mmp_sspa_hw_params(struct snd_pcm_substream *substream, | |||
309 | } | 312 | } |
310 | 313 | ||
311 | dma_params = &sspa_priv->dma_params[substream->stream]; | 314 | dma_params = &sspa_priv->dma_params[substream->stream]; |
312 | dma_params->dev_addr = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? | 315 | dma_params->addr = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? |
313 | (sspa->phys_base + SSPA_TXD) : | 316 | (sspa->phys_base + SSPA_TXD) : |
314 | (sspa->phys_base + SSPA_RXD); | 317 | (sspa->phys_base + SSPA_RXD); |
315 | snd_soc_dai_set_dma_data(cpu_dai, substream, dma_params); | 318 | snd_soc_dai_set_dma_data(cpu_dai, substream, dma_params); |
@@ -425,14 +428,12 @@ static int asoc_mmp_sspa_probe(struct platform_device *pdev) | |||
425 | return -ENOMEM; | 428 | return -ENOMEM; |
426 | 429 | ||
427 | priv->dma_params = devm_kzalloc(&pdev->dev, | 430 | priv->dma_params = devm_kzalloc(&pdev->dev, |
428 | 2 * sizeof(struct pxa2xx_pcm_dma_params), GFP_KERNEL); | 431 | 2 * sizeof(struct snd_dmaengine_dai_dma_data), |
432 | GFP_KERNEL); | ||
429 | if (priv->dma_params == NULL) | 433 | if (priv->dma_params == NULL) |
430 | return -ENOMEM; | 434 | return -ENOMEM; |
431 | 435 | ||
432 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 436 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
433 | if (res == NULL) | ||
434 | return -ENOMEM; | ||
435 | |||
436 | priv->sspa->mmio_base = devm_ioremap_resource(&pdev->dev, res); | 437 | priv->sspa->mmio_base = devm_ioremap_resource(&pdev->dev, res); |
437 | if (IS_ERR(priv->sspa->mmio_base)) | 438 | if (IS_ERR(priv->sspa->mmio_base)) |
438 | return PTR_ERR(priv->sspa->mmio_base); | 439 | return PTR_ERR(priv->sspa->mmio_base); |