From patchwork Tue Apr 4 20:28:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9662559 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 20E7160352 for ; Tue, 4 Apr 2017 20:36:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F1B92857E for ; Tue, 4 Apr 2017 20:36:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 019DA28589; Tue, 4 Apr 2017 20:35:59 +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 284742857E for ; Tue, 4 Apr 2017 20:35:58 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B168A266F1D; Tue, 4 Apr 2017 22:29:00 +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 C5689266F1E; Tue, 4 Apr 2017 22:28:59 +0200 (CEST) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by alsa0.perex.cz (Postfix) with ESMTP id DFEDB266F05 for ; Tue, 4 Apr 2017 22:28:55 +0200 (CEST) Received: by mail-oi0-f46.google.com with SMTP id r203so177255152oib.3 for ; Tue, 04 Apr 2017 13:28:55 -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=9O623wknouEog+FL7OAWGOG9WFA/CxxUffYw+Eiy89M=; b=IY02JNy7YHHaMwXFXBXg6Ye3XDwBb8vWEHXuhA/ycf1C/Yh/NJPG2fme/zZizfBlqn 30TGw+AbtTbxYL9xjLnliZFLGrJwfnKFIZwhqWk+GRmSqEcJJ2Oohy/8Ou/uJcLsTKIb AwmYUu+62dEBxK/meacCbIvHs4d8jQlLNbS3VxyzUH93s93RnbrQOBCYySHbFi7LvRiL aqEFENNom3msVFQGUxFJal1BHipazSbHN2Qc2vJKHDyFvenRlpYdkTB0h/3Oo5m+jsbr 3bZ7DJ5Mr0RLplvyjppoeFW6npi3YEmLknAeltLGwJh36KtMf0kyqj7jwyzN+5V5183s qNqg== 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=9O623wknouEog+FL7OAWGOG9WFA/CxxUffYw+Eiy89M=; b=UCjEecx+2JZkupSVzWCPQ7I1ysFzPx1Qs5hkrF5RIV5XYYvesAiMU10SVxEoYCSD7N yteLWTDb/TWK79k77rbnDmoHE4hoo7ly+Lpx+Qv+WjzHfvC3ryiqa3jQb4+GyQ3SG9c6 gsEpFb9NXmuZy1XIVPv9zfSbprx2O3QODAsaCaK9fEnP7+nm2Bk/tx5FhJe75cn1cFWy +H6DtuX18+G+GHiqLTP2jcpthC9oGOF6fEE2OmomendU56cwDyGWV5RViSzX8nmEbI9u ucsXOdDuKKNMcmlDCwkrMpA3d0Q1xpTkWiiCeJsisIbJSK3n8+Sn7r+gN7tMqnsvrPfl 6IZQ== X-Gm-Message-State: AFeK/H3SGTbLqTjn5XiheMOmYkzHdv3AzN+CakXAI0cy4mf2VCIEqoaUCpsuFnYv9nF/rI8y8jTyKMhzIaDTaw== X-Received: by 10.202.227.207 with SMTP id a198mr11453887oih.77.1491337734116; Tue, 04 Apr 2017 13:28:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.43.210 with HTTP; Tue, 4 Apr 2017 13:28:53 -0700 (PDT) In-Reply-To: <9c489e80-2579-3739-1343-2b3587667680@invoxia.com> References: <1491058131-31366-1-git-send-email-festevam@gmail.com> <9c489e80-2579-3739-1343-2b3587667680@invoxia.com> From: Fabio Estevam Date: Tue, 4 Apr 2017 17:28:53 -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 5:09 PM, Arnaud Mouiche wrote: > SCR bit 3 (NET) is also set, so you should be in network mode with a long > frame sync. > In fact, you can entirely simulate a I2S behavior using Network mode. you > should just be careful about the way everything is configured (eg. place of > samples in the stream) While debugging this issue I noticed that when I put the oscilloscope probe in the LRCLK SGTL5000 pin the swap did not occur anymore. After removing the probe the swap occurred frequently. So decided to change the SGTL5000 LRCLK pin strength value: and the swap does not happen. So it seems that no change is needed on the imx-ssi side :-) --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1118,7 +1118,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) SGTL5000_DAC_MUTE_RIGHT | SGTL5000_DAC_MUTE_LEFT); - snd_soc_write(codec, SGTL5000_CHIP_PAD_STRENGTH, 0x015f); + snd_soc_write(codec, SGTL5000_CHIP_PAD_STRENGTH, 0x035f); snd_soc_write(codec, SGTL5000_CHIP_ANA_CTRL, SGTL5000_HP_ZCD_EN |