From patchwork Thu Sep 13 13:37:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1452311 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0825BDF24C for ; Thu, 13 Sep 2012 13:41:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751220Ab2IMNlY (ORCPT ); Thu, 13 Sep 2012 09:41:24 -0400 Received: from na3sys009aog130.obsmtp.com ([74.125.149.143]:55985 "EHLO na3sys009aog130.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753553Ab2IMNh4 (ORCPT ); Thu, 13 Sep 2012 09:37:56 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]) (using TLSv1) by na3sys009aob130.postini.com ([74.125.148.12]) with SMTP ID DSNKUFHhs89m4ZdNf+3Y2lPj19fXIo8Hja/Y@postini.com; Thu, 13 Sep 2012 06:37:56 PDT Received: by obbuo13 with SMTP id uo13so4468867obb.19 for ; Thu, 13 Sep 2012 06:37:55 -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=KWc8dZfKc7d+p7Q8+n/2KdlsMfRDjIGbgwU0VRGFuZA=; b=C0ogz7R7ADtdthe9t6WI1MRgLeNq/wKtaOrvKVugrL4zWDeyqL+iiNDYKxloHJwvfE 7UJzjI1VhpKg+3GvyqSJ14kM3yfmSVdObRG6W9JCjkjtVeoc0lj6DO/o0IKsBb9YTsd4 MB06oDew1jLE1VjF4wSYiSxB3iUzHyJIIH4aNOjrFkLNWN2Ezpx4DwZEIckkrw9xG6TQ lqKRogzwWV+8pqwKaSOOXst9xJZo6eyEiZidRGJKmBMal0hIujf70guLKQyENk4WyXyT i3L2uv6ejfG9piPg1RwJNUrZwycqhSDjDxm6iCDXaY+9iARhZk1EspUt25aLIvBxnJYF pWtw== Received: by 10.60.20.66 with SMTP id l2mr2251981oee.111.1347543475364; Thu, 13 Sep 2012 06:37:55 -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.51 (version=SSLv3 cipher=OTHER); Thu, 13 Sep 2012 06:37:54 -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 05/15] dmaengine: omap-dma: Add support for no_wakeup in cyclic mode Date: Thu, 13 Sep 2012 16:37:55 +0300 Message-Id: <1347543485-339-6-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: ALoCoQnHtFfSkHY+BWNEAqilHud90B7uTHoGuBy145lhHhVVnvLAXJNFvJZHBxj3bCn0OhFCpNq8 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org When requested disable all DMA interrupts for the channel. In this mode user space does not expect periodic reports from kernel about the progress of the audio stream - PulseAudio for example support this type of mode. Signed-off-by: Peter Ujfalusi CC: Russell King --- drivers/dma/omap-dma.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index c6a711d..cbe087e 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -374,6 +374,7 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic( struct omap_desc *d; dma_addr_t dev_addr; unsigned es, sync_type; + unsigned long tx_flags = 0; u32 burst; if (dir == DMA_DEV_TO_MEM) { @@ -429,7 +430,11 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic( if (!c->cyclic) { c->cyclic = true; omap_dma_link_lch(c->dma_ch, c->dma_ch); - omap_enable_dma_irq(c->dma_ch, OMAP_DMA_FRAME_IRQ); + + if (!no_wakeup) { + omap_enable_dma_irq(c->dma_ch, OMAP_DMA_FRAME_IRQ); + tx_flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT; + } omap_disable_dma_irq(c->dma_ch, OMAP_DMA_BLOCK_IRQ); } @@ -438,7 +443,7 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic( omap_set_dma_dest_burst_mode(c->dma_ch, OMAP_DMA_DATA_BURST_16); } - return vchan_tx_prep(&c->vc, &d->vd, DMA_CTRL_ACK | DMA_PREP_INTERRUPT); + return vchan_tx_prep(&c->vc, &d->vd, tx_flags); } static int omap_dma_slave_config(struct omap_chan *c, struct dma_slave_config *cfg)