Commit aa66fd80 authored by Zhu Yingjiang's avatar Zhu Yingjiang Committed by Mark Brown

ASoC: SOF: topology: add min/max step for volume_table

add two units min_volume_step and max_volume_step to the snd_sof_control
struct, for the min and max step of the volume_table.
Signed-off-by: default avatarZhu Yingjiang <yingjiang.zhu@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 847a040d
...@@ -297,6 +297,8 @@ struct snd_sof_pcm { ...@@ -297,6 +297,8 @@ struct snd_sof_pcm {
struct snd_sof_control { struct snd_sof_control {
struct snd_sof_dev *sdev; struct snd_sof_dev *sdev;
int comp_id; int comp_id;
int min_volume_step; /* min volume step for volume_table */
int max_volume_step; /* max volume step for volume_table */
int num_channels; int num_channels;
u32 readback_offset; /* offset to mmaped data if used */ u32 readback_offset; /* offset to mmaped data if used */
struct sof_ipc_ctrl_data *control_data; struct sof_ipc_ctrl_data *control_data;
......
...@@ -451,6 +451,8 @@ static int sof_control_load_volume(struct snd_soc_component *scomp, ...@@ -451,6 +451,8 @@ static int sof_control_load_volume(struct snd_soc_component *scomp,
return -ENOMEM; return -ENOMEM;
scontrol->comp_id = sdev->next_comp_id; scontrol->comp_id = sdev->next_comp_id;
scontrol->min_volume_step = le32_to_cpu(mc->min);
scontrol->max_volume_step = le32_to_cpu(mc->max);
scontrol->num_channels = le32_to_cpu(mc->num_channels); scontrol->num_channels = le32_to_cpu(mc->num_channels);
/* set cmd for mixer control */ /* set cmd for mixer control */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment