diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-05-09 02:44:49 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-05-13 20:06:16 +0200 |
commit | bff58ea4f43d9b4a9fd6fb05fabc8f50f68131f5 (patch) | |
tree | 75fd6981582c0206a5152a6c9d377e3295a2eebf /sound/soc/sh/rcar/adg.c | |
parent | ASoC: rsnd: enable to use multi parameter on rsnd_dai_call/rsnd_mod_call (diff) | |
download | linux-bff58ea4f43d9b4a9fd6fb05fabc8f50f68131f5.tar.xz linux-bff58ea4f43d9b4a9fd6fb05fabc8f50f68131f5.zip |
ASoC: rsnd: add DVC support
This patch adds DVC (Digital Volume Controller)
support which is member of CMD unit.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/sh/rcar/adg.c')
-rw-r--r-- | sound/soc/sh/rcar/adg.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c index 41556b2ef21e..fc41a0e8b09f 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c @@ -57,6 +57,24 @@ static u32 rsnd_adg_ssi_ws_timing_gen2(struct rsnd_dai_stream *io) return (0x6 + ws) << 8; } +int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_dai *rdai, + struct rsnd_mod *mod, + struct rsnd_dai_stream *io) +{ + int id = rsnd_mod_id(mod); + int shift = (id % 2) ? 16 : 0; + u32 mask, val; + + val = rsnd_adg_ssi_ws_timing_gen2(io); + + val = val << shift; + mask = 0xffff << shift; + + rsnd_mod_bset(mod, CMDOUT_TIMSEL, mask, val); + + return 0; +} + static int rsnd_adg_set_src_timsel_gen2(struct rsnd_dai *rdai, struct rsnd_mod *mod, struct rsnd_dai_stream *io, |