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: 10370373 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 E036860116 for ; Sat, 28 Apr 2018 20:54:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C951528F5B for ; Sat, 28 Apr 2018 20:54:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB29828FB8; Sat, 28 Apr 2018 20:54:31 +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.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CF52C28F5B for ; Sat, 28 Apr 2018 20:54:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=DnXHvWjcqcyLDBFsCC1xuRMvBT8xoiM2YK3T769RiwQ=; b=nLGwbX446wnOieZhTxX0ojbINY p/mnL4PdOjdYymHOZ+FXDLz29Zs+/gQGPG0YcoRFBZa6z1yhDz0KQjQCw6qv0A1duj3uk7BLSepZB 6X7e/atNMnAblbj+p2eaavSZGJ6BIE1iW0YrIRgDpLd0VKGR4FEj9hdxJv9x35AIfHHA4XHjRNZVq nfZt7jyRY5NF7ZDBw1yx9R5jEpCDA9M+riCqUkTUqVqCwucyqgmq+Qe9ofYnUT3Mo4CT7IRqIR1vd jG+Swo838NEy9GM8ObWe5u4bVFWv/xo0UWXqcM5UZZymVT1lDL5oroNlHzrMJhFJ3NhHhmAP9ZyAa R3bAF/sQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fCWrN-0000AN-Gf; Sat, 28 Apr 2018 20:54:21 +0000 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fCWps-0007z6-Gj for linux-arm-kernel@lists.infradead.org; Sat, 28 Apr 2018 20:52:51 +0000 Received: by mail-lf0-x243.google.com with SMTP id o123-v6so7360573lfe.8 for ; Sat, 28 Apr 2018 13:52:35 -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=sXrJEbpYtmK83i3K51kc/Cad9naLCWcsmBdkmGgaPwWLaR89ulSa5zRnEel1JYOVmS BVWABmBKPv7t1G4tIzcLqVncmEBaE87vriQqjnHNm+qX910Xr5Dh8FATxNGWlRRoURlo ebF46PcRsm72EZQTD1d5Yt6SqQTDOCnbBUbZ0CuCNaVSeOtDh9juO6KUw2P1KO8IuMvo 2184wT6oC+fqYSCck3RHbdjXAJ1M6lFkkBqVXhSbqfWDMjWXBzYf1M+A/9K/oCcuPUSn p5i8hNSZIOwNVYo5MbHtR/hwXylPiMe9CDZd3gcGZLNWnnSZJZ48qB16mVEkyYehoqne tOzg== X-Gm-Message-State: ALQs6tBD/8+fHYxYJ0sOzl8ihjmob/0SJDqrPHtlTJ9iMf1ajZrrKSvT A0aQ6XncYGx9nUJgCot7IJA= 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 Subject: [PATCH 1/5] ASoC: cirrus: i2s: Fix LRCLK configuration 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180428_135248_555408_B763AF31 X-CRM114-Status: GOOD ( 13.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ryan Mallon , Takashi Iwai , Liam Girdwood , Hartley Sweeten , Mark Brown , Jaroslav Kysela , Alexander Sverdlin , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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, };