aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-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;