From patchwork Wed Jan 17 06:51:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 10168649 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 CF01C60386 for ; Wed, 17 Jan 2018 06:55:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B971927F8F for ; Wed, 17 Jan 2018 06:55:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC61F2811E; Wed, 17 Jan 2018 06:55:24 +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 F1BB227F8F for ; Wed, 17 Jan 2018 06:55:23 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 18DB22677B6; Wed, 17 Jan 2018 07:52:47 +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 10A8D267772; Wed, 17 Jan 2018 07:52:39 +0100 (CET) Received: from mail-pl0-f67.google.com (mail-pl0-f67.google.com [209.85.160.67]) by alsa0.perex.cz (Postfix) with ESMTP id 56789267773 for ; Wed, 17 Jan 2018 07:52:36 +0100 (CET) Received: by mail-pl0-f67.google.com with SMTP id q2so8109262pll.3 for ; Tue, 16 Jan 2018 22:52:36 -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=2bJdEvn2gkToACZ4iPPC3XKWSIuEURQoLQsPOj4WRtE=; b=bzvHagEn4dCLDIMAmA7hgb4qXyl2+sGcrl4iWkiK8cPO+b4edLT2gEig6gaA7WqVoj wDzVlqhjcFbXoPZGcOoJyIaOoDNrjhqiY1Ooy3JXtop+5AF+4wyUs8H+UDNG/XMbFscf ZJjGHC5oVNZ9yIpdjuerzP28h7pjxEM8ZL2l/+dTs7LlqIZVrA9rt1wypJ+dfZ+MRIKk KIgNXVNJVSmP+Css0LsT5eSbQ66TfnlVQ5pVCOEPsiJzO7+KeRDqkdxBs2eSXCpRxQ2q FYBkp1cv522zDbgKpaK/HmMWtJoR8+9tGTOBiNOcDF/HyPTCc6ZjEL3ucwD6c1IAzHdq 8FsQ== 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=2bJdEvn2gkToACZ4iPPC3XKWSIuEURQoLQsPOj4WRtE=; b=aMR3KNxiAISRCzQzFy0HfPEFUKSW4N0u3TPRf3kv5JsJ0KNHI9EGh90SwXsQrOfdm6 J4uw1PqXrHdf4bzb5BoVCDUeLt/Qdf+aN1zHdiYUNakvEWKNKxM3qodGhEGktCBETAEU 9uP5ohE0K/fASUYWx2YEb7k2Q4bvCgqa9KWsZwipHyRImk8/IDG5McgM7rIrr7yx1i54 yC9fDvawvNzpKlGHXTHCQggCKiaJKckuuAH/9eDFHUe3yHufC1n0bgozvM2OHzvkPxCo QHucI0yFAXoXVRICOIP9Rd75JZLsQtxUEiaq79VOoh4Cr4HU/QGOgUJvkvyMl3tIXmrU tvEA== X-Gm-Message-State: AKwxytcFsPfgj1pp1a/UkUIm26D/Kyw2pPd9scLpIeJOy2jBjP4+S7Hz 5CChfdUaL5L+1utat4tNdtQ= X-Google-Smtp-Source: ACJfBotMif20T+NdMg9KYLWqiw7CgL0gR/XXe8VS9CDNQJccR+E6WaYWZCZav3yxf01EPhB0bhIPVg== X-Received: by 10.159.194.21 with SMTP id x21mr7824268pln.381.1516171955214; Tue, 16 Jan 2018 22:52:35 -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 e185sm7503221pfg.155.2018.01.16.22.52.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Jan 2018 22:52:34 -0800 (PST) From: Nicolin Chen To: timur@tabi.org, broonie@kernel.org, mail@maciej.szmigiero.name Date: Tue, 16 Jan 2018 22:51:35 -0800 Message-Id: <1516171902-32669-11-git-send-email-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516171902-32669-1-git-send-email-nicoleotsuka@gmail.com> References: <1516171902-32669-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 v5 10/17] 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 e5efee2..ba06e94 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -591,6 +591,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; @@ -991,14 +996,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);