alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Enric Balletbo i Serra <enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	John Keeping <john-HooS5bfzL4hWk0Htik3J/w@public.gmane.org>,
	Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Subject: [PATCH 1/7] ASoC: rockchip: Revert "ASoC: rockchip: i2s: remove unused variables"
Date: Thu,  5 May 2016 10:03:35 +0200	[thread overview]
Message-ID: <1462435421-21205-2-git-send-email-enric.balletbo@collabora.com> (raw)
In-Reply-To: <1462435421-21205-1-git-send-email-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>

From: John Keeping <john-HooS5bfzL4hWk0Htik3J/w@public.gmane.org>

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 <john-HooS5bfzL4hWk0Htik3J/w@public.gmane.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---
 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 2f8e204..34743ec 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);
 
-- 
2.1.0

  parent reply	other threads:[~2016-05-05  8:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05  8:03 [PATCH 0/7] ASoC: rockchip: Fix audio on Veyron Enric Balletbo i Serra
2016-05-05  8:03 ` [PATCH 2/7] ASoC: rockchip: Revert "ASoC: rockchip: i2s: separate capture and playback" Enric Balletbo i Serra
     [not found] ` <1462435421-21205-1-git-send-email-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2016-05-05  8:03   ` Enric Balletbo i Serra [this message]
2016-05-05  8:03   ` [PATCH 3/7] ASoC: rockchip-max98090: Fix NULL pointer de reference while accessing to jack Enric Balletbo i Serra
     [not found]     ` <1462435421-21205-4-git-send-email-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2016-05-10 18:50       ` Applied "ASoC: rockchip-max98090: Fix NULL pointer dereference while accessing to jack." to the asoc tree Mark Brown
2016-07-04  7:24         ` Enric Balletbo Serra
2016-07-04  8:47           ` Mark Brown
2016-07-04 15:13             ` Enric Balletbo Serra
2016-05-05  8:03   ` [PATCH 4/7] ASoC: rockchip-max98090: Fix the Headset Mic route Enric Balletbo i Serra
2016-05-05 19:18     ` Mark Brown
2016-05-10 18:49     ` Applied "ASoC: rockchip-max98090: Fix the Headset Mic route." to the asoc tree Mark Brown
2016-05-05  8:03   ` [PATCH 5/7] ASoC: rockchip-max98090: Fix DAPM unknown pin for Headset Jack Enric Balletbo i Serra
2016-05-05 19:20     ` Mark Brown
2016-05-05  8:03   ` [PATCH 6/7] ARM: dts: rockchip: Add shared file for audio related nodes for veyron boards Enric Balletbo i Serra
2016-05-05  8:03   ` [PATCH 7/7] ARM: dts: rockchip: veyron: Add analog audio codecs Enric Balletbo i Serra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462435421-21205-2-git-send-email-enric.balletbo@collabora.com \
    --to=enric.balletbo-zgy8ohtn/8qb+jhodadfcq@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=john-HooS5bfzL4hWk0Htik3J/w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).