diff options
author | Stephen Warren <swarren@nvidia.com> | 2013-12-10 14:34:46 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-18 13:54:03 -0500 |
commit | a8983d4b0a8c439bddae0c9fd1e8a4cf7c402262 (patch) | |
tree | 3ca552988e191ab91b064de4b817516f661f8e58 /sound/soc/cirrus/ep93xx-ac97.c | |
parent | 6f2032a18969d22740a865e0b4f2e48cf5338f36 (diff) |
ASoC: ep93xx: remove custom DMA alloc compat function
ep93xx_compat_request_channel() is almost identical to
dmaengine_pcm_compat_request_channel(), with the exception that the
latter:
a) Assumes that the DAI DMA data is a struct snd_dmaengine_dai_dma_data
pointer rather than some custom type.
b) dma_data->filter_data rather than dma_data should be passed to
snd_dmaengine_pcm_request_channel() as the filter data.
Make minor changes to the ep93xx DAI drivers so that those two conditions
are met. This allows removal of the custom .compat_request_channel().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/cirrus/ep93xx-ac97.c')
-rw-r--r-- | sound/soc/cirrus/ep93xx-ac97.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c index cc5583da5380..f30dadf85b99 100644 --- a/sound/soc/cirrus/ep93xx-ac97.c +++ b/sound/soc/cirrus/ep93xx-ac97.c | |||
@@ -19,6 +19,7 @@ | |||
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 | ||
@@ -97,6 +98,8 @@ struct ep93xx_ac97_info { | |||
97 | struct device *dev; | 98 | struct device *dev; |
98 | void __iomem *regs; | 99 | void __iomem *regs; |
99 | 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; | ||
100 | }; | 103 | }; |
101 | 104 | ||
102 | /* currently ALSA only supports a single AC97 device */ | 105 | /* currently ALSA only supports a single AC97 device */ |
@@ -317,8 +320,13 @@ static int ep93xx_ac97_trigger(struct snd_pcm_substream *substream, | |||
317 | 320 | ||
318 | static int ep93xx_ac97_dai_probe(struct snd_soc_dai *dai) | 321 | static int ep93xx_ac97_dai_probe(struct snd_soc_dai *dai) |
319 | { | 322 | { |
320 | dai->playback_dma_data = &ep93xx_ac97_pcm_out; | 323 | struct ep93xx_ac97_info *info = snd_soc_dai_get_drvdata(dai); |
321 | 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; | ||
322 | 330 | ||
323 | return 0; | 331 | return 0; |
324 | } | 332 | } |