aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-03-03 23:50:08 -0500
committerMark Brown <broonie@linaro.org>2014-03-05 01:07:52 -0500
commitb8cc41e9e8cc5beec9dcbe044cfc44aa0325d9e6 (patch)
tree28c384b4ae4d067b372fcec30d8c209356fd4cf8 /sound/soc/sh
parent389933d9f6e55a1ef3a71549c36f6283b9f8c145 (diff)
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 3472631c7b35..3b71b77c4fd8 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);
353unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv, 353unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
354 struct rsnd_dai_stream *io, 354 struct rsnd_dai_stream *io,
355 struct snd_pcm_runtime *runtime); 355 struct snd_pcm_runtime *runtime);
356int rsnd_scu_enable_ssi_irq(struct rsnd_mod *ssi_mod,
357 struct rsnd_dai *rdai,
358 struct rsnd_dai_stream *io);
356 359
357#define rsnd_scu_nr(priv) ((priv)->scu_nr) 360#define rsnd_scu_nr(priv) ((priv)->scu_nr)
358 361
diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
index b517300f32ce..8ce79e855cf0 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,
165 return 0; 165 return 0;
166} 166}
167 167
168int rsnd_scu_enable_ssi_irq(struct rsnd_mod *ssi_mod,
169 struct rsnd_dai *rdai,
170 struct rsnd_dai_stream *io)
171{
172 struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod);
173
174 /* enable PIO interrupt if Gen2 */
175 if (rsnd_is_gen2(priv))
176 rsnd_mod_write(ssi_mod, INT_ENABLE, 0x0f000000);
177
178 return 0;
179}
180
168unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv, 181unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
169 struct rsnd_dai_stream *io, 182 struct rsnd_dai_stream *io,
170 struct snd_pcm_runtime *runtime) 183 struct snd_pcm_runtime *runtime)
@@ -579,22 +592,9 @@ static struct rsnd_mod_ops rsnd_scu_gen2_ops = {
579 .stop = rsnd_scu_stop_gen2, 592 .stop = rsnd_scu_stop_gen2,
580}; 593};
581 594
582static int rsnd_scu_start_non_gen2(struct rsnd_mod *mod,
583 struct rsnd_dai *rdai,
584 struct rsnd_dai_stream *io)
585{
586 struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io);
587
588 /* enable PIO interrupt */
589 rsnd_mod_write(ssi_mod, INT_ENABLE, 0x0f000000);
590
591 return 0;
592}
593
594static struct rsnd_mod_ops rsnd_scu_non_gen2_ops = { 595static struct rsnd_mod_ops rsnd_scu_non_gen2_ops = {
595 .name = "non-scu (gen2)", 596 .name = "non-scu (gen2)",
596 .init = rsnd_scu_ssi_mode_init, 597 .init = rsnd_scu_ssi_mode_init,
597 .start = rsnd_scu_start_non_gen2,
598}; 598};
599 599
600struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id) 600struct 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 9162c2bb6cc5..a74c7a789b2b 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,
365 /* enable PIO IRQ */ 365 /* enable PIO IRQ */
366 ssi->cr_etc = UIEN | OIEN | DIEN; 366 ssi->cr_etc = UIEN | OIEN | DIEN;
367 367
368 rsnd_scu_enable_ssi_irq(mod, rdai, io);
369
368 rsnd_ssi_hw_start(ssi, rdai, io); 370 rsnd_ssi_hw_start(ssi, rdai, io);
369 371
370 return 0; 372 return 0;