diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-11-04 20:28:10 -0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-06 17:04:32 +0000 |
commit | ab2e479667507329475c8ef93d61f3dbe654c3c2 (patch) | |
tree | 0d670ffa6612eac742cefd6a44e53a85a2ff942f /sound/soc/sh/rcar | |
parent | ec14af91a03f7d68b2a72bec20be2ab583d3f63a (diff) | |
download | blackbird-op-linux-ab2e479667507329475c8ef93d61f3dbe654c3c2.tar.gz blackbird-op-linux-ab2e479667507329475c8ef93d61f3dbe654c3c2.zip |
ASoC: rsnd: enable single DVC valume settings
DVC controls some digital volume features.
Some of them requests values for "each channels",
but, some of them requests values for "feature".
And, Volume Ramp has "feature" settings.
This patch adds rsnd_dvc_cfg_s and care about
single settings.
Compiler will report like below at this point,
but, it will be removed if Volume Ramp was supported.
warning: '_rsnd_dvc_pcm_new_s' defined but not used
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar')
-rw-r--r-- | sound/soc/sh/rcar/dvc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c index c729e268f5d4..e7cfc71a9006 100644 --- a/sound/soc/sh/rcar/dvc.c +++ b/sound/soc/sh/rcar/dvc.c @@ -26,6 +26,11 @@ struct rsnd_dvc_cfg_m { u32 val[RSND_DVC_CHANNELS]; }; +struct rsnd_dvc_cfg_s { + struct rsnd_dvc_cfg cfg; + u32 val; +}; + struct rsnd_dvc { struct rsnd_dvc_platform_info *info; /* rcar_snd.h */ struct rsnd_mod mod; @@ -248,6 +253,19 @@ static int _rsnd_dvc_pcm_new_m(struct rsnd_mod *mod, return __rsnd_dvc_pcm_new(mod, rdai, rtd, name, &private->cfg); } +static int _rsnd_dvc_pcm_new_s(struct rsnd_mod *mod, + struct rsnd_dai *rdai, + struct snd_soc_pcm_runtime *rtd, + const unsigned char *name, + struct rsnd_dvc_cfg_s *private, + u32 max) +{ + private->cfg.max = max; + private->cfg.size = 1; + private->cfg.val = &private->val; + return __rsnd_dvc_pcm_new(mod, rdai, rtd, name, &private->cfg); +} + static int rsnd_dvc_pcm_new(struct rsnd_mod *mod, struct rsnd_dai *rdai, struct snd_soc_pcm_runtime *rtd) |