diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-03-22 09:12:12 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-26 10:17:31 -0400 |
commit | 312bb4f626328fdc246c8d13082ab00e26e7d048 (patch) | |
tree | b0252427b7dcc44643f228980610cd13ccaca58a /sound/soc/fsl/imx-ssi.c | |
parent | ac581e60dfb4cc55ac20cca18202c7689d324aa7 (diff) |
ASoC: imx-pcm: Embed the imx_dma_data struct in the dma_params struct
Currently the imx_dma_data struct, which gets passed to the dmaengine driver, is
allocated and constructed in the pcm driver from the data stored in the
dma_params struct. The dma_params struct gets passed to the pcm driver from the
dai driver. Instead of going this route of indirection embed the dma_data struct
directly into the dma_params struct and let the dai driver fill it in. This
allows us to simplify the imx-pcm-dma driver quite a bit, since it doesn't have
care about memory managing the imx_dma_data struct anymore.
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/imx-ssi.c')
-rw-r--r-- | sound/soc/fsl/imx-ssi.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c index 55464a5b0706..14018c4628ec 100644 --- a/sound/soc/fsl/imx-ssi.c +++ b/sound/soc/fsl/imx-ssi.c | |||
@@ -577,12 +577,16 @@ static int imx_ssi_probe(struct platform_device *pdev) | |||
577 | ssi->dma_params_rx.burstsize = 4; | 577 | ssi->dma_params_rx.burstsize = 4; |
578 | 578 | ||
579 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx0"); | 579 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx0"); |
580 | if (res) | 580 | if (res) { |
581 | ssi->dma_params_tx.dma = res->start; | 581 | imx_pcm_dma_params_init_data(&ssi->dma_params_tx, res->start, |
582 | false); | ||
583 | } | ||
582 | 584 | ||
583 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx0"); | 585 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx0"); |
584 | if (res) | 586 | if (res) { |
585 | ssi->dma_params_rx.dma = res->start; | 587 | imx_pcm_dma_params_init_data(&ssi->dma_params_rx, res->start, |
588 | false); | ||
589 | } | ||
586 | 590 | ||
587 | platform_set_drvdata(pdev, ssi); | 591 | platform_set_drvdata(pdev, ssi); |
588 | 592 | ||