ASoC: rsnd: makes volume ramp rate list generic

DVC is supporting Volume Ramp Rate, and MIX has Volume Ramp
but not yet supported. To support MIX Volume Ramp, we want to
share Rate List since DVC/MIX are using almost same list.
This patch move DVC specific Volume Ramp Rate List to core.c.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
此提交包含在:
Kuninori Morimoto
2017-10-01 23:49:03 +00:00
提交者 Mark Brown
父節點 99dc79d060
當前提交 f3c26ac61c
共有 3 個檔案被更改,包括 36 行新增31 行删除

查看文件

@@ -61,33 +61,6 @@ struct rsnd_dvc {
((pos) = (struct rsnd_dvc *)(priv)->dvc + i); \
i++)
static const char * const dvc_ramp_rate[] = {
"128 dB/1 step", /* 00000 */
"64 dB/1 step", /* 00001 */
"32 dB/1 step", /* 00010 */
"16 dB/1 step", /* 00011 */
"8 dB/1 step", /* 00100 */
"4 dB/1 step", /* 00101 */
"2 dB/1 step", /* 00110 */
"1 dB/1 step", /* 00111 */
"0.5 dB/1 step", /* 01000 */
"0.25 dB/1 step", /* 01001 */
"0.125 dB/1 step", /* 01010 */
"0.125 dB/2 steps", /* 01011 */
"0.125 dB/4 steps", /* 01100 */
"0.125 dB/8 steps", /* 01101 */
"0.125 dB/16 steps", /* 01110 */
"0.125 dB/32 steps", /* 01111 */
"0.125 dB/64 steps", /* 10000 */
"0.125 dB/128 steps", /* 10001 */
"0.125 dB/256 steps", /* 10010 */
"0.125 dB/512 steps", /* 10011 */
"0.125 dB/1024 steps", /* 10100 */
"0.125 dB/2048 steps", /* 10101 */
"0.125 dB/4096 steps", /* 10110 */
"0.125 dB/8192 steps", /* 10111 */
};
static void rsnd_dvc_activation(struct rsnd_mod *mod)
{
rsnd_mod_write(mod, DVC_SWRSR, 0);
@@ -298,7 +271,8 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
rsnd_kctrl_accept_anytime,
rsnd_dvc_volume_update,
&dvc->rup,
dvc_ramp_rate);
volume_ramp_rate,
VOLUME_RAMP_MAX_DVC);
if (ret < 0)
return ret;
@@ -308,7 +282,8 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
rsnd_kctrl_accept_anytime,
rsnd_dvc_volume_update,
&dvc->rdown,
dvc_ramp_rate);
volume_ramp_rate,
VOLUME_RAMP_MAX_DVC);
if (ret < 0)
return ret;