From patchwork Thu Sep 13 13:37:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1452431 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (unknown [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id B0C163FE79 for ; Thu, 13 Sep 2012 13:50:15 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TC9co-0002sx-Jw; Thu, 13 Sep 2012 13:38:34 +0000 Received: from na3sys009aog110.obsmtp.com ([74.125.149.203]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1TC9c5-0002Zn-Hb for linux-arm-kernel@lists.infradead.org; Thu, 13 Sep 2012 13:37:50 +0000 Received: from mail-ob0-f177.google.com ([209.85.214.177]) (using TLSv1) by na3sys009aob110.postini.com ([74.125.148.12]) with SMTP ID DSNKUFHhqx513hghd85ajgaTMtpmbD8DHTBm@postini.com; Thu, 13 Sep 2012 06:37:49 PDT Received: by obbta17 with SMTP id ta17so4671728obb.36 for ; Thu, 13 Sep 2012 06:37:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=9kwH5Bnv0hh0Yzi+5Ps6tIsJqj+StB6sZ+74MEJWrQM=; b=K/VwOEg9U6d6/7OI8xFk9ZVrKRpyxbeyvtpEdWoExiKzv+l9O5IPDWR+9HQaQ5Q0X8 40bNjpI3oh7uHnF3pPkUBN+xmtku8GDyfJtYwa02t6AmMrAb7g7oK3H7Cg7yVN2r5q+n BUl0FDwE0wAQMeuysnwWEmeTg1cyuca74nvIxf6fmba53ey0zk5KsbEm4fDZX+qErPjG qZl0345i+pdbetgSCzD/zJblOMBcrzMpnkg+S9/SqUm1EupKFTxZT9xqV4QUnEbdE8lg d/BDH2bw1rk8em5UyRNQhioHEbHY8BeMX939VBaPPsn64B3Qyo+oOUL3zhBIKGr5T4xF vkUg== Received: by 10.182.8.6 with SMTP id n6mr2216509oba.39.1347543467025; Thu, 13 Sep 2012 06:37:47 -0700 (PDT) Received: from barack.emea.dhcp.ti.com (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id n8sm19403567oec.5.2012.09.13.06.37.43 (version=SSLv3 cipher=OTHER); Thu, 13 Sep 2012 06:37:46 -0700 (PDT) From: Peter Ujfalusi To: Mark Brown , Liam Girdwood , Tony Lindgren , Russell King , Vinod Koul , Dan Williams , Jarkko Nikula Subject: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic() Date: Thu, 13 Sep 2012 16:37:53 +0300 Message-Id: <1347543485-339-4-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1347543485-339-1-git-send-email-peter.ujfalusi@ti.com> References: <1347543485-339-1-git-send-email-peter.ujfalusi@ti.com> X-Gm-Message-State: ALoCoQmMQFbsA+h1yIWwMCsp5ANmjYEZ8en3f+MMFwQCSg28NbgOLISqJyvwwQYFpup4YnpK55L/ X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.203 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen , Janusz Krzysztofik , Ricardo Neri , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The dmaengine_prep_dma_cyclic() function primarily used by audio for cyclic transfer required by ALSA. With this new parameter it is going to be possible to enable the SNDRV_PCM_INFO_NO_PERIOD_WAKEUP mode on platforms where it is possible. This patch only changes the public API first. Followup patch will change the device_prep_dma_cyclic() callback parameters to pass this information towards the dma drivers. Signed-off-by: Peter Ujfalusi CC: Lars-Peter Clausen --- include/linux/dmaengine.h | 3 ++- sound/soc/soc-dmaengine-pcm.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 9c02a45..990444b 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -653,7 +653,8 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_rio_sg( static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic( struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, - size_t period_len, enum dma_transfer_direction dir) + size_t period_len, enum dma_transfer_direction dir, + bool no_wakeup) { return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len, period_len, dir, NULL); diff --git a/sound/soc/soc-dmaengine-pcm.c b/sound/soc/soc-dmaengine-pcm.c index 5df529e..6b70adb 100644 --- a/sound/soc/soc-dmaengine-pcm.c +++ b/sound/soc/soc-dmaengine-pcm.c @@ -147,7 +147,8 @@ static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream) desc = dmaengine_prep_dma_cyclic(chan, substream->runtime->dma_addr, snd_pcm_lib_buffer_bytes(substream), - snd_pcm_lib_period_bytes(substream), direction); + snd_pcm_lib_period_bytes(substream), direction, + substream->runtime->no_period_wakeup); if (!desc) return -ENOMEM;