[PATCH v4 07/17] ASoC: Intel: avs: Add module management requests

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Wed Mar 9 23:16:19 CET 2022


> +/*
> + * avs_ipc_delete_instance - Delete module instance
> + *
> + * @adev: Driver context
> + * @module_id: Module-type id
> + * @instance_id: Unique module instance id
> + *
> + * Argument verification, as well as pipeline state checks are done by the
> + * firmware.
> + *
> + * Note: only standalone modules i.e. without a parent pipeline shall be
> + * deleted using this IPC message. In all other cases, pipeline owning the
> + * modules peforms cleanup automatically when it is deleted.

typo: performs

checkpatch.pl --strict --codespell would detect all this for you.

> + */
> +int avs_ipc_delete_instance(struct avs_dev *adev, u16 module_id, u8 instance_id)
> +{
> +	union avs_module_msg msg = AVS_MODULE_REQUEST(DELETE_INSTANCE);
> +	struct avs_ipc_msg request = {{0}};
> +	int ret;
> +
> +	msg.module_id = module_id;
> +	msg.instance_id = instance_id;
> +	request.header = msg.val;
> +
> +	ret = avs_dsp_send_msg(adev, &request, NULL);
> +	if (ret)
> +		avs_ipc_err(adev, &request, "delete instance", ret);
> +
> +	return ret;
> +}



More information about the Alsa-devel mailing list