From patchwork Tue Apr 4 17:12:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9662171 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 D550E602B9 for ; Tue, 4 Apr 2017 17:21:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C151A2823D for ; Tue, 4 Apr 2017 17:21:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B48282849A; Tue, 4 Apr 2017 17:21:00 +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 0F18A2823D for ; Tue, 4 Apr 2017 17:20:59 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id EA5DD26683C; Tue, 4 Apr 2017 19:12:38 +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 00604266EE4; Tue, 4 Apr 2017 19:12:37 +0200 (CEST) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by alsa0.perex.cz (Postfix) with ESMTP id 24FE6266834 for ; Tue, 4 Apr 2017 19:12:35 +0200 (CEST) Received: by mail-oi0-f44.google.com with SMTP id b187so170810127oif.0 for ; Tue, 04 Apr 2017 10:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=m/J2NrP61nmTeTztIAGnVskVkekWVqqEE9SV80KCHiY=; b=k7wmMatP+NQOWXYTPfIQPx3CLvRDLQ0COax4LTh1uLjtM3DUkiR5ucPx5tHBeR37z7 vTBOWy50KHmKD7ARENnXA+dDi8UngvzT668QtnU9OxJogy+61lN4n9wYoUJZacqYfWcu KS6ZVIWiJHRhH+P1YGxwLK4hDwaVVKBU/jUX3OtqeI46wikY0mO9gdkO/LYKW68uSnhK hN0zdYuMPGFbTfD3ABvnvXnEoO3JEhtFGn7+A4uOwhA1Snfip6X/z42MxYwoybZGuAst Hym0An37Yo+ie+yDaaGdg4kJaxGQ5VeWMsGCK91j95RHfc2edZE+LJ+zmhB55C+X6fmn 9BRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=m/J2NrP61nmTeTztIAGnVskVkekWVqqEE9SV80KCHiY=; b=ZN50Pv7d1jUtWHjUA8vbwtqjiJnpTce4SeVkDXj34Do3PKO2b8EnYlfbMN8bWidqpz gPPD5p0rhRS3fCoW5dZ++RjJZbEwwVS5hWjH3ssv+5VBQ1itEgm9EKTgkqMl0YBMcTXo Ry7E4ZH4PIYEvKdE/9NPzp2I1GHqOfV2dInpVfG7miyM2Fipr+sP4En3gZX97EqbSJ8V Cw5Tf9U30s2sRENApl4rrYtY2QgAGFs4gTaF2SAKmj2/xvxbnDwUsly6+pQ/+0u6VXei /jZYM9jr/3eYkrX+RTVq7PBJBHA4fcjQzneNpS2Zsmy8WezIALNzehxXUe9Gjomh5tkv g7Eg== X-Gm-Message-State: AFeK/H2x6fGc8L0RaKF/C8U1iMknIKVNbIGLyWHwBuvIW0eWISJLyOuGJnb2IclYIjZi4pwjJ3vrUzH2erIAPA== X-Received: by 10.202.227.207 with SMTP id a198mr11023557oih.77.1491325954263; Tue, 04 Apr 2017 10:12:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.43.210 with HTTP; Tue, 4 Apr 2017 10:12:33 -0700 (PDT) In-Reply-To: References: <1491058131-31366-1-git-send-email-festevam@gmail.com> From: Fabio Estevam Date: Tue, 4 Apr 2017 14:12:33 -0300 Message-ID: To: Arnaud Mouiche Cc: "alsa-devel@alsa-project.org" , Sascha Hauer , Timur Tabi , Caleb Crome , Nicolin Chen , Mark Brown , Max Krummenacher , Fabio Estevam Subject: Re: [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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Apr 4, 2017 at 8:38 AM, Fabio Estevam wrote: > I have the following SSI1 values (with the original 4.1-rc5 + pictrl patch): > > # cat /sys/kernel/debug/regmap/2028000.ssi/registers > 00: 00000200 > 04: 00000000 > 10: 0000105b Bits 6-5 (I2S_MODE) of register SCR are 10 of register SCR, which means I2S slave mode. The MX6 Reference Manual states: "In I2S slave mode(SSI_SCR[6:5]=10), the following settings are internally overridden by the hardware: Normal mode is selected (SSI_SCR[3]=0) Tx frame sync length set to one-bit-long-frame (SSI_STCR[1]=1) Rx frame sync length set to one-bit-long-frame (SSI_SRCR[1]=1)" so I tried not to use the the one-bit-long-frame (since ENGcm06222 is about bit length frame sync) override and changed it to I2S normal mode instead: and I do not get the channel swap anymore. In what cases could we safely switch to I2S normal mode? Thanks --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -973,7 +973,7 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev, ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_MASTER; break; case SND_SOC_DAIFMT_CBM_CFM: - ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_SLAVE; + ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_NORMAL; break; default: return -EINVAL;