From patchwork Fri Sep 14 12:05:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1458001 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 0C240DF280 for ; Fri, 14 Sep 2012 12:08:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759580Ab2INMGL (ORCPT ); Fri, 14 Sep 2012 08:06:11 -0400 Received: from na3sys009aog131.obsmtp.com ([74.125.149.247]:51034 "EHLO na3sys009aog131.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759569Ab2INMGJ (ORCPT ); Fri, 14 Sep 2012 08:06:09 -0400 Received: from mail-oa0-f46.google.com ([209.85.219.46]) (using TLSv1) by na3sys009aob131.postini.com ([74.125.148.12]) with SMTP ID DSNKUFMdqSHtjV4DNtZ9g1Ggb9gVsDYkR7YC@postini.com; Fri, 14 Sep 2012 05:06:08 PDT Received: by oago6 with SMTP id o6so2765258oag.19 for ; Fri, 14 Sep 2012 05:05:54 -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=dDnU7Y7u5PdPAAxqH3Zqqoh7EYgbc1Y9A/7lEsxoI+A=; b=JYUs0B1QwIYDYqocaGAVGCPMK/lKxjz7lbVNGe98SDPg8MbRSkw6QvKHD7mwcZlsAM lP+mGrXCoD9V0lOVmTT4HX8tyokDUoKcSwmOzKw2V7mpOekaECCiofWxbiL7Snm8sOix 5DOSDUKArOLPPOrRceDco40RLGTMa8rGXjyOYLHhAREUei+kUnmbzlPUBwlGq2D7uzL2 WY/kGIt70kfOT/u6cTQGjYU+t2WQmXzh6U7V7jjwXCQNohjH744fV6ZHRBFWEf+ncovj vd11+sFQQyr4O8XJ8FgQd3BEmT7viXFvbenSNBWMPrGHIbBbhDSXn1dsw+yKNG2lwkiO dYmA== Received: by 10.60.13.41 with SMTP id e9mr2802231oec.15.1347624354299; Fri, 14 Sep 2012 05:05:54 -0700 (PDT) Received: from barack.emea.dhcp.ti.com (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id ac10sm1615600obc.7.2012.09.14.05.05.50 (version=SSLv3 cipher=OTHER); Fri, 14 Sep 2012 05:05:53 -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 v3 05/15] dmaengine: omap-dma: Add support to suppress interrupts in cyclic mode Date: Fri, 14 Sep 2012 15:05:48 +0300 Message-Id: <1347624358-25582-6-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1347624358-25582-1-git-send-email-peter.ujfalusi@ti.com> References: <1347624358-25582-1-git-send-email-peter.ujfalusi@ti.com> X-Gm-Message-State: ALoCoQlUMhIYnzqAB0C8qIVtWOLZhYibCnNUz7lPfeFnFZTkwCueUzD4qJgF1iDx2ZYf2GNmK3re Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org When requested (DMA_PREP_INTERRUPT is cleared in flags) 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 Acked-by: Vinod Koul --- drivers/dma/omap-dma.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index 4d2650f..f59f244 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -429,7 +429,10 @@ 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 (flags & DMA_PREP_INTERRUPT) + omap_enable_dma_irq(c->dma_ch, OMAP_DMA_FRAME_IRQ); + omap_disable_dma_irq(c->dma_ch, OMAP_DMA_BLOCK_IRQ); } @@ -438,7 +441,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, flags); } static int omap_dma_slave_config(struct omap_chan *c, struct dma_slave_config *cfg)