From patchwork Wed May 4 16:21:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 9016361 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E52D3BF29F for ; Wed, 4 May 2016 16:23:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 125EA203AB for ; Wed, 4 May 2016 16:23:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1FAB6203B7 for ; Wed, 4 May 2016 16:22:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1axzZe-0004mk-IE; Wed, 04 May 2016 16:22:54 +0000 Received: from dougal.metanate.com ([90.155.101.14] helo=metanate.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1axzZL-0004a8-9g; Wed, 04 May 2016 16:22:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=metanate.com; s=stronger; h=Message-Id:Date:Subject:Cc:To:From; bh=Ygj/DO8Vcl5i1Tbz+eS2OFQJc2rXGl6RY2qsXs1Aafc=; b=Fq5SwAruGwfbO4pPEXFp/9fsRSyMxL4BazSWW8kTijGz5xBGxhf8FbTZ5DRKAHURQvsOmtXFVsxRBc8vRVosAX0qQHI9Whx2cdxDS3ba62hiGhIhqPzg4SpKZf8LUS3Q4YcfXyj+ELNSHHycrKwY7E1VuHZWDcxgTnJ6mq8jNv3XAd0+BIHcgAvUrRt+iKDNj8w7gXEIg71oqYxTmRqP14XqC6wzlO6sthQZahFgh+0KtyANup3dBwHaN0kmDRYXqmnFPmm6YB8ahdjdeE5vi3oJwaXJp4LY6lGqxgHjfVqdZ8EuTFhxEU9hoi17QttAAmvsnl1V3ByGhMLjk6g1kA==; Received: from brian ([192.168.88.1] helo=leela.metanate.com) by shrek.metanate.com with esmtpsa (TLSv1.2:AES128-SHA256:128) (Exim 4.83_RC2) (envelope-from ) id 1axzYp-0000Ax-5H; Wed, 04 May 2016 17:22:03 +0100 From: John Keeping To: alsa-devel@alsa-project.org Subject: [PATCH v2 1/2] ASoC: rockchip: Revert "ASoC: rockchip: i2s: remove unused variables" Date: Wed, 4 May 2016 17:21:56 +0100 Message-Id: <1462378917-24135-1-git-send-email-john@metanate.com> X-Mailer: git-send-email 2.8.0.rc4.238.g874082a X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160504_092235_553467_AEE47240 X-CRM114-Status: UNSURE ( 8.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.1 (----) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Enric Balletbo Serra , linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , linux-rockchip@lists.infradead.org, Mark Brown , John Keeping , Jaroslav Kysela , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit 5938448b99275cba95167c3f9d39ca9225fdad38. It turns out that the commit that made these variables unused is wrong so we're about to revert it. Bring back the variables in prepration. Signed-off-by: John Keeping --- v2: Add "ASoC: rockchip: " prefix to subject sound/soc/rockchip/rockchip_i2s.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index 2f8e20416bd3..34743ec61c49 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -34,6 +34,13 @@ struct rk_i2s_dev { struct regmap *regmap; +/* + * Used to indicate the tx/rx status. + * I2S controller hopes to start the tx and rx together, + * also to stop them when they are both try to stop. +*/ + bool tx_start; + bool rx_start; bool is_master_mode; }; @@ -77,7 +84,11 @@ static void rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on) regmap_update_bits(i2s->regmap, I2S_XFER, I2S_XFER_TXS_START, I2S_XFER_TXS_START); + + i2s->tx_start = true; } else { + i2s->tx_start = false; + regmap_update_bits(i2s->regmap, I2S_DMACR, I2S_DMACR_TDE_ENABLE, I2S_DMACR_TDE_DISABLE); @@ -115,7 +126,11 @@ static void rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on) regmap_update_bits(i2s->regmap, I2S_XFER, I2S_XFER_RXS_START, I2S_XFER_RXS_START); + + i2s->rx_start = true; } else { + i2s->rx_start = false; + regmap_update_bits(i2s->regmap, I2S_DMACR, I2S_DMACR_RDE_ENABLE, I2S_DMACR_RDE_DISABLE);