/* 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 */
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
}
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;
* 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;
}
/* 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;