From patchwork Sun Nov 23 07:04:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Cvek X-Patchwork-Id: 5360251 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DCCB99F2F5 for ; Sun, 23 Nov 2014 07:08:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1D81920251 for ; Sun, 23 Nov 2014 07:08:12 +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 E7AA72024F for ; Sun, 23 Nov 2014 07:08:10 +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 1XsRDc-0001hO-M3; Sun, 23 Nov 2014 07:04:24 +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 1XsRDY-0000vf-V7 for linux-arm-kernel@lists.infradead.org; Sun, 23 Nov 2014 07:04:21 +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 372121F0005; Sun, 23 Nov 2014 08:03:49 +0100 (CET) Message-ID: <54718713.1050902@tul.cz> Date: Sun, 23 Nov 2014 08:04:51 +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: linux-arm-kernel@lists.infradead.org Subject: [PATCH] Fix PXA2xx sound DMA autoincrementation flags X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141122_230421_173179_4A4C2538 X-CRM114-Status: GOOD ( 11.17 ) X-Spam-Score: -0.0 (/) Cc: linux-sound@vger.kernel.org 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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, 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 for address auto-incrementation flags for DMA transmissions for PXA2xx sound. Old version used playback settings for recording, so it wrongly read from whole register space (instead of one FIFO register) and wrote into single word in memory. Signed-off-by: Petr Cvek --- sound/arm/pxa2xx-pcm-lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) switch (rtd->params->addr_width) { diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index a61d7a9..5d3a415 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/sound/arm/pxa2xx-pcm-lib.c @@ -45,7 +45,13 @@ 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 */