aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-mcasp.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-03-24 07:16:33 -0400
committerMark Brown <broonie@linaro.org>2014-03-24 07:16:33 -0400
commitb51086eaee34a2a6fd34f8a37c8e77d1b1c07a44 (patch)
tree932726a834e171663258fbcf88dfde5e04deff2d /sound/soc/davinci/davinci-mcasp.c
parent10885d8734a1bf3543c49851830acf3085428df1 (diff)
parente090d5b6ad20056ec0ef58727e3ae95fd82be090 (diff)
Merge tag 'asoc-v3.15-3' into asoc-next
ASoC: Updates for v3.15 A few more updates for the merge window: - Fixes for the simple-card DAI format DT mess. - A new driver for Cirrus cs42xx8 devices. - DT support for a couple more devices. - A revert of a previous buggy fix for soc-pcm, plus a few more fixes and cleanups. # gpg: Signature made Sun 23 Mar 2014 16:56:11 GMT using RSA key ID 7EA229BD # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
-rw-r--r--sound/soc/davinci/davinci-mcasp.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index b0ae0677f023..a01ae97c90aa 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -1026,6 +1026,7 @@ nodata:
1026static int davinci_mcasp_probe(struct platform_device *pdev) 1026static int davinci_mcasp_probe(struct platform_device *pdev)
1027{ 1027{
1028 struct davinci_pcm_dma_params *dma_params; 1028 struct davinci_pcm_dma_params *dma_params;
1029 struct snd_dmaengine_dai_dma_data *dma_data;
1029 struct resource *mem, *ioarea, *res, *dat; 1030 struct resource *mem, *ioarea, *res, *dat;
1030 struct davinci_mcasp_pdata *pdata; 1031 struct davinci_mcasp_pdata *pdata;
1031 struct davinci_mcasp *mcasp; 1032 struct davinci_mcasp *mcasp;
@@ -1095,6 +1096,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1095 mcasp->dat_port = true; 1096 mcasp->dat_port = true;
1096 1097
1097 dma_params = &mcasp->dma_params[SNDRV_PCM_STREAM_PLAYBACK]; 1098 dma_params = &mcasp->dma_params[SNDRV_PCM_STREAM_PLAYBACK];
1099 dma_data = &mcasp->dma_data[SNDRV_PCM_STREAM_PLAYBACK];
1098 dma_params->asp_chan_q = pdata->asp_chan_q; 1100 dma_params->asp_chan_q = pdata->asp_chan_q;
1099 dma_params->ram_chan_q = pdata->ram_chan_q; 1101 dma_params->ram_chan_q = pdata->ram_chan_q;
1100 dma_params->sram_pool = pdata->sram_pool; 1102 dma_params->sram_pool = pdata->sram_pool;
@@ -1105,7 +1107,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1105 dma_params->dma_addr = mem->start + pdata->tx_dma_offset; 1107 dma_params->dma_addr = mem->start + pdata->tx_dma_offset;
1106 1108
1107 /* Unconditional dmaengine stuff */ 1109 /* Unconditional dmaengine stuff */
1108 mcasp->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr = dma_params->dma_addr; 1110 dma_data->addr = dma_params->dma_addr;
1109 1111
1110 res = platform_get_resource(pdev, IORESOURCE_DMA, 0); 1112 res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
1111 if (res) 1113 if (res)
@@ -1113,7 +1115,14 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1113 else 1115 else
1114 dma_params->channel = pdata->tx_dma_channel; 1116 dma_params->channel = pdata->tx_dma_channel;
1115 1117
1118 /* dmaengine filter data for DT and non-DT boot */
1119 if (pdev->dev.of_node)
1120 dma_data->filter_data = "tx";
1121 else
1122 dma_data->filter_data = &dma_params->channel;
1123
1116 dma_params = &mcasp->dma_params[SNDRV_PCM_STREAM_CAPTURE]; 1124 dma_params = &mcasp->dma_params[SNDRV_PCM_STREAM_CAPTURE];
1125 dma_data = &mcasp->dma_data[SNDRV_PCM_STREAM_CAPTURE];
1117 dma_params->asp_chan_q = pdata->asp_chan_q; 1126 dma_params->asp_chan_q = pdata->asp_chan_q;
1118 dma_params->ram_chan_q = pdata->ram_chan_q; 1127 dma_params->ram_chan_q = pdata->ram_chan_q;
1119 dma_params->sram_pool = pdata->sram_pool; 1128 dma_params->sram_pool = pdata->sram_pool;
@@ -1124,7 +1133,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1124 dma_params->dma_addr = mem->start + pdata->rx_dma_offset; 1133 dma_params->dma_addr = mem->start + pdata->rx_dma_offset;
1125 1134
1126 /* Unconditional dmaengine stuff */ 1135 /* Unconditional dmaengine stuff */
1127 mcasp->dma_data[SNDRV_PCM_STREAM_CAPTURE].addr = dma_params->dma_addr; 1136 dma_data->addr = dma_params->dma_addr;
1128 1137
1129 if (mcasp->version < MCASP_VERSION_3) { 1138 if (mcasp->version < MCASP_VERSION_3) {
1130 mcasp->fifo_base = DAVINCI_MCASP_V2_AFIFO_BASE; 1139 mcasp->fifo_base = DAVINCI_MCASP_V2_AFIFO_BASE;
@@ -1140,9 +1149,11 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1140 else 1149 else
1141 dma_params->channel = pdata->rx_dma_channel; 1150 dma_params->channel = pdata->rx_dma_channel;
1142 1151
1143 /* Unconditional dmaengine stuff */ 1152 /* dmaengine filter data for DT and non-DT boot */
1144 mcasp->dma_data[SNDRV_PCM_STREAM_PLAYBACK].filter_data = "tx"; 1153 if (pdev->dev.of_node)
1145 mcasp->dma_data[SNDRV_PCM_STREAM_CAPTURE].filter_data = "rx"; 1154 dma_data->filter_data = "rx";
1155 else
1156 dma_data->filter_data = &dma_params->channel;
1146 1157
1147 dev_set_drvdata(&pdev->dev, mcasp); 1158 dev_set_drvdata(&pdev->dev, mcasp);
1148 1159