This patch adds to struct sof_ipc_ctrl_data three new commands SOF_CTRL_CMD_ENUM, SOF_CTRL_CMD_SWITCH, and SOF_CTRL_CMD_BINARY. In addition an index parameter is added to address various features or registers.
Commands SOF_CTRL_CMD_ROUTE, SOF_CTRL_CMD_SRC, SOF_CTRL_CMD_LOOPBACK, SOF_CTRL_CMD_EQ_SWITCH, SOF_CTRL_CMD_EQ_CONFIG, SOF_CTRL_CMD_MUTE, and SOF_CTRL_CMD_UNMUTE are removed.
Signed-off-by: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com --- src/include/uapi/ipc.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/include/uapi/ipc.h b/src/include/uapi/ipc.h index 281e77a..5658b9a 100644 --- a/src/include/uapi/ipc.h +++ b/src/include/uapi/ipc.h @@ -437,25 +437,23 @@ struct sof_ipc_stream_posn {
/* control data type and direction */ enum sof_ipc_ctrl_type { + /* per channel data - uses struct sof_ipc_ctrl_value_chan */ SOF_CTRL_TYPE_VALUE_CHAN_GET = 0, SOF_CTRL_TYPE_VALUE_CHAN_SET, + /* per component data - uses struct sof_ipc_ctrl_value_comp */ SOF_CTRL_TYPE_VALUE_COMP_GET, SOF_CTRL_TYPE_VALUE_COMP_SET, + /* bespoke data - struct struct sof_abi_hdr */ SOF_CTRL_TYPE_DATA_GET, SOF_CTRL_TYPE_DATA_SET, };
/* control command type */ enum sof_ipc_ctrl_cmd { - SOF_CTRL_CMD_VOLUME = 0, - SOF_CTRL_CMD_ROUTE, - SOF_CTRL_CMD_SRC, - SOF_CTRL_CMD_LOOPBACK, - SOF_CTRL_CMD_EQ_SWITCH, - SOF_CTRL_CMD_EQ_CONFIG, - /* Mute is similar to volume, but maps better onto ALSA switch controls */ - SOF_CTRL_CMD_MUTE, - SOF_CTRL_CMD_UNMUTE, + SOF_CTRL_CMD_VOLUME = 0, /* maps to ALSA volume style controls */ + SOF_CTRL_CMD_ENUM, /* maps to ALSA enum style controls */ + SOF_CTRL_CMD_SWITCH, /* maps to ALSA switch style controls */ + SOF_CTRL_CMD_BINARY, /* maps to ALSA binary style controls */ };
/* generic channel mapped value data */ @@ -481,6 +479,7 @@ struct sof_ipc_ctrl_data { /* control access and data type */ enum sof_ipc_ctrl_type type; enum sof_ipc_ctrl_cmd cmd; + uint32_t index; /* control index for comps > 1 control */
/* control data - can either be appended or DMAed from host */ struct sof_ipc_host_buffer buffer; @@ -497,7 +496,6 @@ struct sof_ipc_ctrl_data { }; } __attribute__((packed));
- /* * Component */