diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-04-03 11:06:04 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-05 11:25:47 +0100 |
commit | a8909c9bc5803fd68363c8b349bd76c99fc0569b (patch) | |
tree | 8744cc20bbb9456c9f0507af4571fb27cc0dd956 /sound/soc/fsl/fsl_ssi.c | |
parent | 3489d5067a2cd8c51a2649b2f39bfb5b11852b8d (diff) | |
download | kernel_goldelico_gta04-a8909c9bc5803fd68363c8b349bd76c99fc0569b.zip kernel_goldelico_gta04-a8909c9bc5803fd68363c8b349bd76c99fc0569b.tar.gz kernel_goldelico_gta04-a8909c9bc5803fd68363c8b349bd76c99fc0569b.tar.bz2 |
ASoC: fsl: Use common DAI DMA data struct
Use the common DAI DMA data struct for fsl/imx, this allows us to use the common
helper function to configure the DMA slave config based on the DAI DMA data.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl/fsl_ssi.c')
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 2cce1ce..8a7eac4 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -27,6 +27,7 @@ #include <sound/pcm_params.h> #include <sound/initval.h> #include <sound/soc.h> +#include <sound/dmaengine_pcm.h> #include "fsl_ssi.h" #include "imx-pcm.h" @@ -122,8 +123,10 @@ struct fsl_ssi_private { bool ssi_on_imx; struct clk *clk; struct platform_device *imx_pcm_pdev; - struct imx_pcm_dma_params dma_params_tx; - struct imx_pcm_dma_params dma_params_rx; + struct snd_dmaengine_dai_dma_data dma_params_tx; + struct snd_dmaengine_dai_dma_data dma_params_rx; + struct imx_dma_data filter_data_tx; + struct imx_dma_data filter_data_rx; struct { unsigned int rfrc; @@ -738,14 +741,18 @@ static int fsl_ssi_probe(struct platform_device *pdev) * We have burstsize be "fifo_depth - 2" to match the SSI * watermark setting in fsl_ssi_startup(). */ - ssi_private->dma_params_tx.burstsize = + ssi_private->dma_params_tx.maxburst = ssi_private->fifo_depth - 2; - ssi_private->dma_params_rx.burstsize = + ssi_private->dma_params_rx.maxburst = ssi_private->fifo_depth - 2; - ssi_private->dma_params_tx.dma_addr = + ssi_private->dma_params_tx.addr = ssi_private->ssi_phys + offsetof(struct ccsr_ssi, stx0); - ssi_private->dma_params_rx.dma_addr = + ssi_private->dma_params_rx.addr = ssi_private->ssi_phys + offsetof(struct ccsr_ssi, srx0); + ssi_private->dma_params_tx.filter_data = + &ssi_private->filter_data_tx; + ssi_private->dma_params_rx.filter_data = + &ssi_private->filter_data_rx; /* * TODO: This is a temporary solution and should be changed * to use generic DMA binding later when the helplers get in. @@ -760,9 +767,9 @@ static int fsl_ssi_probe(struct platform_device *pdev) shared = of_device_is_compatible(of_get_parent(np), "fsl,spba-bus"); - imx_pcm_dma_params_init_data(&ssi_private->dma_params_tx, + imx_pcm_dma_params_init_data(&ssi_private->filter_data_tx, dma_events[0], shared); - imx_pcm_dma_params_init_data(&ssi_private->dma_params_rx, + imx_pcm_dma_params_init_data(&ssi_private->filter_data_rx, dma_events[1], shared); } |