summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-11-04 20:26:53 -0800
committerMark Brown <broonie@kernel.org>2014-11-06 17:04:31 +0000
commit1c5d1c988302f324ac396ac13461d59d091be605 (patch)
treefc9d9e2280abb57ec8c0801aec7ad7e45d48e7e9 /sound/soc/sh
parent92b9a6991b2e3a4ccf5ffc956730d36835d53a79 (diff)
ASoC: rsnd: control DVC_DVUCR under rsnd_dvc_volume_update()
rsnd_dvc_volume_update() is main function to control DVC feature like Digital Volume / Mute / Ramp etc. DVC_DVUCR should be controlled under this function. 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/dvc.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
index deaf0faaed8..395223757e4 100644
--- a/sound/soc/sh/rcar/dvc.c
+++ b/sound/soc/sh/rcar/dvc.c
@@ -40,6 +40,7 @@ struct rsnd_dvc {
static void rsnd_dvc_volume_update(struct rsnd_mod *mod)
{
struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod);
+ u32 dvucr = 0;
u32 mute = 0;
int i;
@@ -47,10 +48,18 @@ static void rsnd_dvc_volume_update(struct rsnd_mod *mod)
mute |= (!!dvc->mute.val[i]) << i;
}
+ /* Enable Digital Volume */
+ dvucr = 0x100;
rsnd_mod_write(mod, DVC_VOL0R, dvc->volume.val[0]);
rsnd_mod_write(mod, DVC_VOL1R, dvc->volume.val[1]);
- rsnd_mod_write(mod, DVC_ZCMCR, mute);
+ /* Enable Mute */
+ if (mute) {
+ dvucr |= 0x1;
+ rsnd_mod_write(mod, DVC_ZCMCR, mute);
+ }
+
+ rsnd_mod_write(mod, DVC_DVUCR, dvucr);
}
static int rsnd_dvc_probe_gen2(struct rsnd_mod *mod,
@@ -103,9 +112,6 @@ static int rsnd_dvc_init(struct rsnd_mod *dvc_mod,
rsnd_mod_write(dvc_mod, DVC_ADINR, rsnd_get_adinr(dvc_mod));
- /* enable Volume / Mute */
- rsnd_mod_write(dvc_mod, DVC_DVUCR, 0x101);
-
/* ch0/ch1 Volume */
rsnd_dvc_volume_update(dvc_mod);