diff options
author | Mark Brown <broonie@linaro.org> | 2013-07-15 11:13:53 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-07-15 11:13:53 +0100 |
commit | 39c36ad00ba59eafa8115c797ace4f3dc7fdf7b0 (patch) | |
tree | dffcc4adbf21514f43f1ace39ea8a8e6735903d5 /sound/soc/omap/omap-pcm.c | |
parent | ad81f0545ef01ea651886dddac4bef6cec930092 (diff) | |
parent | 9ab1fac4829b3da0ba4d3f44d95d3e8ad13e6629 (diff) |
Merge remote-tracking branch 'asoc/fix/omap' into asoc-linus
Diffstat (limited to 'sound/soc/omap/omap-pcm.c')
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index c28e042f220..a11405de86e 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -113,14 +113,25 @@ static int omap_pcm_open(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_dmaengine_dai_dma_data *dma_data; + int ret; snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware); dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); - return snd_dmaengine_pcm_open_request_chan(substream, - omap_dma_filter_fn, - dma_data->filter_data); + /* DT boot: filter_data is the DMA name */ + if (rtd->cpu_dai->dev->of_node) { + struct dma_chan *chan; + + chan = dma_request_slave_channel(rtd->cpu_dai->dev, + dma_data->filter_data); + ret = snd_dmaengine_pcm_open(substream, chan); + } else { + ret = snd_dmaengine_pcm_open_request_chan(substream, + omap_dma_filter_fn, + dma_data->filter_data); + } + return ret; } static int omap_pcm_mmap(struct snd_pcm_substream *substream, |