All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Simon <horms@verge.net.au>, Liam Girdwood <lgirdwood@gmail.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Subject: [PATCH 2/6 v3] ASoC: rsnd: move DVC_DVUER settings under rsnd_dvc_volume_update()
Date: Tue, 04 Nov 2014 20:27:18 -0800 (PST)	[thread overview]
Message-ID: <87bnom46ha.wl%kuninori.morimoto.gx@gmail.com> (raw)
In-Reply-To: <87egti46j7.wl%kuninori.morimoto.gx@gmail.com>

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(-)

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;
-- 
1.7.9.5

  parent reply	other threads:[~2014-11-05  4:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31  1:18 [PATCH 0/5 v2] ASoC: rsnd: Add Volume Ramp support Kuninori Morimoto
2014-10-31  1:19 ` [PATCH 1/5 v2] ASoC: rsnd: control DVC_DVUCR under rsnd_dvc_volume_update() Kuninori Morimoto
2014-10-31  1:20 ` [PATCH 2/5 v2] ASoC: rsnd: move DVC_DVUER settings " Kuninori Morimoto
2014-10-31  1:20 ` [PATCH 3/5 v2] ASoC: rsnd: enable multiple DVC valume settings Kuninori Morimoto
2014-10-31  1:22 ` [PATCH 5/5 v2] ASoC: rsnd: Add Volume Ramp support Kuninori Morimoto
2014-11-05  4:26 ` [PATCH 0/6 v3] " Kuninori Morimoto
2014-11-05  4:26   ` [PATCH 1/6 v3] ASoC: rsnd: control DVC_DVUCR under rsnd_dvc_volume_update() Kuninori Morimoto
2014-11-06 17:04     ` Mark Brown
2014-11-05  4:27   ` Kuninori Morimoto [this message]
2014-11-06 17:05     ` [PATCH 2/6 v3] ASoC: rsnd: move DVC_DVUER settings " Mark Brown
2014-11-05  4:27   ` [PATCH 3/6 v3] ASoC: rsnd: enable multiple DVC valume settings Kuninori Morimoto
2014-11-06 17:05     ` Mark Brown
2014-11-05  4:28   ` [PATCH 4/6 v3] ASoC: rsnd: enable single " Kuninori Morimoto
2014-11-06 17:05     ` Mark Brown
2014-11-05  4:28   ` [PATCH 5/6 v3] ASoC: rsnd: enable enumerated " Kuninori Morimoto
2014-11-06 17:05     ` Mark Brown
2014-11-05  4:29   ` [PATCH 6/6 v3] ASoC: rsnd: Add Volume Ramp support Kuninori Morimoto
2014-11-06 16:58     ` Mark Brown
2014-11-07  0:11       ` Kuninori Morimoto
2014-11-07 10:45         ` Mark Brown
2014-11-10  3:52           ` [PATCH v4] " Kuninori Morimoto
2014-11-10 15:14             ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bnom46ha.wl%kuninori.morimoto.gx@gmail.com \
    --to=kuninori.morimoto.gx@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.