Commit 68be4f0e authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown

ASoC: SOF: control: Do not handle control notification with component type

The component type is not used in firmware nor in the kernel currently and
it is not even clear how it should be handled.

Do not even try to handle it to avoid errors.
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20211215180404.53254-7-ranjani.sridharan@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent dd2fef98
......@@ -577,6 +577,13 @@ void snd_sof_control_notify(struct snd_sof_dev *sdev,
bool found = false;
int i, type;
if (cdata->type == SOF_CTRL_TYPE_VALUE_COMP_GET ||
cdata->type == SOF_CTRL_TYPE_VALUE_COMP_SET) {
dev_err(sdev->dev,
"Component data is not supported in control notification\n");
return;
}
/* Find the swidget first */
list_for_each_entry(swidget, &sdev->widget_list, list) {
if (swidget->comp_id == cdata->comp_id) {
......@@ -643,11 +650,6 @@ void snd_sof_control_notify(struct snd_sof_dev *sdev,
expected_size += cdata->num_elems *
sizeof(struct sof_ipc_ctrl_value_chan);
break;
case SOF_CTRL_TYPE_VALUE_COMP_GET:
case SOF_CTRL_TYPE_VALUE_COMP_SET:
expected_size += cdata->num_elems *
sizeof(struct sof_ipc_ctrl_value_comp);
break;
case SOF_CTRL_TYPE_DATA_GET:
case SOF_CTRL_TYPE_DATA_SET:
expected_size += cdata->num_elems + sizeof(struct sof_abi_hdr);
......
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