From patchwork Mon Jan 15 23:16:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 10165475 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 EA496602C2 for ; Mon, 15 Jan 2018 23:20:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDAEF27F8E for ; Mon, 15 Jan 2018 23:20:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 942A827F94; Mon, 15 Jan 2018 23:20:34 +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 0EAF9283D8 for ; Mon, 15 Jan 2018 23:20:28 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 730A0267690; Tue, 16 Jan 2018 00:17: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 07CF926765E; Tue, 16 Jan 2018 00:17:40 +0100 (CET) Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) by alsa0.perex.cz (Postfix) with ESMTP id 41A26267651 for ; Tue, 16 Jan 2018 00:17:33 +0100 (CET) Received: by mail-pl0-f66.google.com with SMTP id 62so4728704pld.7 for ; Mon, 15 Jan 2018 15:17:33 -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=ucEcNZelYZxH0tKGKQMVRUwiW6RwTYGpOkPxOJu78H36uLgezkstVJo+0e6KqznASO oZuHvWVFYKe9eJyxLrYeRFCJfrbjFpW0GfGPT+7C3+SIlSm8Qdd6/64B4AdXB0dBBEpt 1K5dBnQiqcQBQQ5oSkJItoegIF2Jj0y3MpPyopueV8hMY1EScRDYth8GlVWNajaxgEm2 m3+6+hnXFQRayjhGpw9NZmvIF/+iCvkDTltFKdT/0h31VZF5+JIVidPvUfsixVgqjHLL athFI3hb1Y0SRzPZShjaOY1fAuWxoCC11zVfxlBaNEFWzGxPW2R62vhiZp43AQfaQpAV w2rw== 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=o7rGcWgw+dT1tiWXGtu5lx6PlHq6FS7ADoLOd14TdENHy39jjzZ82V1vE1NKUYVRMB UPmCY8ItgVrj4URjqbn7lFK3BxrE2pSm1xSaOPmthols3v/G0waGi5rcygxzkVYUYX7B 8GKWS/2fWcoJbtCyF5XKiusmVnuPqCIeOV3btgxsZ8yPcR3elg2jt+k83gXBWgPBhRJb qGA21gkgIQSrDgu4wsLYT+4KWA3KhR86QpuC6qynExkxnxsrzCsuBrpPBHF/Kgrq7ZwU UJvd/tK97h2O9mTEbI/DQTJT1eKVvsAlQrZTvBj55vYc3+qMR9izhYozvgQg2wWXDaVY xXiw== X-Gm-Message-State: AKGB3mIXSr07ZbXML5/lgFHwlWHcpfZg3FNLiaqYAhHBO/eR35Mr7Vgi OU9w1zmVufk76PcO3Wks22E= X-Google-Smtp-Source: ACJfBotLr7c763vhrdgI4C5PAEk4JTfBhy5VVmGh5rzCZ0ZXqC7US52ctaRNtRJ34RCocz54YP1SRA== X-Received: by 10.84.217.142 with SMTP id p14mr26261770pli.289.1516058252861; Mon, 15 Jan 2018 15:17:32 -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 b6sm776442pfe.85.2018.01.15.15.17.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Jan 2018 15:17:32 -0800 (PST) From: Nicolin Chen To: timur@tabi.org, broonie@kernel.org, mail@maciej.szmigiero.name Date: Mon, 15 Jan 2018 15:16:25 -0800 Message-Id: <1516058192-65519-11-git-send-email-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516058192-65519-1-git-send-email-nicoleotsuka@gmail.com> References: <1516058192-65519-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 v4 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);