diff options
author | Stephen Warren <swarren@nvidia.com> | 2013-12-10 12:35:25 -0700 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-18 18:55:06 +0000 |
commit | e1771bcf99b0dc91f4ba645c1740fd5031702f49 (patch) | |
tree | 56d12a6132a8151ce33bd89899aaa85d2ea40be7 /sound/soc/spear/spdif_in.c | |
parent | ede38884ac25ed78e43f3480056670963a9980f0 (diff) |
ASoC: SPEAr: remove custom DMA alloc compat function
spear_pcm_request_chan() 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 SPEAr 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/spear/spdif_in.c')
-rw-r--r-- | sound/soc/spear/spdif_in.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/soc/spear/spdif_in.c b/sound/soc/spear/spdif_in.c index 4627110f3441..4ab442a63d7e 100644 --- a/sound/soc/spear/spdif_in.c +++ b/sound/soc/spear/spdif_in.c @@ -18,6 +18,7 @@ #include <linux/ioport.h> #include <linux/module.h> #include <linux/platform_device.h> +#include <sound/dmaengine_pcm.h> #include <sound/pcm.h> #include <sound/pcm_params.h> #include <sound/soc.h> @@ -38,6 +39,8 @@ struct spdif_in_dev { struct device *dev; void (*reset_perip)(void); int irq; + struct snd_dmaengine_dai_dma_data dma_params_rx; + struct snd_dmaengine_pcm_config config; }; static void spdif_in_configure(struct spdif_in_dev *host) @@ -54,7 +57,8 @@ static int spdif_in_dai_probe(struct snd_soc_dai *dai) { struct spdif_in_dev *host = snd_soc_dai_get_drvdata(dai); - dai->capture_dma_data = &host->dma_params; + host->dma_params_rx.filter_data = &host->dma_params; + dai->capture_dma_data = &host->dma_params_rx; return 0; } @@ -245,7 +249,6 @@ static int spdif_in_probe(struct platform_device *pdev) host->dma_params.addr = res_fifo->start; host->dma_params.max_burst = 16; host->dma_params.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; - host->dma_params.filter = pdata->filter; host->reset_perip = pdata->reset_perip; host->dev = &pdev->dev; @@ -263,7 +266,8 @@ static int spdif_in_probe(struct platform_device *pdev) if (ret) return ret; - return devm_spear_pcm_platform_register(&pdev->dev); + return devm_spear_pcm_platform_register(&pdev->dev, &host->config, + pdata->filter); } static struct platform_driver spdif_in_driver = { |