aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/omap/omap-mcbsp.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 88ca71c57c2b..4ac8a08db7b5 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -367,18 +367,9 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,
367 } else if (cpu_is_omap343x()) { 367 } else if (cpu_is_omap343x()) {
368 dma = omap24xx_dma_reqs[bus_id][substream->stream]; 368 dma = omap24xx_dma_reqs[bus_id][substream->stream];
369 port = omap34xx_mcbsp_port[bus_id][substream->stream]; 369 port = omap34xx_mcbsp_port[bus_id][substream->stream];
370 dma_data->set_threshold = omap_mcbsp_set_threshold;
371 /* TODO: Currently, MODE_ELEMENT == MODE_FRAME */
372 if (omap_mcbsp_get_dma_op_mode(bus_id) ==
373 MCBSP_DMA_MODE_THRESHOLD)
374 sync_mode = OMAP_DMA_SYNC_FRAME;
375 } else { 370 } else {
376 return -ENODEV; 371 return -ENODEV;
377 } 372 }
378 dma_data->name = substream->stream ? "Audio Capture" : "Audio Playback";
379 dma_data->dma_req = dma;
380 dma_data->port_addr = port;
381 dma_data->sync_mode = sync_mode;
382 switch (params_format(params)) { 373 switch (params_format(params)) {
383 case SNDRV_PCM_FORMAT_S16_LE: 374 case SNDRV_PCM_FORMAT_S16_LE:
384 dma_data->data_type = OMAP_DMA_DATA_TYPE_S16; 375 dma_data->data_type = OMAP_DMA_DATA_TYPE_S16;
@@ -389,6 +380,18 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,
389 default: 380 default:
390 return -EINVAL; 381 return -EINVAL;
391 } 382 }
383 if (cpu_is_omap343x()) {
384 dma_data->set_threshold = omap_mcbsp_set_threshold;
385 /* TODO: Currently, MODE_ELEMENT == MODE_FRAME */
386 if (omap_mcbsp_get_dma_op_mode(bus_id) ==
387 MCBSP_DMA_MODE_THRESHOLD)
388 sync_mode = OMAP_DMA_SYNC_FRAME;
389 }
390
391 dma_data->name = substream->stream ? "Audio Capture" : "Audio Playback";
392 dma_data->dma_req = dma;
393 dma_data->port_addr = port;
394 dma_data->sync_mode = sync_mode;
392 395
393 snd_soc_dai_set_dma_data(cpu_dai, substream, dma_data); 396 snd_soc_dai_set_dma_data(cpu_dai, substream, dma_data);
394 397