[PATCH 4.4.y] ASoC: rsnd: src: add rsnd_src_halt()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: thongsyho <thong.ho.px@xxxxxxxxxxxxxxx>

commit 475a361a6f2c7c690fd59a8f5224615e781cc3bd upstream.

Based on datasheet process

Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
Signed-off-by: Thong Ho <thong.ho.px@xxxxxxxxxxxxxxx>
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@xxxxxxxxxxx>
---
 sound/soc/sh/rcar/src.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index 460d29c..8f2679c 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -132,6 +132,12 @@ static void __rsnd_src_initialize_lock(struct rsnd_mod *mod, u32 enable)
 	rsnd_mod_write(mod, SRC_SRCIR, enable);
 }
 
+static void rsnd_src_halt(struct rsnd_mod *mod)
+{
+	rsnd_mod_write(mod, SRC_SRCIR, 1);
+	rsnd_mod_write(mod, SRC_SWRSR, 0);
+}
+
 static struct dma_chan *rsnd_src_dma_req(struct rsnd_dai_stream *io,
 					 struct rsnd_mod *mod)
 {
@@ -373,6 +379,8 @@ static int rsnd_src_quit(struct rsnd_mod *mod,
 	struct rsnd_src *src = rsnd_mod_to_src(mod);
 	struct device *dev = rsnd_priv_to_dev(priv);
 
+	rsnd_src_halt(mod);
+
 	rsnd_mod_power_off(mod);
 
 	if (src->err)
-- 
1.9.1




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]