Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3337856imu; Sun, 11 Nov 2018 12:41:32 -0800 (PST) X-Google-Smtp-Source: AJdET5e53j9etZ5dWkki+DHugf02ipa9ij+CwSC4BLzRSxaKurUCt3zs9q4+5Ne3OZCRiqZ7i5zm X-Received: by 2002:a17:902:6bc1:: with SMTP id m1-v6mr17723989plt.34.1541968892132; Sun, 11 Nov 2018 12:41:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968892; cv=none; d=google.com; s=arc-20160816; b=mH1yTdN1pQtD1Gx/AODV1BQaR9wqt1tZXiao1eMvS7p4tO4lLa4ZyOThlItTuh4Nm3 BwmopAuycy5tSbKsWAofSmWd0r2rsYpA+6jdN8idVGCY+OlS1Z+ud+2z7Vfdce+P5bpB fm8UczVm0v4Ca9YwYpu0I+ejeHf6KPnA0LPmEdE06kjeD9Ksi7+2A9UoSoEn4anUIcva UrCcS6qCIeWGhjjZ6vMo1yPt7IkkYv6EeTRIjxAB3tcuGFaKLE/3q3DlInjFv3AV+/f3 Tqa+GUMvXs1RPR283s0PNH/bCyGKHk0S5fNjkruNUlT8OALxJ1WiBHeC1aUEpUyyt+mk /5qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=QuShAbhL96POg4eTFlMGCY9+JxXQkC4SG9g7Fg4G5Ck=; b=Y3TiaOkYf7EVJueZIJxAGuQiryrVaa/qPKMC8TgeQNlKCH5I8piJf141o6s2UBSK+F BTV6kblRpMEgKRzQmXiIYuY9p2dYnppANdJNuzXVkbzyM8OL21yPuiTFG/fZBBJdV45i B9hsKtzd7p3bm8NvXQaBW+pv9USOwUxapk/Fo0dJiwegjszGq92G2/YyOpMNclAt5rJZ NzylkbDIUuKeXBxVogAZQBr91UyOsqhynJD5lfX4q/52TqkB29qHidp7uxzrvfH7ep3N UrWdagEI62/hPSAibzPioXZdo9wDw3Sgkni47KEXB/oEuRD/Qq5ZJP3+Ybu1UGaVKACv gFyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3-v6si15965252pli.318.2018.11.11.12.41.17; Sun, 11 Nov 2018 12:41:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730141AbeKLGa3 (ORCPT + 99 others); Mon, 12 Nov 2018 01:30:29 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:49388 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729849AbeKLFsD (ORCPT ); Mon, 12 Nov 2018 00:48:03 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsQ-0000lM-GO; Sun, 11 Nov 2018 19:58:34 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsO-0001OM-6p; Sun, 11 Nov 2018 19:58:32 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Alexander Sverdlin" , "Mark Brown" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 029/366] ASoC: cirrus: i2s: Fix LRCLK configuration In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Alexander Sverdlin commit 2d534113be9a2aa532a1ae127a57e83558aed358 upstream. 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 Signed-off-by: Mark Brown Signed-off-by: Ben Hutchings --- 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(-) --- a/sound/soc/cirrus/edb93xx.c +++ b/sound/soc/cirrus/edb93xx.c @@ -67,7 +67,7 @@ static struct snd_soc_dai_link edb93xx_d .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, }; --- 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 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; } --- a/sound/soc/cirrus/snappercl15.c +++ b/sound/soc/cirrus/snappercl15.c @@ -72,7 +72,7 @@ static struct snd_soc_dai_link snappercl .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, };