From patchwork Fri Mar 6 11:07:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Cvek X-Patchwork-Id: 5953791 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D94EB9F36A for ; Fri, 6 Mar 2015 11:09:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 14EA320173 for ; Fri, 6 Mar 2015 11:09:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3AEE620154 for ; Fri, 6 Mar 2015 11:09:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YTq6Q-0004DY-KS; Fri, 06 Mar 2015 11:07:34 +0000 Received: from bubo.tul.cz ([2001:718:1c01:16::aa]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YTq6N-00044d-3O for linux-arm-kernel@lists.infradead.org; Fri, 06 Mar 2015 11:07:32 +0000 Received: from [78.80.185.17] (78-80-185-17.tmcz.cz [78.80.185.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by bubo.tul.cz (Postfix) with ESMTPSA id E019B1F0002; Fri, 6 Mar 2015 12:06:52 +0100 (CET) Message-ID: <54F98A5C.5040507@tul.cz> Date: Fri, 06 Mar 2015 12:07:08 +0100 From: Petr Cvek User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20131204 Thunderbird/17.0.11 MIME-Version: 1.0 To: Mark Brown , alsa-devel@alsa-project.org Subject: Re: [PATCH v4] Sound: PXA: Fix settings of PXAxxx DMA References: <54CA125D.7010908@tul.cz> <54CA2B7E.5010003@tul.cz> <54F05FD6.6080702@tul.cz> <20150302181803.GC21293@sirena.org.uk> In-Reply-To: <20150302181803.GC21293@sirena.org.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150306_030731_338262_A367E2D9 X-CRM114-Status: GOOD ( 10.28 ) X-Spam-Score: -0.0 (/) Cc: linux-arm-kernel@lists.infradead.org, robert.jarzmik@free.fr, haojian.zhuang@gmail.com, daniel@zonque.org, lgirdwood@gmail.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix PXA DMA autoincrementation, so capture will not use playback settings (incrementation in register space instead in target buffer). Regression from: 'commit d65a14587a9be853a887a1407db133df1fb68e29 ("ASoC: pxa: use snd_dmaengine_dai_dma_data")' Signed-off-by: Petr Cvek Acked-by: Daniel Mack Acked-by: Robert Jarzmik --- sound/arm/pxa2xx-pcm-lib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 1.7.12.1 diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index 01f8fdc..f8ca3ca 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/sound/arm/pxa2xx-pcm-lib.c @@ -45,7 +45,12 @@ int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, size_t period = params_period_bytes(params); pxa_dma_desc *dma_desc; dma_addr_t dma_buff_phys, next_desc_phys; - u32 dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG; + u32 dcmd = 0; + + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG; + else + dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC; /* temporary transition hack */ switch (rtd->params->addr_width) {