diff options
author | Peter Ujfalusi <peter.ujfalusi@linux.intel.com> | 2021-12-15 10:04:00 -0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-12-15 22:16:43 +0000 |
commit | 9182f3c40b52ebd91d4796d96186ba10b720b4ba (patch) | |
tree | 5aadb18ac1ea98ec12f79f385a9d55157f882ff7 /sound/soc/sof/ipc.c | |
parent | 8af783723f41d3b3d4f7f8452f190405e7059472 (diff) | |
download | lwn-9182f3c40b52ebd91d4796d96186ba10b720b4ba.tar.gz lwn-9182f3c40b52ebd91d4796d96186ba10b720b4ba.zip |
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/ipc.c')
-rw-r--r-- | sound/soc/sof/ipc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index bcfe7edee05e..69c8a9964960 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -817,8 +817,7 @@ static int sof_set_get_large_ctrl_data(struct snd_sof_dev *sdev, * IPC get()/set() for kcontrols. */ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol, - enum sof_ipc_ctrl_type ctrl_type, - enum sof_ipc_ctrl_cmd ctrl_cmd, bool set) + enum sof_ipc_ctrl_type ctrl_type, bool set) { struct snd_soc_component *scomp = scontrol->scomp; struct sof_ipc_ctrl_data *cdata = scontrol->control_data; @@ -874,13 +873,12 @@ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol, } /* Select the IPC cmd based on the ctrl_cmd and the direction */ - if (ctrl_cmd == SOF_CTRL_CMD_BINARY) + if (cdata->cmd == SOF_CTRL_CMD_BINARY) ipc_cmd = set ? SOF_IPC_COMP_SET_DATA : SOF_IPC_COMP_GET_DATA; else ipc_cmd = set ? SOF_IPC_COMP_SET_VALUE : SOF_IPC_COMP_GET_VALUE; cdata->rhdr.hdr.cmd = SOF_IPC_GLB_COMP_MSG | ipc_cmd; - cdata->cmd = ctrl_cmd; cdata->type = ctrl_type; cdata->comp_id = scontrol->comp_id; cdata->msg_index = 0; |