aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-10-26 04:40:59 -0400
committerMark Brown <broonie@kernel.org>2015-11-16 05:09:29 -0500
commitb761bf272bce6dff4d8a7ccf4385c9f3d4018094 (patch)
tree8760cf33c340c0465c0ab0c8c273608f90e77f79 /sound/soc/sh
parent37447b46e8c54c807e368d31ef6423c772b8dbbf (diff)
ASoC: rsnd: disable SRC.out only when stop timing
Because SRC is connected to DMA and DMA want to keep dreq when stop timing. This patch makes SRC stop SRC.out only when stop timing. And it stops both SRC.out/SRC.in when quit timing Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r--sound/soc/sh/rcar/src.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index 513094ec2312..3f6993facf69 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -665,13 +665,27 @@ static int _rsnd_src_stop_gen2(struct rsnd_mod *mod)
665{ 665{
666 rsnd_src_irq_disable_gen2(mod); 666 rsnd_src_irq_disable_gen2(mod);
667 667
668 rsnd_mod_write(mod, SRC_CTRL, 0); 668 /*
669 * stop SRC output only
670 * see rsnd_src_quit_gen2
671 */
672 rsnd_mod_write(mod, SRC_CTRL, 0x01);
669 673
670 rsnd_src_error_record_gen2(mod); 674 rsnd_src_error_record_gen2(mod);
671 675
672 return rsnd_src_stop(mod); 676 return rsnd_src_stop(mod);
673} 677}
674 678
679static int rsnd_src_quit_gen2(struct rsnd_mod *mod,
680 struct rsnd_dai_stream *io,
681 struct rsnd_priv *priv)
682{
683 /* stop both out/in */
684 rsnd_mod_write(mod, SRC_CTRL, 0);
685
686 return 0;
687}
688
675static void __rsnd_src_interrupt_gen2(struct rsnd_mod *mod, 689static void __rsnd_src_interrupt_gen2(struct rsnd_mod *mod,
676 struct rsnd_dai_stream *io) 690 struct rsnd_dai_stream *io)
677{ 691{
@@ -943,7 +957,7 @@ static struct rsnd_mod_ops rsnd_src_gen2_ops = {
943 .probe = rsnd_src_probe_gen2, 957 .probe = rsnd_src_probe_gen2,
944 .remove = rsnd_src_remove_gen2, 958 .remove = rsnd_src_remove_gen2,
945 .init = rsnd_src_init_gen2, 959 .init = rsnd_src_init_gen2,
946 .quit = rsnd_src_quit, 960 .quit = rsnd_src_quit_gen2,
947 .start = rsnd_src_start_gen2, 961 .start = rsnd_src_start_gen2,
948 .stop = rsnd_src_stop_gen2, 962 .stop = rsnd_src_stop_gen2,
949 .hw_params = rsnd_src_hw_params, 963 .hw_params = rsnd_src_hw_params,