diff options
Diffstat (limited to 'sound/soc/cirrus/ep93xx-ac97.c')
-rw-r--r-- | sound/soc/cirrus/ep93xx-ac97.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c index efa75b5086a4..f30dadf85b99 100644 --- a/sound/soc/cirrus/ep93xx-ac97.c +++ b/sound/soc/cirrus/ep93xx-ac97.c | |||
@@ -19,11 +19,14 @@ | |||
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | 20 | ||
21 | #include <sound/core.h> | 21 | #include <sound/core.h> |
22 | #include <sound/dmaengine_pcm.h> | ||
22 | #include <sound/ac97_codec.h> | 23 | #include <sound/ac97_codec.h> |
23 | #include <sound/soc.h> | 24 | #include <sound/soc.h> |
24 | 25 | ||
25 | #include <linux/platform_data/dma-ep93xx.h> | 26 | #include <linux/platform_data/dma-ep93xx.h> |
26 | 27 | ||
28 | #include "ep93xx-pcm.h" | ||
29 | |||
27 | /* | 30 | /* |
28 | * Per channel (1-4) registers. | 31 | * Per channel (1-4) registers. |
29 | */ | 32 | */ |
@@ -95,6 +98,8 @@ struct ep93xx_ac97_info { | |||
95 | struct device *dev; | 98 | struct device *dev; |
96 | void __iomem *regs; | 99 | void __iomem *regs; |
97 | struct completion done; | 100 | struct completion done; |
101 | struct snd_dmaengine_dai_dma_data dma_params_rx; | ||
102 | struct snd_dmaengine_dai_dma_data dma_params_tx; | ||
98 | }; | 103 | }; |
99 | 104 | ||
100 | /* currently ALSA only supports a single AC97 device */ | 105 | /* currently ALSA only supports a single AC97 device */ |
@@ -315,8 +320,13 @@ static int ep93xx_ac97_trigger(struct snd_pcm_substream *substream, | |||
315 | 320 | ||
316 | static int ep93xx_ac97_dai_probe(struct snd_soc_dai *dai) | 321 | static int ep93xx_ac97_dai_probe(struct snd_soc_dai *dai) |
317 | { | 322 | { |
318 | dai->playback_dma_data = &ep93xx_ac97_pcm_out; | 323 | struct ep93xx_ac97_info *info = snd_soc_dai_get_drvdata(dai); |
319 | dai->capture_dma_data = &ep93xx_ac97_pcm_in; | 324 | |
325 | info->dma_params_tx.filter_data = &ep93xx_ac97_pcm_out; | ||
326 | info->dma_params_rx.filter_data = &ep93xx_ac97_pcm_in; | ||
327 | |||
328 | dai->playback_dma_data = &info->dma_params_tx; | ||
329 | dai->capture_dma_data = &info->dma_params_rx; | ||
320 | 330 | ||
321 | return 0; | 331 | return 0; |
322 | } | 332 | } |
@@ -394,8 +404,14 @@ static int ep93xx_ac97_probe(struct platform_device *pdev) | |||
394 | if (ret) | 404 | if (ret) |
395 | goto fail; | 405 | goto fail; |
396 | 406 | ||
407 | ret = devm_ep93xx_pcm_platform_register(&pdev->dev); | ||
408 | if (ret) | ||
409 | goto fail_unregister; | ||
410 | |||
397 | return 0; | 411 | return 0; |
398 | 412 | ||
413 | fail_unregister: | ||
414 | snd_soc_unregister_component(&pdev->dev); | ||
399 | fail: | 415 | fail: |
400 | ep93xx_ac97_info = NULL; | 416 | ep93xx_ac97_info = NULL; |
401 | snd_soc_set_ac97_ops(NULL); | 417 | snd_soc_set_ac97_ops(NULL); |