]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00236020-1 ALSA: add calling of trigger in machine driver
authorGary Zhang <b13634@freescale.com>
Tue, 11 Dec 2012 04:42:42 +0000 (12:42 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:47 +0000 (08:35 +0200)
soc_pcm_trigger() calls trigger functions of cpu_dai, codec_dai
and platform, but the trigger function of machine is not called.
add calling of trigger in machine driver in soc_pcm_trigger()

Signed-off-by: Gary Zhang <b13634@freescale.com>
sound/soc/soc-core.c

index ad12a4c17b72a3738efa2cbab5b4bbdd5c7c6ebc..e62ad5ffce6641e439c58a13405a9f07a37310d9 100644 (file)
@@ -5,6 +5,7 @@
  * Copyright 2005 Openedhand Ltd.
  * Copyright (C) 2010 Slimlogic Ltd.
  * Copyright (C) 2010 Texas Instruments Inc.
+ * Copyright (C) 2012 Freescale Semiconductor, Inc.
  *
  * Author: Liam Girdwood <lrg@slimlogic.co.uk>
  *         with code, comments and ideas from :-
@@ -986,6 +987,12 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
                if (ret < 0)
                        return ret;
        }
+
+       if (rtd->dai_link->ops && rtd->dai_link->ops->trigger) {
+               ret = rtd->dai_link->ops->trigger(substream, cmd);
+               if (ret < 0)
+                       return ret;
+       }
        return 0;
 }