summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2014-04-16 15:46:13 +0300
committerMark Brown <broonie@linaro.org>2014-04-18 18:00:35 +0100
commitf6563b31fb4878fddc846d2012bcee9c5f260d11 (patch)
tree4115b2eed5580f49a89c0f4ec17e452993ce3337
parentfe7b5868809a89a7316eef064f0bb7796aa8c225 (diff)
downloadlinux-f6563b31fb4878fddc846d2012bcee9c5f260d11.tar.bz2
ASoC: omap-mcpdm: Assign the dai DMA data at earlier time
Assign the dai dma data at dai driver probe time, not in startup. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/omap/omap-mcpdm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index 2f5b1536477e..e984b0485e92 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -265,9 +265,6 @@ static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream,
}
mutex_unlock(&mcpdm->mutex);
- snd_soc_dai_set_dma_data(dai, substream,
- &mcpdm->dma_data[substream->stream]);
-
return 0;
}
@@ -406,6 +403,11 @@ static int omap_mcpdm_probe(struct snd_soc_dai *dai)
mcpdm->config[SNDRV_PCM_STREAM_PLAYBACK].threshold = 2;
mcpdm->config[SNDRV_PCM_STREAM_CAPTURE].threshold =
MCPDM_UP_THRES_MAX - 3;
+
+ snd_soc_dai_init_dma_data(dai,
+ &mcpdm->dma_data[SNDRV_PCM_STREAM_PLAYBACK],
+ &mcpdm->dma_data[SNDRV_PCM_STREAM_CAPTURE]);
+
return ret;
}