[alsa-devel] [PATCH 06/16] ASoC: Intel: Skylake: Add support for Load/Unload IPCs

Mark Brown broonie at kernel.org
Tue Dec 1 23:58:54 CET 2015


On Sat, Nov 28, 2015 at 03:01:51PM +0530, Vinod Koul wrote:

> Some firmware modules can be loaded and unloaded to/from DSP.
> This can be done by invoking IPCs Load module and unload module
> respectively. So this patch starts this by adding support for
> these IPCs

In what way does it do this?

> +int skl_ipc_load_modules(struct sst_generic_ipc *ipc,
> +				u8 module_cnt, void *data)
> +{
> +	struct skl_ipc_header header = {0};
> +	u64 *ipc_header = (u64 *)(&header);
> +	int ret;
> +
> +	header.primary = IPC_MSG_TARGET(IPC_FW_GEN_MSG);
> +	header.primary |= IPC_MSG_DIR(IPC_MSG_REQUEST);
> +	header.primary |= IPC_GLB_TYPE(IPC_GLB_LOAD_MULTIPLE_MODS);
> +	header.primary |= IPC_LOAD_MODULE_CNT(module_cnt);
> +
> +	ret = sst_ipc_tx_message_wait(ipc, *ipc_header, data,
> +				(sizeof(u16) * module_cnt), NULL, 0);

So the multiple modules are a block of at most 255 16 bit words?  That's
a bit surprising - is it really a count of the number of modules or
rather the size of the block of data that's being squirted at the DSP?

> +int skl_ipc_unload_modules(struct sst_generic_ipc *ipc, u8 module_cnt,
> +							void *data)
> +{
> +	struct skl_ipc_header header = {0};
> +	u64 *ipc_header = (u64 *)(&header);
> +	int ret;
> +
> +	header.primary = IPC_MSG_TARGET(IPC_FW_GEN_MSG);
> +	header.primary |= IPC_MSG_DIR(IPC_MSG_REQUEST);
> +	header.primary |= IPC_GLB_TYPE(IPC_GLB_UNLOAD_MULTIPLE_MODS);
> +	header.primary |= IPC_LOAD_MODULE_CNT(module_cnt);
> +
> +	ret = sst_ipc_tx_message_wait(ipc, *ipc_header, data,
> +				(sizeof(u16) * module_cnt), NULL, 0);

This seems weird...  what's the data that's getting passed in?  This
doesn't seem to be actually managing anything, it's just some very basic
message formatting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20151201/76274b5a/attachment.sig>


More information about the Alsa-devel mailing list