From b676926984f3f0fb53d29b01daf9eeb0f7012128 Mon Sep 17 00:00:00 2001 From: Nikesh Oswal Date: Tue, 8 May 2012 16:47:40 +0530 Subject: asoc: tegra: pcm: If there is no dma information exit from trigger If there is no dma information exit from trigger, this is required for the dummy voice call playback and capture streams Change-Id: I5276e7ebb72c17268a9785204fea9f395b2e5d3a Signed-off-by: Nikesh Oswal Reviewed-on: http://git-master/r/101235 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Peterson --- sound/soc/tegra/tegra_pcm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index 3b475a24c9a8..6ba3c9fa4461 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c @@ -257,9 +257,15 @@ int tegra_pcm_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_pcm_runtime *runtime = substream->runtime; struct tegra_runtime_data *prtd = runtime->private_data; + struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct tegra_pcm_dma_params * dmap; unsigned long flags; int i; + dmap = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); + if (!dmap) + return 0; + switch (cmd) { case SNDRV_PCM_TRIGGER_START: prtd->dma_pos = 0; -- cgit v1.2.3