From patchwork Fri Dec 21 15:21:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Code Kipper X-Patchwork-Id: 10740583 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C28FC6C5 for ; Fri, 21 Dec 2018 15:21:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE94228249 for ; Fri, 21 Dec 2018 15:21:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F13828305; Fri, 21 Dec 2018 15:21:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF43928249 for ; Fri, 21 Dec 2018 15:21:51 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A607B267AE5; Fri, 21 Dec 2018 16:21:25 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 453FA267AD6; Fri, 21 Dec 2018 16:21:20 +0100 (CET) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by alsa0.perex.cz (Postfix) with ESMTP id D8798267ACD for ; Fri, 21 Dec 2018 16:21:18 +0100 (CET) Received: by mail-lj1-f195.google.com with SMTP id g11-v6so5065725ljk.3 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=k7rKaPJ5j6PPLuCrX0AhDjl0cGEHKXtrFcnA55ywb/Bv0dig265I7o2uJYdPxMVLm/ 4JrcSaC3BKSRe+cwt8pS7JitQkNKkZkaamd1DsHZ9r0rYOQaruA+uvUv2ppvRJMidAVF m4qGWuMHGeJTQDxSezKkpMD/ftndy2FqiEbTQG0lBzmcgZobdFl5MsyGh7ghFdKd1aKK yIGjcBPeVxXjc6msQG/gMZZng9yD7gYVkbwUkHiao0U2IXtgBx5kw1R3+HnBxpInHuqy 44cKkEw7PeGag9X+vMI69oL3KeO1G0LKcxYTMw49IFMeZfbhdyJaQrU69IaNGjSutmd2 u84A== X-Gm-Message-State: AA+aEWYYtOS25bsUrNoL8NCUltPtU+JiVlNQGwPaP0WjsxTHsYrj74AF 8tZrv2+Y4qdfZI1vU/k1zL0= X-Google-Smtp-Source: ALg8bN7CioKpx+xsbgSjLD0bnfPUdQM43lHkATv4YHbnzslwvMy2Pgzi3IQPMeWIWPP96sf5VonMwA== 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 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 Cc: alsa-devel@alsa-project.org, Marcus Cooper , lgirdwood@gmail.com, linux-kernel@vger.kernel.org, be17068@iperbole.bo.it, broonie@kernel.org, linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH v3 4/9] ASoC: sun4i-i2s: Fix offset mask X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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);