From patchwork Fri Jan 30 09:38:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bo Shen X-Patchwork-Id: 5748161 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 49A5BBF440 for ; Fri, 30 Jan 2015 09:40:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7971E2024D for ; Fri, 30 Jan 2015 09:40:31 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 6040C20165 for ; Fri, 30 Jan 2015 09:40:30 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A0D792651C9; Fri, 30 Jan 2015 10:40:29 +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 DBD9C261629; Fri, 30 Jan 2015 10:39:08 +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 D9565261549; Fri, 30 Jan 2015 10:39:05 +0100 (CET) Received: from DVREDG02.corp.atmel.com (nasmtp01.atmel.com [192.199.1.246]) by alsa0.perex.cz (Postfix) with ESMTP id A6B7926147A for ; Fri, 30 Jan 2015 10:38:59 +0100 (CET) Received: from sjogate2.atmel.com (10.42.103.223) by DVREDG02.corp.atmel.com (10.42.103.31) with Microsoft SMTP Server id 14.2.347.0; Fri, 30 Jan 2015 02:38:51 -0700 Received: from localhost.localdomain ([10.217.12.46]) by sjogate2.atmel.com (8.13.6/8.13.6) with ESMTP id t0U9adIU028377; Fri, 30 Jan 2015 01:36:48 -0800 (PST) From: Bo Shen To: Mark Brown Date: Fri, 30 Jan 2015 17:38:44 +0800 Message-ID: <1422610724-7222-4-git-send-email-voice.shen@atmel.com> X-Mailer: git-send-email 2.3.0.rc0 In-Reply-To: <1422610724-7222-1-git-send-email-voice.shen@atmel.com> References: <1422610724-7222-1-git-send-email-voice.shen@atmel.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Bo Shen , nicolas.ferre@atmel.com, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Songjun.Wu@atmel.com, linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH 3/3] ASoC: atmel_ssc_dai: only clean PDC when using PDC 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 Only using PDC, it needs to clean PDC registers. Signed-off-by: Bo Shen --- sound/soc/atmel/atmel_ssc_dai.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index 0ed5ac3..80eb1f1 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c @@ -599,15 +599,17 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, rcmr, rfmr, tcmr, tfmr); if (!ssc_p->initialized) { - ssc_writel(ssc_p->ssc->regs, PDC_RPR, 0); - ssc_writel(ssc_p->ssc->regs, PDC_RCR, 0); - ssc_writel(ssc_p->ssc->regs, PDC_RNPR, 0); - ssc_writel(ssc_p->ssc->regs, PDC_RNCR, 0); - - ssc_writel(ssc_p->ssc->regs, PDC_TPR, 0); - ssc_writel(ssc_p->ssc->regs, PDC_TCR, 0); - ssc_writel(ssc_p->ssc->regs, PDC_TNPR, 0); - ssc_writel(ssc_p->ssc->regs, PDC_TNCR, 0); + if (!ssc_p->ssc->pdata->use_dma) { + ssc_writel(ssc_p->ssc->regs, PDC_RPR, 0); + ssc_writel(ssc_p->ssc->regs, PDC_RCR, 0); + ssc_writel(ssc_p->ssc->regs, PDC_RNPR, 0); + ssc_writel(ssc_p->ssc->regs, PDC_RNCR, 0); + + ssc_writel(ssc_p->ssc->regs, PDC_TPR, 0); + ssc_writel(ssc_p->ssc->regs, PDC_TCR, 0); + ssc_writel(ssc_p->ssc->regs, PDC_TNPR, 0); + ssc_writel(ssc_p->ssc->regs, PDC_TNCR, 0); + } ret = request_irq(ssc_p->ssc->irq, atmel_ssc_interrupt, 0, ssc_p->name, ssc_p);