public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org
Cc: broonie@kernel.org, Jarkko Nikula <jarkko.nikula@bitmer.com>
Subject: [PATCH 1/5] ASoC: Add support for machine specific trigger callback
Date: Mon, 28 Apr 2014 14:17:52 +0200	[thread overview]
Message-ID: <1398687476-10829-1-git-send-email-sr@denx.de> (raw)

From: Jarkko Nikula <jarkko.nikula@bitmer.com>

Machine specific trigger callback allows to do final stream start/stop
related operations in a machine driver after setting up the codec, DMA and
DAI.

One example could be clock management for linked streams case where machine
driver can start/stop synchronously the linked streams.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Stefan Roese <sr@denx.de>
---
 sound/soc/soc-pcm.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 2cedf09..a3a7021 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -819,6 +819,13 @@ 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;
 }
 
-- 
1.9.1


             reply	other threads:[~2014-04-28 12:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28 12:17 Stefan Roese [this message]
2014-04-28 12:17 ` [PATCH 2/5] ASoC: Add HA (HEAD acoustics) DSP codec driver template Stefan Roese
2014-04-28 14:45   ` [alsa-devel] " Lars-Peter Clausen
2014-04-28 17:32   ` Jarkko Nikula
2014-04-29 18:47   ` Mark Brown
2014-04-28 12:17 ` [PATCH 3/5] ASoC: omap: Add HA (HEAD acoustics) DSP add-on card audio driver for TAO3530 Stefan Roese
2014-04-28 17:35   ` Jarkko Nikula
2014-04-28 17:39   ` Jarkko Nikula
2014-04-29 18:54   ` Mark Brown
2014-04-28 12:17 ` [PATCH 4/5] DT: Add vendor prefix for HEAD acoustics Stefan Roese
2014-04-28 12:17 ` [PATCH 5/5] ASoC: omap: Add DT bindings documentation for HA DSP audio driver Stefan Roese
2014-04-29 19:05 ` [PATCH 1/5] ASoC: Add support for machine specific trigger callback Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1398687476-10829-1-git-send-email-sr@denx.de \
    --to=sr@denx.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jarkko.nikula@bitmer.com \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox