From patchwork Sat Apr 1 14:48:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9658069 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 9923C602BC for ; Sat, 1 Apr 2017 14:49:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E9E7285E7 for ; Sat, 1 Apr 2017 14:49:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81A2C285ED; Sat, 1 Apr 2017 14:49:22 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, 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 76545285E7 for ; Sat, 1 Apr 2017 14:49:21 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E3EDE26680F; Sat, 1 Apr 2017 16:49:14 +0200 (CEST) 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 207EC266847; Sat, 1 Apr 2017 16:49:13 +0200 (CEST) Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) by alsa0.perex.cz (Postfix) with ESMTP id DE9DE26680A for ; Sat, 1 Apr 2017 16:49:10 +0200 (CEST) Received: by mail-qt0-f194.google.com with SMTP id n37so13737094qtb.3 for ; Sat, 01 Apr 2017 07:49:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=2I5xuyxGPNYDHveOR+UVJl8VZCc/iWCS1u/mbh7wqPM=; b=dfUjaQ/1hDoIvNRDi3Qe6df1D4uxC/YV7S1MjYolwr4QaQZuV8hADTBTi8xYCd832n WZKxH7nfwCvg3yPX/jBNjO1U5jb7GLSFvaU23E4yujZq+1mfzBdNTFixK+5MTAAnHCh9 MMHb1rhYJm/wWpp7d7bSkWMs3SzNFFCyvFFOE1Szi2SmV93ZZc8J/LVFL4YR7ot80dae tQjLyOb8erJikqjxKV8kzZcAS429kpwkO3WNB2KSiZJ57Iq5xz8dikyBQn27PWN4Zytk rsvQt0r8tQIMdGoBFed64Fup7D5jvscBB7rWajPhG/4aUtliu7cimrjwhN10ij35w2pI plew== 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; bh=2I5xuyxGPNYDHveOR+UVJl8VZCc/iWCS1u/mbh7wqPM=; b=mNtY6mbSP7JpdfFieHdBzNkpy2FEn1M0yhMIn15084eB5n+8q/bHGhm69ALasdiYad 9uKn82bx4liy8ijozesuQCQzL8zRg9RZtD2wYjL98oZRFvqfjRgk4Qs3UA6+5vZ1ctdH FLI8equW//birg0EyENyTlc5AX9d/jkYMVEtqaHdB5dhDXoiIpPbBfIJm/VI05wxY5vV EpsWY3Qe3Zba+N1aF6TIdmjQ4jRcW9KKyniW6rZDWWcjcDXXBIWKRB7mQf1ZUPToWR10 89yhT5WoUwA6PD5E/51uwxURnBdhXcpnjIU+ELCLOkl97ieUp1Wx2ZGjjaT+EoIqOsqN qDFg== X-Gm-Message-State: AFeK/H1LTAy/TPuKtFp8uOgan52NUgYJeSxGbu28XxoR08DDBs85b+r7SPFqRClij/68qg== X-Received: by 10.237.42.109 with SMTP id k42mr8749668qtf.52.1491058149219; Sat, 01 Apr 2017 07:49:09 -0700 (PDT) Received: from localhost.localdomain ([187.180.184.115]) by smtp.gmail.com with ESMTPSA id t2sm5784162qkh.0.2017.04.01.07.49.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 01 Apr 2017 07:49:08 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Sat, 1 Apr 2017 11:48:51 -0300 Message-Id: <1491058131-31366-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 Cc: alsa-devel@alsa-project.org, arnaud.mouiche@invoxia.com, timur@tabi.org, caleb@crome.org, nicoleotsuka@gmail.com, max.krummenacher@toradex.com, Fabio Estevam , kernel@pengutronix.de Subject: [alsa-devel] [PATCH v2] ASoC: fsl_ssi: Fix channel swap on playback start 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 From: Fabio Estevam Commit f8fdf5375e2005f2 ("ASoC: fsl-ssi: add SSIEN errata work around") implemented the workaround for the following erratum found on i.MX35 errata document: ENGcm06222: SSI:Transmission does not take place in bit length early frame sync configuration and also for ENGcm06222 from the same document. However it has been only applied for AC97 mode. Apply it to I2S mode as well so that it can fix audio channel swap during playback start. The channel swap can be noticed in about 10% of the times an audio track starts. With the recommended workaround in place no more channel swap happened after running audio start/stop sequence in more than 2000 times. Tested on a mx6dl-wandboard. Signed-off-by: Fabio Estevam Tested-by: Max Krummenacher --- Changes since v1: - Do not impact 61fcf10a0ee44763e0 ("ASoC: fsl_ssi: Fix channel slipping in Playback at startup") sound/soc/fsl/fsl_ssi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 17f92b8..549b2a5 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -575,7 +575,9 @@ static void fsl_ssi_config(struct fsl_ssi_private *ssi_private, bool enable, "Timeout waiting TX FIFO filling\n"); } } - regmap_update_bits(regs, CCSR_SSI_SCR, vals->scr, vals->scr); + regmap_update_bits(regs, CCSR_SSI_SCR, + CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_TE | CCSR_SSI_SCR_RE, + CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_TE | CCSR_SSI_SCR_RE); } }