From patchwork Mon Apr 28 12:17:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 4077761 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E33E5BFF02 for ; Mon, 28 Apr 2014 13:50:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E47C202EB for ; Mon, 28 Apr 2014 13:50:16 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 04AEF2028D for ; Mon, 28 Apr 2014 13:50:14 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 17682261B28; Mon, 28 Apr 2014 15:50:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id B7A2F2619F0; Mon, 28 Apr 2014 15:48:10 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2831F261A18; Mon, 28 Apr 2014 14:17:59 +0200 (CEST) Received: from mo4-p05-ob.smtp.rzone.de (mo4-p05-ob.smtp.rzone.de [81.169.146.182]) by alsa0.perex.cz (Postfix) with ESMTP id 22970261600 for ; Mon, 28 Apr 2014 14:17:51 +0200 (CEST) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohfvxEndrDXKjzPMsB3oimjD61I4fPQhgcxGt3 X-RZG-CLASS-ID: mo05 Received: from stefan-work.domain_not_set.invalid (b9168f24.cgn.dg-w.de [185.22.143.36]) by post.strato.de (RZmta 32.39 AUTH) with ESMTPA id 6020b3q3SCHiO3G; Mon, 28 Apr 2014 14:17:44 +0200 (CEST) From: Stefan Roese To: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org Date: Mon, 28 Apr 2014 14:17:52 +0200 Message-Id: <1398687476-10829-1-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.9.2 X-Mailman-Approved-At: Mon, 28 Apr 2014 15:48:08 +0200 Cc: broonie@kernel.org, Jarkko Nikula Subject: [alsa-devel] [PATCH 1/5] ASoC: Add support for machine specific trigger callback X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jarkko Nikula 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 Signed-off-by: Stefan Roese --- 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; }