From patchwork Wed Nov 8 15:47:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 118287 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5448614qgn; Wed, 8 Nov 2017 07:47:26 -0800 (PST) X-Google-Smtp-Source: ABhQp+QxhCngkOR8yW51i1qiHHmcigs67FGKRVMDRSeKVG0cBmF5kOiVKf7L/DwvPSAgGye72Rk5 X-Received: by 10.159.206.198 with SMTP id x6mr829842plo.35.1510156046572; Wed, 08 Nov 2017 07:47:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510156046; cv=none; d=google.com; s=arc-20160816; b=t4kvnbtp6KtWoHqQFI622KOSrB+IyQehyao42CCQWtBb2S4xiV6uRVuRFUQE8QMVE2 mkR3tLB7fHdDwOc73Jrf1BpyhKw5VUU+AyGQVSJ1uONQjVD/a4WRYWfHK4yY3bGP3cnd gZttL6Pmy1F8oCmL5Z2BJzIfw50KdAFSjLQAipIzdxv5dj6+bLsthUPLtELsNrKxp8W+ mGcuDhPa5BDQDKJdFl2t/BVblXTOoUWl+s17iroesB4DsKnrO0lAQ+ZOvIAr48Dxm+ch QwZm4XKi+fwB7Qn9ppgyOYAX7ovoDgswgEBBtyYIxIt3aqQyijQckyaXsfcv9gQwNzI7 KD1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=v4s1V47oUom5Ib0qwDPvGxsiB5A6prDgJiVFt4v/JLI=; b=wiWeleCWTSGgNoszvDvUBsCRe5Wk2sjZzUbzVpmovvTg8Mt/SXnFGkBc6NINd13F7O UsjemQLLBrOSJSUT2lJMXgSAY0cU0bdt7tEo0IPburFyS4fRmrmTJbBmu4lCDaNTLEAi ww2J++YL/JIj1z098D7vnnQX1pAJJEQqpmCfr9/qONOXOZHJOfb8+LQrqMWYBU+AQ42O KIWDz5f32WPGL6MDqNMsAmgphBxKANYkJI0RN4U3Yrx9n1nD8VVpTTFkK8Jo0e243Sf8 qt8UqvwYyxTzvTyqIE+c6nLmw8vkQ4Ad2QrFpOFrdoXwTjdVLopx3eZNwmbYSmbJKj4e SmcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 m6si4025896pgu.691.2017.11.08.07.47.26; Wed, 08 Nov 2017 07:47:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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 stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752693AbdKHPrW (ORCPT + 9 others); Wed, 8 Nov 2017 10:47:22 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:44596 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752692AbdKHPrV (ORCPT ); Wed, 8 Nov 2017 10:47:21 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 2AAC720955; Wed, 8 Nov 2017 16:47:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 02E2C2068C; Wed, 8 Nov 2017 16:47:18 +0100 (CET) From: Maxime Ripard To: broonie@kernel.org, lgirdwood@gmail.com, Chen-Yu Tsai , Maxime Ripard Cc: Mylene Josserand , linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Thomas Petazzoni , codekipper@gmail.com, stable@vger.kernel.org Subject: [PATCH 3/3] ASoC: sun8i-codec: Fix left and right channels inversion Date: Wed, 8 Nov 2017 16:47:10 +0100 Message-Id: <20171108154710.16407-4-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171108154710.16407-1-maxime.ripard@free-electrons.com> References: <20171108154710.16407-1-maxime.ripard@free-electrons.com> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Since its introduction, the codec had an inversion of the left and right channels. It turned out to be pretty simple as it appears that the codec doesn't have the same polarity on the LRCK signal than the I2S block. Fix this by inverting our bit value for the LRCK inversion. Fixes: 36c684936fae ("ASoC: Add sun8i digital audio codec") Cc: Signed-off-by: Maxime Ripard --- sound/soc/sunxi/sun8i-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.14.3 Reviewed-by: Chen-Yu Tsai diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c index 522546e6b153..c8dcb1502d74 100644 --- a/sound/soc/sunxi/sun8i-codec.c +++ b/sound/soc/sunxi/sun8i-codec.c @@ -200,7 +200,7 @@ static int sun8i_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) value << SUN8I_AIF1CLK_CTRL_AIF1_BCLK_INV); regmap_update_bits(scodec->regmap, SUN8I_AIF1CLK_CTRL, BIT(SUN8I_AIF1CLK_CTRL_AIF1_LRCK_INV), - value << SUN8I_AIF1CLK_CTRL_AIF1_LRCK_INV); + !value << SUN8I_AIF1CLK_CTRL_AIF1_LRCK_INV); /* DAI format */ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {