From patchwork Fri Sep 14 12:05:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1458111 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 1F712402E1 for ; Fri, 14 Sep 2012 12:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759510Ab2INMK2 (ORCPT ); Fri, 14 Sep 2012 08:10:28 -0400 Received: from na3sys009aog110.obsmtp.com ([74.125.149.203]:34961 "EHLO na3sys009aog110.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759453Ab2INMFe (ORCPT ); Fri, 14 Sep 2012 08:05:34 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]) (using TLSv1) by na3sys009aob110.postini.com ([74.125.148.12]) with SMTP ID DSNKUFMdjb7p1owtAHepS6rbDV0raetoq3HT@postini.com; Fri, 14 Sep 2012 05:05:34 PDT Received: by obbuo13 with SMTP id uo13so6096918obb.19 for ; Fri, 14 Sep 2012 05:05:33 -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=ClQASDA/G46mlWGwliM8TrpT9WDK8pDOxTcYQ55IgwQ=; b=UhGEiLBOeX95VzB8WFcCzr1DM6GRv5WBDadZge4yjZG7LQaanr1Og7YIxeDIniPD6X /RN2mPK2cKlV4E6n4ZmMcR1pJ1v0unIY8cveU9pBnmcnNewFcDhE/U4ualQkoaa0GBXE nxA44CM/Ju4FwZ2fMRDobcfikUEGqqLXwYy1qw9FIOmwc+xBo8PbuwPpp2D3I2UU+6DE /apAwFOt/YB9VIKjBKv5bWNcL39n2oMFyYpkyKAZOaXoa1XfOLqyuDAfxGwUrdlQYD67 TPMmBvHhyZCtAIl5jq76KkzvLim2cVqvToYuV4ww/6s+pZltxJgEguvSaV9yl6OIWHgP saZQ== Received: by 10.182.182.71 with SMTP id ec7mr2786779obc.22.1347624332892; Fri, 14 Sep 2012 05:05:32 -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.29 (version=SSLv3 cipher=OTHER); Fri, 14 Sep 2012 05:05:32 -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 01/15] dmaengine: omap: Support for element mode in cyclic DMA Date: Fri, 14 Sep 2012 15:05:44 +0300 Message-Id: <1347624358-25582-2-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: ALoCoQkGvLli/frFq5egJJmrpwEc3VlkHNbEQNxzztm+V3aMYmWfQxzl17m+2kRpIy6gjADZF2f3 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org When src_maxburst/dst_maxburst is set to 0 by the users of cyclic DMA (mostly audio) indicates that we should configure the omap DMA to element sync mode instead of packet mode. Signed-off-by: Peter Ujfalusi CC: Russell King --- drivers/dma/omap-dma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index ae05618..b77a40d 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -413,7 +413,10 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic( d->dev_addr = dev_addr; d->fi = burst; d->es = es; - d->sync_mode = OMAP_DMA_SYNC_PACKET; + if (burst) + d->sync_mode = OMAP_DMA_SYNC_PACKET; + else + d->sync_mode = OMAP_DMA_SYNC_ELEMENT; d->sync_type = sync_type; d->periph_port = OMAP_DMA_PORT_MPUI; d->sg[0].addr = buf_addr;