From patchwork Thu Jan 29 12:45:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Cvek X-Patchwork-Id: 5749651 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 21479BF440 for ; Fri, 30 Jan 2015 12:34:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B89420270 for ; Fri, 30 Jan 2015 12:34:57 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id BC2ED2026D for ; Fri, 30 Jan 2015 12:34:55 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6E337260603; Fri, 30 Jan 2015 13:34:54 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 4AD37260421; Fri, 30 Jan 2015 13:34:44 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 33E32260466; Thu, 29 Jan 2015 13:44:36 +0100 (CET) Received: from bubo.tul.cz (bubo.tul.cz [147.230.16.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4E0E3260451 for ; Thu, 29 Jan 2015 13:44:29 +0100 (CET) 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 1EFF81F0007; Thu, 29 Jan 2015 13:44:19 +0100 (CET) Message-ID: <54CA2B7E.5010003@tul.cz> Date: Thu, 29 Jan 2015 13:45:50 +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: broonie@kernel.org References: <54CA125D.7010908@tul.cz> In-Reply-To: <54CA125D.7010908@tul.cz> X-Mailman-Approved-At: Fri, 30 Jan 2015 13:34:42 +0100 Cc: alsa-devel@alsa-project.org, lgirdwood@gmail.com, haojian.zhuang@gmail.com, daniel@zonque.org, robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org Subject: Re: [alsa-devel] [RESEND PATCH v4] Sound: PXA: Fix settings of PXAxxx DMA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.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 --- sound/arm/pxa2xx-pcm-lib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) {