Skip to content

Commit fdc568a

Browse files
morimotogregkh
authored andcommitted
ASoC: rsnd: disable SRC.out only when stop timing
commit b761bf272bce6dff4d8a7ccf4385c9f3d4018094 upstream. 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> Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com> Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent bfba69d commit fdc568a

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

sound/soc/sh/rcar/src.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,13 +691,27 @@ static int _rsnd_src_stop_gen2(struct rsnd_mod *mod)
691691
{
692692
rsnd_src_irq_disable_gen2(mod);
693693

694-
rsnd_mod_write(mod, SRC_CTRL, 0);
694+
/*
695+
* stop SRC output only
696+
* see rsnd_src_quit_gen2
697+
*/
698+
rsnd_mod_write(mod, SRC_CTRL, 0x01);
695699

696700
rsnd_src_error_record_gen2(mod);
697701

698702
return rsnd_src_stop(mod);
699703
}
700704

705+
static int rsnd_src_quit_gen2(struct rsnd_mod *mod,
706+
struct rsnd_dai_stream *io,
707+
struct rsnd_priv *priv)
708+
{
709+
/* stop both out/in */
710+
rsnd_mod_write(mod, SRC_CTRL, 0);
711+
712+
return 0;
713+
}
714+
701715
static void __rsnd_src_interrupt_gen2(struct rsnd_mod *mod,
702716
struct rsnd_dai_stream *io)
703717
{
@@ -971,7 +985,7 @@ static struct rsnd_mod_ops rsnd_src_gen2_ops = {
971985
.probe = rsnd_src_probe_gen2,
972986
.remove = rsnd_src_remove_gen2,
973987
.init = rsnd_src_init_gen2,
974-
.quit = rsnd_src_quit,
988+
.quit = rsnd_src_quit_gen2,
975989
.start = rsnd_src_start_gen2,
976990
.stop = rsnd_src_stop_gen2,
977991
.hw_params = rsnd_src_hw_params,

0 commit comments

Comments
 (0)