From patchwork Thu Jan 11 06:43:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 10157315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1AE55601A1 for ; Thu, 11 Jan 2018 06:46:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B9E4286AE for ; Thu, 11 Jan 2018 06:46:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2386286B5; Thu, 11 Jan 2018 06:46:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43668286AE for ; Thu, 11 Jan 2018 06:46:42 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C27D02678B5; Thu, 11 Jan 2018 07:44:25 +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 CA027267866; Thu, 11 Jan 2018 07:44:16 +0100 (CET) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by alsa0.perex.cz (Postfix) with ESMTP id A86DA266F67 for ; Thu, 11 Jan 2018 07:44:14 +0100 (CET) Received: by mail-pf0-f195.google.com with SMTP id t12so871217pfg.2 for ; Wed, 10 Jan 2018 22:44:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vqTVrtRHmBsfzCCb2vlkZI1d2M/9zL1SUgw1dWkwLow=; b=DphPU+npP8xu+Ym7ZUfpoyK1FHBUDJGF51Or3Yad1J46LE+IlLai+GrK0xfPDwPtPQ DoM1M7RDxXYURvX8pmzuW1bfeiz7oAVKfMIbe76oXESGtJK9Wu91i5BKjRE1qgyalFiR bdoW1sDWU5IJdLqWq1pHUPpxkkkpQUxoOFE4sI18rOw644KRAtUX1cGWZ5z1TfIjucgz f/863CpSIXKUeG0F7Gw9nBgWjGwuziL8uAeTofvT2hbBjmYSCLhFAI1J2Va4hLe80e8O Ea+5ZiVe3sUwAwG5FX2wj0CnEmN7UugwU0JIVVrSIoK0BUwaxQ4235Qce7HYLe1LcQ6K KfIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vqTVrtRHmBsfzCCb2vlkZI1d2M/9zL1SUgw1dWkwLow=; b=Wk+Qvj7m8+z5k9dlP7BxyAePIPXVg+NAgblv/LhCrFGEG9zX2olEQyGX/xMmmnGFQt MdM0Kmmp07w3xdU+wvTMUwvLvHBEFjpNCWVYYxJ6qn8wjUeJNouOX9kYkIXYxt9pZ9Z2 5ZhUfPDs1vD17/KqJsaIsreXIfi7YCnN+O3OsZgxwWb61ucqNAMMW79QgDkkh9WyIqlj Dj7I4I3ItTgh/1Ppf0h2B1oK51jD9UaZFrmBoP9c97EX25ggVrt1km8PCGoGfQLbmVT9 S4MHve4OmpgBixH/er/1r0IhdvLECqSnx6Izk7O4SfKMPvdTHY27/R1N9FVvdxd+D47o PSVQ== X-Gm-Message-State: AKGB3mJo+l71dbdUJ8ewH00djwe8rYuOZVyD6M/U8ZOXBb1IaFOPMhMq f5jbdz/ddILrMxWBTg8T1RQ= X-Google-Smtp-Source: ACJfBoux89KHKnvWxxEEWUnaynFxKKaEnh3ugBfUkW0WwAihOvds8Lhm1LYZaK3FFDeY5oTD8VvzSQ== X-Received: by 10.84.215.216 with SMTP id g24mr22081650plj.30.1515653053569; Wed, 10 Jan 2018 22:44:13 -0800 (PST) Received: from Asurada-CZ80.localdomain (c-73-231-2-134.hsd1.ca.comcast.net. [73.231.2.134]) by smtp.gmail.com with ESMTPSA id b69sm27959666pfk.128.2018.01.10.22.44.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Jan 2018 22:44:13 -0800 (PST) From: Nicolin Chen To: timur@tabi.org, broonie@kernel.org, mail@maciej.szmigiero.name Date: Wed, 10 Jan 2018 22:43:08 -0800 Message-Id: <1515652995-15996-10-git-send-email-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515652995-15996-1-git-send-email-nicoleotsuka@gmail.com> References: <1515652995-15996-1-git-send-email-nicoleotsuka@gmail.com> Cc: alsa-devel@alsa-project.org, kernel@pengutronix.de, linux-kernel@vger.kernel.org, caleb@crome.org, lgirdwood@gmail.com, arnaud.mouiche@invoxia.com, lukma@denx.de, fabio.estevam@nxp.com, linuxppc-dev@lists.ozlabs.org Subject: [alsa-devel] [PATCH v2 09/16] ASoC: fsl_ssi: Set xFEN0 and xFEN1 together 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP It'd be safer to enable both FIFOs for TX or RX at the same time. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome --- sound/soc/fsl/fsl_ssi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 4399a22..e75b57d 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -586,6 +586,11 @@ static void fsl_ssi_setup_regvals(struct fsl_ssi *ssi) if (fsl_ssi_is_ac97(ssi)) vals[RX].scr = vals[TX].scr = 0; + if (ssi->use_dual_fifo) { + vals[RX].srcr |= SSI_SRCR_RFEN1; + vals[TX].stcr |= SSI_STCR_TFEN1; + } + if (ssi->use_dma) { vals[RX].sier |= SSI_SIER_RDMAE; vals[TX].sier |= SSI_SIER_TDMAE; @@ -986,14 +991,9 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev, SSI_SFCSR_TFWM0(wm) | SSI_SFCSR_RFWM0(wm) | SSI_SFCSR_TFWM1(wm) | SSI_SFCSR_RFWM1(wm)); - if (ssi->use_dual_fifo) { - regmap_update_bits(regs, REG_SSI_SRCR, - SSI_SRCR_RFEN1, SSI_SRCR_RFEN1); - regmap_update_bits(regs, REG_SSI_STCR, - SSI_STCR_TFEN1, SSI_STCR_TFEN1); + if (ssi->use_dual_fifo) regmap_update_bits(regs, REG_SSI_SCR, SSI_SCR_TCH_EN, SSI_SCR_TCH_EN); - } if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_AC97) fsl_ssi_setup_ac97(ssi);