From patchwork Sat Apr 28 20:51:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 10371707 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 45A776032A for ; Mon, 30 Apr 2018 12:40:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 351BA28AE9 for ; Mon, 30 Apr 2018 12:40:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29FA228AED; Mon, 30 Apr 2018 12:40:30 +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=-2.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=unavailable 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 8035A28AE9 for ; Mon, 30 Apr 2018 12:40:29 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 940FA267628; Mon, 30 Apr 2018 14:40:07 +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 3188426725C; Sat, 28 Apr 2018 22:52:37 +0200 (CEST) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by alsa0.perex.cz (Postfix) with ESMTP id 3D40E266C1C for ; Sat, 28 Apr 2018 22:52:34 +0200 (CEST) Received: by mail-lf0-f66.google.com with SMTP id w8-v6so7382406lfe.3 for ; Sat, 28 Apr 2018 13:52:34 -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:in-reply-to:references; bh=S5b/nKX7WoJFbAWJVD8hXjVq8dBIpvX1Afih5aujlow=; b=kLkL7bSjAkHCvzkXhPrO+LytQoPL48aWOnbSL5WC0F8+fHG5duQQG59G0glNUl/7OA 2aR2c6wes82oXfEYNj3g3H7k5bSrELW+AcFWBNN5liKB4x/vx3wfFFp4FaDYBwGSa6zC xkW6Ctyra142UVhRzOBUeVWTGnLY+3On6l/T+wbT1o8QgkAEhlT0AJuXHm/HNgqpua3t 5pJ40SHGml2U7RkAVZb4v/ldHHexF6h1ltlhgzP4XXExKbN0CCV4mHul2PKgLyDcVPTK NZoxmhv/5Dvl6x28uPTIiQ9vtz9FM9Yi9SDUbNURt5pEHzn9JFwoDtTMybDDUpSBMFRo KC8Q== 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=S5b/nKX7WoJFbAWJVD8hXjVq8dBIpvX1Afih5aujlow=; b=JPI6Hx+bU2TYlgnZ8xX89tjVKqIZ4mRlK5i0mOS5Ci9DEwwpiYo/LO3FPdzeJfdpLV s8IkM4FHoJEMLmcLTHJRLSgKI8HptCUaYmRAWeVjFtFmg9kyB7OwbbZwbQNvz/FjrTmy 6hL9dUoT+ANkPj9W/wjMHlYsmmzUX1JBXp/dBVJuEWfTe2S8LRsOtQEjuj+EebFI/aIy xw1M8c9N1o4WhWelSzEUHX+3Uh7JOrDbdpPGJ6LyLO1yEjJ/4ffmdd3KHATtBWazQPHI qNnBytAwMLRnd/fcMsTfLlmLjx7kXB5zLUZ8FrMsXFsiK0WcK5qtctSzi3nSNn/dMO4B lHYQ== X-Gm-Message-State: ALQs6tBfNkqu2Yr8Stl40EU4nAADbsQFBJnpTigDZlF8HtHRVRjVTzgQ AT36sphpU00LuSDaYTpGdsY2p0bp X-Google-Smtp-Source: AB8JxZpMwTaZ2lD+QooCzQGJ+3nqWsVYRwiYKcJWv7Gub/MCaeJ1NXmA6c3NL53ILaVtZaV/dDL68A== X-Received: by 2002:a19:d14a:: with SMTP id i71-v6mr4054762lfg.1.1524948754405; Sat, 28 Apr 2018 13:52:34 -0700 (PDT) Received: from giga1.localdomain ([195.245.44.8]) by smtp.gmail.com with ESMTPSA id t24-v6sm852578ljg.65.2018.04.28.13.52.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Apr 2018 13:52:33 -0700 (PDT) From: Alexander Sverdlin To: alsa-devel@alsa-project.org Date: Sat, 28 Apr 2018 22:51:38 +0200 Message-Id: <20180428205142.31921-2-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180428205142.31921-1-alexander.sverdlin@gmail.com> References: <20180428205142.31921-1-alexander.sverdlin@gmail.com> X-Mailman-Approved-At: Mon, 30 Apr 2018 14:39:59 +0200 Cc: Ryan Mallon , Takashi Iwai , Liam Girdwood , Hartley Sweeten , Mark Brown , Alexander Sverdlin , linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH 1/5] ASoC: cirrus: i2s: Fix LRCLK configuration 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 The bit responsible for LRCLK polarity is i2s_tlrs (0), not i2s_trel (2) (refer to "EP93xx User's Guide"). Previously card drivers which specified SND_SOC_DAIFMT_NB_IF actually got SND_SOC_DAIFMT_NB_NF, an adaptation is necessary to retain the old behavior. Signed-off-by: Alexander Sverdlin --- sound/soc/cirrus/edb93xx.c | 2 +- sound/soc/cirrus/ep93xx-i2s.c | 8 ++++---- sound/soc/cirrus/snappercl15.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/cirrus/edb93xx.c b/sound/soc/cirrus/edb93xx.c index c53bd6f2c2d7..3d011abaa266 100644 --- a/sound/soc/cirrus/edb93xx.c +++ b/sound/soc/cirrus/edb93xx.c @@ -67,7 +67,7 @@ static struct snd_soc_dai_link edb93xx_dai = { .cpu_dai_name = "ep93xx-i2s", .codec_name = "spi0.0", .codec_dai_name = "cs4271-hifi", - .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | + .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &edb93xx_ops, }; diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c index 934f8aefdd90..38c240c97041 100644 --- a/sound/soc/cirrus/ep93xx-i2s.c +++ b/sound/soc/cirrus/ep93xx-i2s.c @@ -213,24 +213,24 @@ static int ep93xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, switch (fmt & SND_SOC_DAIFMT_INV_MASK) { case SND_SOC_DAIFMT_NB_NF: /* Negative bit clock, lrclk low on left word */ - clk_cfg &= ~(EP93XX_I2S_CLKCFG_CKP | EP93XX_I2S_CLKCFG_REL); + clk_cfg &= ~(EP93XX_I2S_CLKCFG_CKP | EP93XX_I2S_CLKCFG_LRS); break; case SND_SOC_DAIFMT_NB_IF: /* Negative bit clock, lrclk low on right word */ clk_cfg &= ~EP93XX_I2S_CLKCFG_CKP; - clk_cfg |= EP93XX_I2S_CLKCFG_REL; + clk_cfg |= EP93XX_I2S_CLKCFG_LRS; break; case SND_SOC_DAIFMT_IB_NF: /* Positive bit clock, lrclk low on left word */ clk_cfg |= EP93XX_I2S_CLKCFG_CKP; - clk_cfg &= ~EP93XX_I2S_CLKCFG_REL; + clk_cfg &= ~EP93XX_I2S_CLKCFG_LRS; break; case SND_SOC_DAIFMT_IB_IF: /* Positive bit clock, lrclk low on right word */ - clk_cfg |= EP93XX_I2S_CLKCFG_CKP | EP93XX_I2S_CLKCFG_REL; + clk_cfg |= EP93XX_I2S_CLKCFG_CKP | EP93XX_I2S_CLKCFG_LRS; break; } diff --git a/sound/soc/cirrus/snappercl15.c b/sound/soc/cirrus/snappercl15.c index 2334ec19e7eb..11ff7b2672b2 100644 --- a/sound/soc/cirrus/snappercl15.c +++ b/sound/soc/cirrus/snappercl15.c @@ -72,7 +72,7 @@ static struct snd_soc_dai_link snappercl15_dai = { .codec_dai_name = "tlv320aic23-hifi", .codec_name = "tlv320aic23-codec.0-001a", .platform_name = "ep93xx-i2s", - .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | + .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &snappercl15_ops, };