Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C89BC4646B for ; Wed, 26 Jun 2019 03:45:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CDFD20659 for ; Wed, 26 Jun 2019 03:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520739; bh=ntDn/5Ibl0X40a5IfnDl99b4+u/YnZVgRQ0xXRCO7Jc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=kt9Bb0G7Lm1EHKm3Mu/cdO3t1BO3x/gHEd3N8NTVmSM2tgOgiPoly8xhMiHTcSAKF gKRMMbjM7k2uPnXkdxV6I9uO5BOUVqWA1+yL5oXYuspGVBSH90JiWLxLQJbRU576IX A+7bcNFrEBa/0R9caFvQlbVMay8NkcwKYHbyFhNE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727036AbfFZDpg (ORCPT ); Tue, 25 Jun 2019 23:45:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:57288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726994AbfFZDpg (ORCPT ); Tue, 25 Jun 2019 23:45:36 -0400 Received: from sasha-vm.mshome.net (mobile-107-77-172-74.mobile.att.net [107.77.172.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B7874205ED; Wed, 26 Jun 2019 03:45:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520735; bh=ntDn/5Ibl0X40a5IfnDl99b4+u/YnZVgRQ0xXRCO7Jc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r0fSeKHyST0Yg87+n9Jo/uzJBd82NRNaGVr9/RoCHxberqnXo+SaBeT4eBW5+rRS3 wVU31E5geX0KbuhCBTLO+CT+yZiLNNf2Xgz3xmYBg32kcqy/HAYqdYqZEgLIUA2cvw hE9c7akoaLWZVIZtYCuUQDdv3+hi+mhNUf7SRH5c= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Marcus Cooper , Maxime Ripard , Chen-Yu Tsai , Mark Brown , Sasha Levin Subject: [PATCH AUTOSEL 4.14 11/21] ASoC: sun4i-i2s: Add offset to RX channel select Date: Tue, 25 Jun 2019 23:44:56 -0400 Message-Id: <20190626034506.24125-11-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626034506.24125-1-sashal@kernel.org> References: <20190626034506.24125-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marcus Cooper [ Upstream commit f9927000cb35f250051f0f1878db12ee2626eea1 ] Whilst testing the capture functionality of the i2s on the newer SoCs it was noticed that the recording was somewhat distorted. This was due to the offset not being set correctly on the receiver side. Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sunxi/sun4i-i2s.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index a10913f8293f..da0a2083e12a 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -442,6 +442,10 @@ static int sun4i_i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG, SUN8I_I2S_TX_CHAN_OFFSET_MASK, SUN8I_I2S_TX_CHAN_OFFSET(offset)); + + regmap_update_bits(i2s->regmap, SUN8I_I2S_RX_CHAN_SEL_REG, + SUN8I_I2S_TX_CHAN_OFFSET_MASK, + SUN8I_I2S_TX_CHAN_OFFSET(offset)); } regmap_field_write(i2s->field_fmt_mode, val); -- 2.20.1