diff mbox

[LTSI-3.14,028/894] ASoC: rsnd: merge rsnd_scu_start/stop() and rsnd_scu_transfer_start/stop()

Message ID 1409209620-24487-29-git-send-email-horms+renesas@verge.net.au (mailing list archive)
State New, archived
Headers show

Commit Message

Simon Horman Aug. 28, 2014, 6:52 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

rsnd_scu_transfer_start/stop() are no longer needed.
merge into rsnd_scu_start/stop()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit e7ce74eaa76591e5a4905d0fc07a278533447b80)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 sound/soc/sh/rcar/scu.c | 56 +++++++++++++------------------------------------
 1 file changed, 14 insertions(+), 42 deletions(-)
diff mbox

Patch

diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
index ece539b..5d2dbbb 100644
--- a/sound/soc/sh/rcar/scu.c
+++ b/sound/soc/sh/rcar/scu.c
@@ -218,46 +218,6 @@  static int rsnd_scu_convert_rate_ctrl(
 	return 0;
 }
 
-static int rsnd_scu_transfer_start(struct rsnd_priv *priv,
-				   struct rsnd_mod *mod,
-				   struct rsnd_dai *rdai,
-				   struct rsnd_dai_stream *io)
-{
-	struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-	int id = rsnd_mod_id(mod);
-	u32 val;
-
-	if (rsnd_is_gen1(priv)) {
-		val = (1 << id);
-		rsnd_mod_bset(mod, SRC_ROUTE_CTRL, val, val);
-	}
-
-	if (rsnd_scu_convert_rate(scu))
-		rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1);
-
-	return 0;
-}
-
-static int rsnd_scu_transfer_stop(struct rsnd_priv *priv,
-				  struct rsnd_mod *mod,
-				  struct rsnd_dai *rdai,
-				  struct rsnd_dai_stream *io)
-{
-	struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-	int id = rsnd_mod_id(mod);
-	u32 mask;
-
-	if (rsnd_is_gen1(priv)) {
-		mask = (1 << id);
-		rsnd_mod_bset(mod, SRC_ROUTE_CTRL, mask, 0);
-	}
-
-	if (rsnd_scu_convert_rate(scu))
-		rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0);
-
-	return 0;
-}
-
 bool rsnd_scu_hpbif_is_enable(struct rsnd_mod *mod)
 {
 	struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
@@ -303,8 +263,15 @@  static int rsnd_scu_start(struct rsnd_mod *mod,
 {
 	struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
 	struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
+	int id = rsnd_mod_id(mod);
 
-	return rsnd_scu_transfer_start(priv, mod, rdai, io);
+	if (rsnd_is_gen1(priv))
+		rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id));
+
+	if (rsnd_scu_convert_rate(scu))
+		rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1);
+
+	return 0;
 }
 
 static int rsnd_scu_stop(struct rsnd_mod *mod,
@@ -313,8 +280,13 @@  static int rsnd_scu_stop(struct rsnd_mod *mod,
 {
 	struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
 	struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
+	int id = rsnd_mod_id(mod);
+
+	if (rsnd_is_gen1(priv))
+		rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0);
 
-	rsnd_scu_transfer_stop(priv, mod, rdai, io);
+	if (rsnd_scu_convert_rate(scu))
+		rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0);
 
 	return 0;
 }