summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-03-03 20:50:08 -0800
committerMark Brown <broonie@linaro.org>2014-03-05 14:07:52 +0800
commitb8cc41e9e8cc5beec9dcbe044cfc44aa0325d9e6 (patch)
tree28c384b4ae4d067b372fcec30d8c209356fd4cf8 /sound/soc/sh
parent389933d9f6e55a1ef3a71549c36f6283b9f8c145 (diff)
downloadop-kernel-dev-b8cc41e9e8cc5beec9dcbe044cfc44aa0325d9e6.zip
op-kernel-dev-b8cc41e9e8cc5beec9dcbe044cfc44aa0325d9e6.tar.gz
ASoC: rsnd: add rsnd_scu_enable_ssi_irq()
Current R-Car sound driver is assuming that SCU mod is used even though it is not needed. Because scu.c is controlling SSIU too. (it is Gen1 compatibility) But, SCU mod will be really not used if new platform dai feature was used. Thus, SSIU irq setting is called from SSI directory by this patch. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r--sound/soc/sh/rcar/rsnd.h3
-rw-r--r--sound/soc/sh/rcar/scu.c26
-rw-r--r--sound/soc/sh/rcar/ssi.c2
3 files changed, 18 insertions, 13 deletions
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 3472631..3b71b77 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -353,6 +353,9 @@ struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id);
unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
struct rsnd_dai_stream *io,
struct snd_pcm_runtime *runtime);
+int rsnd_scu_enable_ssi_irq(struct rsnd_mod *ssi_mod,
+ struct rsnd_dai *rdai,
+ struct rsnd_dai_stream *io);
#define rsnd_scu_nr(priv) ((priv)->scu_nr)
diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
index b517300..8ce79e8 100644
--- a/sound/soc/sh/rcar/scu.c
+++ b/sound/soc/sh/rcar/scu.c
@@ -165,6 +165,19 @@ static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
return 0;
}
+int rsnd_scu_enable_ssi_irq(struct rsnd_mod *ssi_mod,
+ struct rsnd_dai *rdai,
+ struct rsnd_dai_stream *io)
+{
+ struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod);
+
+ /* enable PIO interrupt if Gen2 */
+ if (rsnd_is_gen2(priv))
+ rsnd_mod_write(ssi_mod, INT_ENABLE, 0x0f000000);
+
+ return 0;
+}
+
unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
struct rsnd_dai_stream *io,
struct snd_pcm_runtime *runtime)
@@ -579,22 +592,9 @@ static struct rsnd_mod_ops rsnd_scu_gen2_ops = {
.stop = rsnd_scu_stop_gen2,
};
-static int rsnd_scu_start_non_gen2(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
-{
- struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io);
-
- /* enable PIO interrupt */
- rsnd_mod_write(ssi_mod, INT_ENABLE, 0x0f000000);
-
- return 0;
-}
-
static struct rsnd_mod_ops rsnd_scu_non_gen2_ops = {
.name = "non-scu (gen2)",
.init = rsnd_scu_ssi_mode_init,
- .start = rsnd_scu_start_non_gen2,
};
struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id)
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 9162c2b..a74c7a7 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -365,6 +365,8 @@ static int rsnd_ssi_pio_start(struct rsnd_mod *mod,
/* enable PIO IRQ */
ssi->cr_etc = UIEN | OIEN | DIEN;
+ rsnd_scu_enable_ssi_irq(mod, rdai, io);
+
rsnd_ssi_hw_start(ssi, rdai, io);
return 0;
OpenPOWER on IntegriCloud