summaryrefslogtreecommitdiff
path: root/sound/soc/sof/control.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2021-12-15 21:04:00 +0300
committerMark Brown <broonie@kernel.org>2021-12-16 01:16:43 +0300
commit9182f3c40b52ebd91d4796d96186ba10b720b4ba (patch)
tree5aadb18ac1ea98ec12f79f385a9d55157f882ff7 /sound/soc/sof/control.c
parent8af783723f41d3b3d4f7f8452f190405e7059472 (diff)
downloadlinux-9182f3c40b52ebd91d4796d96186ba10b720b4ba.tar.xz
ASoC: SOF: Drop ctrl_cmd parameter for snd_sof_ipc_set_get_comp_data()
The scontrol->control_data->cmd has been configured during initialization to the correct sof_ipc_ctrl_cmd. No need to pass duplicated information, let's use the already available one via scontrol. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211215180404.53254-5-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/control.c')
-rw-r--r--sound/soc/sof/control.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/sound/soc/sof/control.c b/sound/soc/sof/control.c
index 299ee466625e..23a916ea93f8 100644
--- a/sound/soc/sof/control.c
+++ b/sound/soc/sof/control.c
@@ -84,8 +84,7 @@ static void snd_sof_refresh_control(struct snd_sof_control *scontrol)
/* refresh the component data from DSP */
scontrol->comp_data_dirty = false;
ret = snd_sof_ipc_set_get_comp_data(scontrol,
- SOF_CTRL_TYPE_VALUE_CHAN_GET,
- scontrol->cmd, false);
+ SOF_CTRL_TYPE_VALUE_CHAN_GET, false);
if (ret < 0) {
dev_err(scomp->dev, "error: failed to get control data: %d\n", ret);
/* Set the flag to re-try next time to get the data */
@@ -137,9 +136,7 @@ int snd_sof_volume_put(struct snd_kcontrol *kcontrol,
/* notify DSP of mixer updates */
if (pm_runtime_active(scomp->dev))
snd_sof_ipc_set_get_comp_data(scontrol,
- SOF_CTRL_TYPE_VALUE_CHAN_SET,
- SOF_CTRL_CMD_VOLUME,
- true);
+ SOF_CTRL_TYPE_VALUE_CHAN_SET, true);
return change;
}
@@ -209,9 +206,7 @@ int snd_sof_switch_put(struct snd_kcontrol *kcontrol,
/* notify DSP of mixer updates */
if (pm_runtime_active(scomp->dev))
snd_sof_ipc_set_get_comp_data(scontrol,
- SOF_CTRL_TYPE_VALUE_CHAN_SET,
- SOF_CTRL_CMD_SWITCH,
- true);
+ SOF_CTRL_TYPE_VALUE_CHAN_SET, true);
return change;
}
@@ -257,9 +252,7 @@ int snd_sof_enum_put(struct snd_kcontrol *kcontrol,
/* notify DSP of enum updates */
if (pm_runtime_active(scomp->dev))
snd_sof_ipc_set_get_comp_data(scontrol,
- SOF_CTRL_TYPE_VALUE_CHAN_SET,
- SOF_CTRL_CMD_ENUM,
- true);
+ SOF_CTRL_TYPE_VALUE_CHAN_SET, true);
return change;
}
@@ -334,9 +327,7 @@ int snd_sof_bytes_put(struct snd_kcontrol *kcontrol,
/* notify DSP of byte control updates */
if (pm_runtime_active(scomp->dev))
snd_sof_ipc_set_get_comp_data(scontrol,
- SOF_CTRL_TYPE_DATA_SET,
- scontrol->cmd,
- true);
+ SOF_CTRL_TYPE_DATA_SET, true);
return 0;
}
@@ -413,9 +404,7 @@ int snd_sof_bytes_ext_put(struct snd_kcontrol *kcontrol,
/* notify DSP of byte control updates */
if (pm_runtime_active(scomp->dev))
snd_sof_ipc_set_get_comp_data(scontrol,
- SOF_CTRL_TYPE_DATA_SET,
- scontrol->cmd,
- true);
+ SOF_CTRL_TYPE_DATA_SET, true);
return 0;
}
@@ -452,8 +441,7 @@ int snd_sof_bytes_ext_volatile_get(struct snd_kcontrol *kcontrol, unsigned int _
cdata->data->magic = SOF_ABI_MAGIC;
cdata->data->abi = SOF_ABI_VERSION;
/* get all the component data from DSP */
- ret = snd_sof_ipc_set_get_comp_data(scontrol, SOF_CTRL_TYPE_DATA_GET,
- scontrol->cmd, false);
+ ret = snd_sof_ipc_set_get_comp_data(scontrol, SOF_CTRL_TYPE_DATA_GET, false);
if (ret < 0)
goto out;