diff options
author | Troy Kisky <troy.kisky@boundarydevices.com> | 2009-11-16 18:52:31 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-11-18 08:35:06 -0500 |
commit | 57512c6432783c9695ef54f875f705584c65c733 (patch) | |
tree | 0e376074e7804d0116f2fba36111ac5b736b90e0 | |
parent | 357a1db94ecc5b3d605574b164d288cd7dbf8dbd (diff) |
ASoC: DaVinci: remove requirement that dma_params is 1st in structure
Remove requirement that dma_params is 1st in the structures
davinci_audio_dev and davinci_mcbsp_dev.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/davinci/davinci-i2s.c | 6 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 1 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.h | 5 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-pcm.c | 7 |
4 files changed, 6 insertions, 13 deletions
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index 2ab809359c08..d336786683b4 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c | |||
@@ -98,11 +98,6 @@ enum { | |||
98 | }; | 98 | }; |
99 | 99 | ||
100 | struct davinci_mcbsp_dev { | 100 | struct davinci_mcbsp_dev { |
101 | /* | ||
102 | * dma_params must be first because rtd->dai->cpu_dai->private_data | ||
103 | * is cast to a pointer of an array of struct davinci_pcm_dma_params in | ||
104 | * davinci_pcm_open. | ||
105 | */ | ||
106 | struct davinci_pcm_dma_params dma_params[2]; | 101 | struct davinci_pcm_dma_params dma_params[2]; |
107 | void __iomem *base; | 102 | void __iomem *base; |
108 | #define MOD_DSP_A 0 | 103 | #define MOD_DSP_A 0 |
@@ -549,6 +544,7 @@ static int davinci_i2s_probe(struct platform_device *pdev) | |||
549 | dev->dma_params[SNDRV_PCM_STREAM_CAPTURE].channel = res->start; | 544 | dev->dma_params[SNDRV_PCM_STREAM_CAPTURE].channel = res->start; |
550 | 545 | ||
551 | davinci_i2s_dai.private_data = dev; | 546 | davinci_i2s_dai.private_data = dev; |
547 | davinci_i2s_dai.dma_data = dev->dma_params; | ||
552 | ret = snd_soc_register_dai(&davinci_i2s_dai); | 548 | ret = snd_soc_register_dai(&davinci_i2s_dai); |
553 | if (ret != 0) | 549 | if (ret != 0) |
554 | goto err_free_mem; | 550 | goto err_free_mem; |
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 50ad0519a8fa..0a302e1080d9 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -904,6 +904,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev) | |||
904 | 904 | ||
905 | dma_data->channel = res->start; | 905 | dma_data->channel = res->start; |
906 | davinci_mcasp_dai[pdata->op_mode].private_data = dev; | 906 | davinci_mcasp_dai[pdata->op_mode].private_data = dev; |
907 | davinci_mcasp_dai[pdata->op_mode].dma_data = dev->dma_params; | ||
907 | davinci_mcasp_dai[pdata->op_mode].dev = &pdev->dev; | 908 | davinci_mcasp_dai[pdata->op_mode].dev = &pdev->dev; |
908 | ret = snd_soc_register_dai(&davinci_mcasp_dai[pdata->op_mode]); | 909 | ret = snd_soc_register_dai(&davinci_mcasp_dai[pdata->op_mode]); |
909 | 910 | ||
diff --git a/sound/soc/davinci/davinci-mcasp.h b/sound/soc/davinci/davinci-mcasp.h index 9d179cc88f7b..582c9249ef09 100644 --- a/sound/soc/davinci/davinci-mcasp.h +++ b/sound/soc/davinci/davinci-mcasp.h | |||
@@ -39,11 +39,6 @@ enum { | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | struct davinci_audio_dev { | 41 | struct davinci_audio_dev { |
42 | /* | ||
43 | * dma_params must be first because rtd->dai->cpu_dai->private_data | ||
44 | * is cast to a pointer of an array of struct davinci_pcm_dma_params in | ||
45 | * davinci_pcm_open. | ||
46 | */ | ||
47 | struct davinci_pcm_dma_params dma_params[2]; | 42 | struct davinci_pcm_dma_params dma_params[2]; |
48 | void __iomem *base; | 43 | void __iomem *base; |
49 | int sample_rate; | 44 | int sample_rate; |
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c index fb10f1d63fdb..187ee965bf0b 100644 --- a/sound/soc/davinci/davinci-pcm.c +++ b/sound/soc/davinci/davinci-pcm.c | |||
@@ -253,10 +253,11 @@ static int davinci_pcm_open(struct snd_pcm_substream *substream) | |||
253 | struct davinci_runtime_data *prtd; | 253 | struct davinci_runtime_data *prtd; |
254 | int ret = 0; | 254 | int ret = 0; |
255 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 255 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
256 | struct davinci_pcm_dma_params *pa = rtd->dai->cpu_dai->private_data; | 256 | struct davinci_pcm_dma_params *pa = rtd->dai->cpu_dai->dma_data; |
257 | struct davinci_pcm_dma_params *params = &pa[substream->stream]; | 257 | struct davinci_pcm_dma_params *params; |
258 | if (!params) | 258 | if (!pa) |
259 | return -ENODEV; | 259 | return -ENODEV; |
260 | params = &pa[substream->stream]; | ||
260 | 261 | ||
261 | snd_soc_set_runtime_hwparams(substream, &davinci_pcm_hardware); | 262 | snd_soc_set_runtime_hwparams(substream, &davinci_pcm_hardware); |
262 | /* ensure that buffer size is a multiple of period size */ | 263 | /* ensure that buffer size is a multiple of period size */ |