summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/cmd.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-11-04 08:43:33 +0000
committerMark Brown <broonie@kernel.org>2015-11-16 10:09:29 +0000
commitdcc5a7b3b069cca17f3c5254006c66b99e87ffd3 (patch)
treec5ddd3058bb5cad594d3224733c3a8fee39efc20 /sound/soc/sh/rcar/cmd.c
parent209c09071f365aed48f8a7af5a25ea3edcfb891c (diff)
downloadlinux-stable-dcc5a7b3b069cca17f3c5254006c66b99e87ffd3.tar.gz
linux-stable-dcc5a7b3b069cca17f3c5254006c66b99e87ffd3.tar.bz2
linux-stable-dcc5a7b3b069cca17f3c5254006c66b99e87ffd3.zip
ASoC: rsnd: move CMD related operation to cmd.c
8cca6e11c1 ("ASoC: rsnd: use mod base common method on CMD") added cmd.c. Let's move CMD related operation to cmd.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/cmd.c')
-rw-r--r--sound/soc/sh/rcar/cmd.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/cmd.c b/sound/soc/sh/rcar/cmd.c
index 731d74b13e92..47ef47c22217 100644
--- a/sound/soc/sh/rcar/cmd.c
+++ b/sound/soc/sh/rcar/cmd.c
@@ -81,14 +81,34 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
rsnd_mod_write(mod, CMD_ROUTE_SLCT, data);
+ rsnd_adg_set_cmd_timsel_gen2(mod, io);
+
+ return 0;
+}
+
+static int rsnd_cmd_start(struct rsnd_mod *mod,
+ struct rsnd_dai_stream *io,
+ struct rsnd_priv *priv)
+{
rsnd_mod_write(mod, CMD_CTRL, 0x10);
return 0;
}
+static int rsnd_cmd_stop(struct rsnd_mod *mod,
+ struct rsnd_dai_stream *io,
+ struct rsnd_priv *priv)
+{
+ rsnd_mod_write(mod, CMD_CTRL, 0);
+
+ return 0;
+}
+
static struct rsnd_mod_ops rsnd_cmd_ops = {
.name = CMD_NAME,
.init = rsnd_cmd_init,
+ .start = rsnd_cmd_start,
+ .stop = rsnd_cmd_stop,
};
int rsnd_cmd_attach(struct rsnd_dai_stream *io, int id)