diff --git a/src/audio/module_adapter/module_adapter_ipc3.c b/src/audio/module_adapter/module_adapter_ipc3.c index 0f92ae7858ba..067920295795 100644 --- a/src/audio/module_adapter/module_adapter_ipc3.c +++ b/src/audio/module_adapter/module_adapter_ipc3.c @@ -207,7 +207,7 @@ static int module_adapter_get_set_params(struct comp_dev *dev, struct sof_ipc_ct comp_warn(dev, "module_adapter_get_set_params(): no configuration op set for %d", dev_comp_id(dev)); - return 0; + return -EIO; /* non-implemented error */ } static int module_adapter_ctrl_get_set_data(struct comp_dev *dev, struct sof_ipc_ctrl_data *cdata, @@ -272,6 +272,12 @@ int module_adapter_cmd(struct comp_dev *dev, int cmd, void *data, int max_data_s 0); break; case COMP_CMD_GET_VALUE: + /* + * Return error if getter is not implemented. Otherwise, the host will suppose + * the GET_VALUE command is successful, but the received cdata is not filled. + */ + ret = -EIO; + /* * IPC3 does not use config_id, so pass 0 for config ID as it will be ignored * anyway. Also, pass the 0 as the fragment size and data offset as they are not diff --git a/src/audio/module_adapter/module_adapter_ipc4.c b/src/audio/module_adapter/module_adapter_ipc4.c index 7ca28494af6a..884a57b419f5 100644 --- a/src/audio/module_adapter/module_adapter_ipc4.c +++ b/src/audio/module_adapter/module_adapter_ipc4.c @@ -159,7 +159,11 @@ int module_get_large_config(struct comp_dev *dev, uint32_t param_id, bool first_ if (interface->get_configuration) return interface->get_configuration(mod, param_id, data_offset_size, (uint8_t *)data, fragment_size); - return 0; + /* + * Return error if getter is not implemented. Otherwise, the host will suppose + * the GET_VALUE command is successful, but the received cdata is not filled. + */ + return -EIO; } EXPORT_SYMBOL(module_get_large_config);