summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikesh Oswal <noswal@nvidia.com>2012-05-08 16:47:40 +0530
committerSimone Willett <swillett@nvidia.com>2012-05-08 11:59:52 -0700
commitb676926984f3f0fb53d29b01daf9eeb0f7012128 (patch)
tree1ff1e841e0bbd6ea19840ef41cdf63bee889e31a
parent2b9e2850f6a2f500ccbfa0f1df92b8becb91efda (diff)
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 <noswal@nvidia.com> Reviewed-on: http://git-master/r/101235 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Peterson <speterson@nvidia.com>
-rw-r--r--sound/soc/tegra/tegra_pcm.c6
1 files changed, 6 insertions, 0 deletions
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;