diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2012-02-14 08:41:29 -0500 |
---|---|---|
committer | Liam Girdwood <lrg@ti.com> | 2012-03-12 09:34:22 -0400 |
commit | b8fb4907a74dbcbd0b21e02380d58e422bd4a1fe (patch) | |
tree | 0b3369b83f25835af04414bd2c992e65d3783092 /sound/soc/omap/omap-mcbsp.c | |
parent | 256d9c251fe6800a494206b96d2572e5a98762d5 (diff) |
ASoC: omap-mcbsp: Simplify DMA configuration
Configure the DMA request line, port address, and stream name at
probe time instead of every time we start a stream.
These settings are static in the system.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/omap/omap-mcbsp.c')
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 4cd7af883de9..10eb645ceeef 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -225,17 +225,12 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, | |||
225 | struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai); | 225 | struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai); |
226 | struct omap_mcbsp_reg_cfg *regs = &mcbsp->cfg_regs; | 226 | struct omap_mcbsp_reg_cfg *regs = &mcbsp->cfg_regs; |
227 | struct omap_pcm_dma_data *dma_data; | 227 | struct omap_pcm_dma_data *dma_data; |
228 | int dma; | ||
229 | int wlen, channels, wpf, sync_mode = OMAP_DMA_SYNC_ELEMENT; | 228 | int wlen, channels, wpf, sync_mode = OMAP_DMA_SYNC_ELEMENT; |
230 | int pkt_size = 0; | 229 | int pkt_size = 0; |
231 | unsigned long port; | ||
232 | unsigned int format, div, framesize, master; | 230 | unsigned int format, div, framesize, master; |
233 | 231 | ||
234 | dma_data = &mcbsp->dma_data[substream->stream]; | 232 | dma_data = &mcbsp->dma_data[substream->stream]; |
235 | 233 | ||
236 | dma = omap_mcbsp_dma_ch_params(mcbsp, substream->stream); | ||
237 | port = omap_mcbsp_dma_reg_params(mcbsp, substream->stream); | ||
238 | |||
239 | switch (params_format(params)) { | 234 | switch (params_format(params)) { |
240 | case SNDRV_PCM_FORMAT_S16_LE: | 235 | case SNDRV_PCM_FORMAT_S16_LE: |
241 | dma_data->data_type = OMAP_DMA_DATA_TYPE_S16; | 236 | dma_data->data_type = OMAP_DMA_DATA_TYPE_S16; |
@@ -291,9 +286,6 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, | |||
291 | } | 286 | } |
292 | } | 287 | } |
293 | 288 | ||
294 | dma_data->name = substream->stream ? "Audio Capture" : "Audio Playback"; | ||
295 | dma_data->dma_req = dma; | ||
296 | dma_data->port_addr = port; | ||
297 | dma_data->sync_mode = sync_mode; | 289 | dma_data->sync_mode = sync_mode; |
298 | dma_data->packet_size = pkt_size; | 290 | dma_data->packet_size = pkt_size; |
299 | 291 | ||