Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1275293imu; Fri, 21 Dec 2018 16:27:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/XRfz0SjuU81golXbFgas2w/wiUEi1g76TasH63VA1ayIUFpkHvv3gFER7mKdz6rtwYirKP X-Received: by 2002:a62:44d8:: with SMTP id m85mr4664990pfi.164.1545438442890; Fri, 21 Dec 2018 16:27:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545438442; cv=none; d=google.com; s=arc-20160816; b=Ca/bG4QTBfdTUA4iWQKF2PXE1AIrMv5tpbW9+7IhsJ8QgYxQGp0YJ75ibyOj27WpZN sNWN6U/fnbtvv1rPYruoYzJXVmQMrCE/EZHy8pysJ7cVjzrn1Zlal6YCL4c1E/YrBOxo bMlXAOg1z78lx113PpQwvmXxXoqBJNo54MlkXM+idfF+HLyG7iq309Lt7BSpavMnmTiO 7V2SOO9LTY5XCZ5vmQU5iLmewegVv2AIif25rmpZLoNDIsKB7DTjLIsMuHPy61Mb8RMh EXy9uEonlb6sX5w5YveJ46fAeN07hoDtlgjtRG6OaUqsm91YYQyRCTObSbN6wvJ4dJoF g2Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=k1qbR0f7/OKaG3uk0h/lc5XdCr3NJKWBkdbvBaKq80A=; b=aDBIQUJR3PZDVgY28l25A6XtkTPRRJ6D8ribuDSUXx79hwPLOQ4EgZ0zjDQQCNRzCu dGFpxVx1+Eykv71+eNcW39Ia6wsmOryNb4UtOXMDfKbOZVBHWCY9Fbu5vEpJ6S3srq4i RMptWDW8xrHp5nbQclWzPGtk0hW+To0oeMMZCts56JnMeYYJ/PWE25YmV4Rw78a+cGpt X3McOgTmCe6CV/dT2ufQGFYmiD8Jurg+IYv57ZKtP8JV6bZBkK8Wj530eQ0meL4Y6p0q XNh2onG0vYQQ2KZOGWBU9gFKNIrXPi3LlWNFLQt4cLq4ZsiiSZc8Fta6GpslJxml2q+V hnMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EuWu1PCl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3si23171923pfb.152.2018.12.21.16.27.07; Fri, 21 Dec 2018 16:27:22 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EuWu1PCl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390971AbeLUPVW (ORCPT + 99 others); Fri, 21 Dec 2018 10:21:22 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:37259 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730002AbeLUPVT (ORCPT ); Fri, 21 Dec 2018 10:21:19 -0500 Received: by mail-lj1-f196.google.com with SMTP id t18-v6so5055409ljd.4 for ; Fri, 21 Dec 2018 07:21:18 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=k1qbR0f7/OKaG3uk0h/lc5XdCr3NJKWBkdbvBaKq80A=; b=EuWu1PClYpwp9gdZ17n750bQjIT94h6/zAyN33C9bfXmrfT+wvk5gOL7dNRZaGYwah 8FxmTqFa1XS5Ejuh7K7UJaB1b5hqTw/rNIdf8/lhH06psbomy0Jr2DNpuvkZOIU8Dc55 CijO19JmtXQyA1p34V+suC2X3IyiK1EVNwyNhMZbIs/cirB9qvHA3gxrXwZ/uN20ACWS UH/St2n/Go9gu93UXpwWsA4+5h3O+iHFwaR8YLij8x94BbPUqGrSGLES9DY22ULZjf+s MUDLHOhOpiwesuKj4LUPx6rFb7wjDlmvbD1ZgEXR0l7odLPfa7qzFaZq2jVpCzHApmrq /rHw== 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:mime-version:content-transfer-encoding; bh=k1qbR0f7/OKaG3uk0h/lc5XdCr3NJKWBkdbvBaKq80A=; b=AeNOMzMQDQN8RGBUSCbyVrfgt8oBTKPd091an/0oT/w7rd8IN5/LhFE9tAqxLqFRuw gkMbzBTUt3GZt4QR5vapOW6xffRb4yz+gHTPJGYsdLhJtg4LwEhIYntoExK06CSSRyxo rQtvsivyV+YBWjrzv2IrKr+TGadZ3AwE+2/G8cI7wBBPh+CzX4KYB7LENII3Tb9ckn1o EyBRzqEanI6XA8fgiJsIiMQAyuipCFHVbXnCm85wiE7r8cSLJfF/SoDutE+nu4RhIhoB 6qmNx+ozdsiijNsUArF+yT/24luDG4owlUI/R+CrY6shKeGKA2+Q4Ah8bY50zv6PFkEs 2nHg== X-Gm-Message-State: AA+aEWZeHHVbyIinlEmyLWY+b2azKDFY8dcVcr4/uhslWiengI0+PdVY Inu6fqKNU5++XHU7I5F0sUA= X-Received: by 2002:a2e:5356:: with SMTP id t22-v6mr1827643ljd.26.1545405677647; Fri, 21 Dec 2018 07:21:17 -0800 (PST) Received: from localhost.localdomain (c90-142-43-138.bredband.comhem.se. [90.142.43.138]) by smtp.gmail.com with ESMTPSA id q30sm5005601lfi.94.2018.12.21.07.21.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Dec 2018 07:21:16 -0800 (PST) From: codekipper@gmail.com To: maxime.ripard@free-electrons.com, wens@csie.org, linux-sunxi@googlegroups.com Cc: linux-arm-kernel@lists.infradead.org, lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, be17068@iperbole.bo.it, Marcus Cooper Subject: [PATCH v3 4/9] ASoC: sun4i-i2s: Fix offset mask Date: Fri, 21 Dec 2018 16:21:05 +0100 Message-Id: <20181221152110.17982-5-codekipper@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181221152110.17982-1-codekipper@gmail.com> References: <20181221152110.17982-1-codekipper@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marcus Cooper Also add offset to RX channel select Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index adb988ae9ac5..93a484d7e228 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -110,7 +110,7 @@ #define SUN8I_I2S_TX_CHAN_MAP_REG 0x44 #define SUN8I_I2S_TX_CHAN_SEL_REG 0x34 -#define SUN8I_I2S_TX_CHAN_OFFSET_MASK GENMASK(13, 11) +#define SUN8I_I2S_TX_CHAN_OFFSET_MASK GENMASK(13, 12) #define SUN8I_I2S_TX_CHAN_OFFSET(offset) (offset << 12) #define SUN8I_I2S_TX_CHAN_EN_MASK GENMASK(11, 4) #define SUN8I_I2S_TX_CHAN_EN(num_chan) (((1 << num_chan) - 1) << 4) @@ -482,6 +482,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