diff mbox

[2/6,v3] ASoC: rsnd: move DVC_DVUER settings under rsnd_dvc_volume_update()

Message ID 87bnom46ha.wl%kuninori.morimoto.gx@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kuninori Morimoto Nov. 5, 2014, 4:27 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

We need to Enable/Disable DVC_DVUER register if we set
DVCp_ZCMCR, DVCp_VRCTR, DVCp_VRPDR, DVCp_VRDBR,
DVCp_VOL0R, DVCp_VOL1R, DVCp_VOL2R, DVCp_VOL3R,
DVCp_VOL4R, DVCp_VOL5R, DVCp_VOL6R, DVCp_VOL7R
and, these are controlled under rsnd_dvc_volume_update().
This patch moves DVC_DVUER settings to it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v2 -> v3

 - no change

 sound/soc/sh/rcar/dvc.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Mark Brown Nov. 6, 2014, 5:05 p.m. UTC | #1
On Tue, Nov 04, 2014 at 08:27:18PM -0800, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> We need to Enable/Disable DVC_DVUER register if we set
> DVCp_ZCMCR, DVCp_VRCTR, DVCp_VRPDR, DVCp_VRDBR,
> DVCp_VOL0R, DVCp_VOL1R, DVCp_VOL2R, DVCp_VOL3R,
> DVCp_VOL4R, DVCp_VOL5R, DVCp_VOL6R, DVCp_VOL7R
> and, these are controlled under rsnd_dvc_volume_update().
> This patch moves DVC_DVUER settings to it.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
index 3952237..ce1512e 100644
--- a/sound/soc/sh/rcar/dvc.c
+++ b/sound/soc/sh/rcar/dvc.c
@@ -48,6 +48,9 @@  static void rsnd_dvc_volume_update(struct rsnd_mod *mod)
 		mute |= (!!dvc->mute.val[i]) << i;
 	}
 
+	/* Disable DVC Register access */
+	rsnd_mod_write(mod, DVC_DVUER, 0);
+
 	/* Enable Digital Volume */
 	dvucr = 0x100;
 	rsnd_mod_write(mod, DVC_VOL0R, dvc->volume.val[0]);
@@ -60,6 +63,9 @@  static void rsnd_dvc_volume_update(struct rsnd_mod *mod)
 	}
 
 	rsnd_mod_write(mod, DVC_DVUCR, dvucr);
+
+	/* Enable DVC Register access */
+	rsnd_mod_write(mod, DVC_DVUER, 1);
 }
 
 static int rsnd_dvc_probe_gen2(struct rsnd_mod *mod,
@@ -117,8 +123,6 @@  static int rsnd_dvc_init(struct rsnd_mod *dvc_mod,
 
 	rsnd_mod_write(dvc_mod, DVC_DVUIR, 0);
 
-	rsnd_mod_write(dvc_mod, DVC_DVUER, 1);
-
 	rsnd_adg_set_cmd_timsel_gen2(rdai, dvc_mod, io);
 
 	return 0;