Skip to content

Commit

Permalink
IPC4: Add header to support user space ALSA notifications
Browse files Browse the repository at this point in the history
This patch adds struct sof_ipc4_notify_module_data that matches
the Linux kernel handler for notifications from firmware to ALSA
user space. The SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_VAL
event_id is used to identify the notifications for ALSA controls
like switch and enum.

Signed-off-by: Peter Ujfalusi <[email protected]>
Signed-off-by: Seppo Ingalsuo <[email protected]>
  • Loading branch information
singalsu authored and marcinszkudlinski committed Oct 20, 2023
1 parent b54b0e2 commit 2932cbc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/include/ipc4/header.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ struct ipc4_message_reply {

#define SOF_IPC4_SWITCH_CONTROL_PARAM_ID 200
#define SOF_IPC4_ENUM_CONTROL_PARAM_ID 201
#define SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_VAL ((uint32_t)(0xA15A << 16))

/**
* struct sof_ipc4_ctrl_value_chan: generic channel mapped value data
Expand All @@ -198,4 +199,20 @@ struct sof_ipc4_control_msg_payload {
struct sof_ipc4_ctrl_value_chan chanv[];
} __attribute((packed, aligned(4)));

/**
* struct sof_ipc4_notify_module_data - payload for module notification
* @instance_id: instance ID of the originator module of the notification
* @module_id: module ID of the originator of the notification
* @event_id: module specific event id
* @event_data_size: Size of the @event_data (if any) in bytes
* @event_data: Optional notification data, module and notification dependent
*/
struct sof_ipc4_notify_module_data {
uint16_t instance_id;
uint16_t module_id;
uint32_t event_id;
uint32_t event_data_size;
uint8_t event_data[];
} __attribute((packed, aligned(4)));

#endif

0 comments on commit 2932cbc

Please sign in to comment.