Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9078777pxu; Mon, 28 Dec 2020 06:08:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2LpqrX2iQ2fwHSRdHh4xFpbnRmlDHahVoeafdQSrsW3Kbszd0mUeZeTeZyGQSNr1hHrkE X-Received: by 2002:a17:906:3101:: with SMTP id 1mr29540168ejx.115.1609164503896; Mon, 28 Dec 2020 06:08:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164503; cv=none; d=google.com; s=arc-20160816; b=yMJwmHL1VOqDYNCn3FfE6hHNF9xHt6P+T06BPmW6Ekt5kshqY5na//wL7K1Sd2CnE+ P4KzVFO75FpBlKhgPMzSkItb4XQnLgyfXwRS+IBAdi+B2wJasIdlYNbAV2u2N7d18FAh 4kDqqdjEM611q79JvfaLtoJvZVccBXKTIwGPyqsKS6U08eyS1LfaTK+9CQ1/Y+iAHyTV o+8bWZmqgf1gLm0cFZvO58qgedsbKuH/BHtWYSXvFiQTw+do5FAYDiR1cQvdAzKajg8A sneZxkRW9c5xTES9RPfwGV9IjofdC3xQabqkBGMIGCERpyYtC4fbXudqmy0dWyMyrhjj 9sPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=w5efHgQSOhMI+26/Fr/hrgky3wEXnXrIf5Nfi++dk7E=; b=EEtuL8LT6VA41uG5l8PH/u/bYSzmwsoBXvYWqieI4HPapoo939vGo0wGPak26brkBO ejyxLeTfnoKl81EQy/2BcRLPnHXDGrBHNCU2UN5jpZPE3gebZlOhWR3pWwYs1pix4NeS Prl3RCtE6INJgNceaL9dqeofLCFVOMgO+A+0X5Dnk55mfk6r+YtcQbOD/y1gNOlTpnD9 vC2vn/lICaOjkQL12/AP1dipc0+2uAEj2bY9615kwnMQiEx/rzbOAX6bFGYKQP095ck0 x5JMZksGDapsyL2Utq/pv+DGJw0L6K/LgL3OPtTCIP51mnltvHenJTuze7cgBepI4ba6 sEYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NAiA8JH1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kt6si4262651ejb.378.2020.12.28.06.07.58; Mon, 28 Dec 2020 06:08:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NAiA8JH1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437068AbgL1ODG (ORCPT + 99 others); Mon, 28 Dec 2020 09:03:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:34300 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405382AbgL1OAv (ORCPT ); Mon, 28 Dec 2020 09:00:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 24E69207A9; Mon, 28 Dec 2020 14:00:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164035; bh=qqtKRGqosenZUn87HwPYrHaWyxsihkhZ0Lfxn8GA+0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NAiA8JH11sER+f3raZHGN29rn983nMAxBPmtATZxc0PofoUimUs+sxaqlhmoVg0ql SGeIHHJO8sGRlnBxitKc9/9OIMagt7XK3qlit/NxoqZ903P3gYQMFEZiV3Qhs27eRR TdgPHY8RV5bj2PeSXqFWtT3R1PsnEoH1knwLaMW4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= , Maxime Ripard , Mark Brown , Sasha Levin Subject: [PATCH 5.10 037/717] ASoC: sun4i-i2s: Fix lrck_period computation for I2S justified mode Date: Mon, 28 Dec 2020 13:40:35 +0100 Message-Id: <20201228125022.763042001@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Clément Péron [ Upstream commit 93c0210671d8f3ec2262da703fab93a1497158a8 ] Left and Right justified mode are computed using the same formula as DSP_A and DSP_B mode. Which is wrong and the user manual explicitly says: LRCK_PERDIOD: PCM Mode: Number of BCLKs within (Left + Right) channel width. I2S/Left-Justified/Right-Justified Mode: Number of BCLKs within each individual channel width(Left or Right) Fix this by using the same formula as the I2S mode. Fixes: 7ae7834ec446 ("ASoC: sun4i-i2s: Add support for DSP formats") Signed-off-by: Clément Péron Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201030144648.397824-2-peron.clem@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sunxi/sun4i-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index f23ff29e7c1d3..a994b5cf87b31 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -450,11 +450,11 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, switch (i2s->format & SND_SOC_DAIFMT_FORMAT_MASK) { case SND_SOC_DAIFMT_DSP_A: case SND_SOC_DAIFMT_DSP_B: - case SND_SOC_DAIFMT_LEFT_J: - case SND_SOC_DAIFMT_RIGHT_J: lrck_period = params_physical_width(params) * slots; break; + case SND_SOC_DAIFMT_LEFT_J: + case SND_SOC_DAIFMT_RIGHT_J: case SND_SOC_DAIFMT_I2S: lrck_period = params_physical_width(params); break; -- 2.27.0