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: 1452331 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 5FEE93FE79 for ; Thu, 13 Sep 2012 13:41:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751668Ab2IMNl4 (ORCPT ); Thu, 13 Sep 2012 09:41:56 -0400 Received: from na3sys009aob106.obsmtp.com ([74.125.149.76]:48740 "EHLO na3sys009aog106.obsmtp.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752741Ab2IMNhs (ORCPT ); Thu, 13 Sep 2012 09:37:48 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]) (using TLSv1) by na3sys009aob106.postini.com ([74.125.148.12]) with SMTP ID DSNKUFHhqx513hghd85ajgaTMtpmbD8DHTBm@postini.com; Thu, 13 Sep 2012 06:37:48 PDT Received: by obbuo13 with SMTP id uo13so4468622obb.19 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=FI19LrM8nyLZ4O5A68/qAifW1YKbrEfWoX5bNVIMs4mgNa3MWbI9/MYbLWhQG7aFlU jowDvLYh4XrvMqtkqN5csjPKNrcN15cOcLljaGT0aLtIAOx9wTVKoX2WnVD6/FVhKcp3 zpg8dJ6IdGMG5oKnP6bHVp1OwoJ6O/zhv6dEvSzI45/14ZUeTXh+DXGVMZrF/hh2ANUa 4+PMyWmvMSLTuOEIbwcY3DYbE4f0IZedZAfEhPOtwRCukygUpIG0tvs0+sackhvbD03d iKAfkJo9Aj9PE+6XmRRWbwWI6kFOdTyVcpzVJDefSf3SlvsLsPNnzCj4hV1PA8bPLJbL cZfQ== 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 Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik , Ricardo Neri , Lars-Peter Clausen 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: ALoCoQkyvXxsFUVbaIZey4yAyEoIVq4PzGALa9sPEHX0Y0tK2aEh/4prysPiWFnjdewKyGPwJY9Y Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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;