24#ifndef __IPC4_NOTIFICATION_H__
25#define __IPC4_NOTIFICATION_H__
91#define SOF_IPC4_GLB_NOTIFY_DIR_MASK BIT(29)
93#define SOF_IPC4_REPLY_STATUS_MASK 0xFFFFFF
95#define SOF_IPC4_GLB_NOTIFY_TYPE_SHIFT 16
97#define SOF_IPC4_GLB_NOTIFY_MSG_TYPE_SHIFT 24
100#define SOF_IPC4_FW_READY \
101 (((SOF_IPC4_NOTIFY_FW_READY) << (SOF_IPC4_GLB_NOTIFY_TYPE_SHIFT)) |\
102 ((SOF_IPC4_GLB_NOTIFICATION) << (SOF_IPC4_GLB_NOTIFY_MSG_TYPE_SHIFT)))
105#define SOF_IPC4_FW_READY_LIB_RESTORED BIT(15)
108#define SOF_IPC4_NOTIF_HEADER(notif_type) \
109 ((notif_type) << (SOF_IPC4_GLB_NOTIFY_TYPE_SHIFT) | \
110 ((SOF_IPC4_GLB_NOTIFICATION) << (SOF_IPC4_GLB_NOTIFY_MSG_TYPE_SHIFT)))
127} __packed __aligned(4);
155} __packed __aligned(4);
187} __packed __aligned(4);
197 uint32_t core_id,
bool first_timeout)
252} __packed __aligned(8);
255#define IPC4_RESOURCE_EVENT_SIZE sizeof(struct ipc4_resource_event_data_notification)
292 uint32_t expected_data_mixed);
302#if defined(__ZEPHYR__) && defined(CONFIG_SOF_FULL_ZEPHYR_APPLICATION)
315 uint32_t resource_type,
void *
data, uint32_t data_size);
316#include <zephyr/syscalls/notification.h>
330bool z_impl_send_resource_notif(uint32_t resource_id, uint32_t event_type,
331 uint32_t resource_type,
void *
data, uint32_t data_size);
332#define send_resource_notif z_impl_send_resource_notif
static uint32_t pipeline_id(struct pipeline *p)
Retrieves pipeline ID from pipeline structure.
Definition pipeline.h:291
@ SOF_IPC4_MESSAGE_TARGET_FW_GEN_MSG
Global firmware message (dispatched to Base FW or global handler).
Definition header.h:39
@ SOF_IPC4_GLB_NOTIFICATION
Asynchronous notification event from DSP to host driver.
Definition header.h:98
@ SOF_IPC4_MESSAGE_DIR_MSG_REQUEST
Host-to-DSP command request, or unsolicited DSP-to-host notification.
Definition header.h:50
bool send_resource_notif(uint32_t resource_id, uint32_t event_type, uint32_t resource_type, void *data, uint32_t data_size)
Send generic resource event notification.
sof_ipc4_resource_event_type
Specific resource event types reported by identifiable FW entities.
Definition notification.h:55
sof_ipc4_notification_type
Unsolicited DSP-to-host asynchronous notification types.
Definition notification.h:36
sof_ipc4_resource_type
Originator resource category firing a resource event.
Definition notification.h:82
void send_mixer_underrun_notif_msg(uint32_t resource_id, uint32_t eos_flag, uint32_t data_mixed, uint32_t expected_data_mixed)
Send mixer underrun notification message to host.
bool send_gateway_xrun_notif_msg(uint32_t resource_id, enum sof_ipc_stream_direction dir)
Send DMA gateway xrun notification to host.
bool send_copier_gateway_xrun_notif_msg(uint32_t pipeline_id, enum sof_ipc_stream_direction dir)
Send Copier gateway xrun (underrun/overrun) notification to host.
void send_process_data_error_notif_msg(uint32_t resource_id, uint32_t error_code)
Send process data error notification message to host.
void ipc4_update_notification_mask(uint32_t ntfy_mask, uint32_t enabled_mask)
Update host notification enable/disable bitmasks.
static void ipc4_notification_watchdog_init(struct ipc4_watchdog_timeout_notification *notif, uint32_t core_id, bool first_timeout)
Helper to initialize watchdog timeout notification structure.
Definition notification.h:196
@ SOF_IPC4_I2S_SOURCE_MODE_CHANGED
I2S source mode change (started/stopped zero-fill).
Definition notification.h:71
@ SOF_IPC4_BUDGET_VIOLATION
MCPS budget for module or core exceeded.
Definition notification.h:56
@ SOF_IPC4_GATEWAY_HIGH_THRES
IPC gateway reached high watermark threshold.
Definition notification.h:66
@ SOF_IPC4_SNDW_DEBUG_INFO
SoundWire debug notification (e.g.
Definition notification.h:74
@ SOF_IPC4_STREAM_DATA_SEGMENT
Stream data segment completed by gateway.
Definition notification.h:58
@ SOF_IPC4_BUFFERING_MODE_CHANGED
Key Phrase Buffer (KPB) buffering mode changed.
Definition notification.h:61
@ SOF_IPC4_TELEMETRY_DATA_STATUS
Telemetry buffer exceeded threshold or aged.
Definition notification.h:73
@ SOF_IPC4_I2S_CLK_STATE_CHANGED
Clock state change (detected/lost) on I2S port.
Definition notification.h:69
@ SOF_IPC4_PROCESS_DATA_ERROR
Error caught during audio processing.
Definition notification.h:59
@ SOF_IPC4_I2S_BCE_DETECTED
Bit Count Error detected on I2S/SSP port.
Definition notification.h:68
@ SOF_IPC4_MIXER_UNDERRUN_DETECTED
Underrun detected by mixer/mixin component.
Definition notification.h:57
@ SOF_IPC4_INVALID_RESOURCE_EVENT_TYPE
Invalid resource event sentinel.
Definition notification.h:75
@ SOF_IPC4_GATEWAY_UNDERRUN_DETECTED
Underrun detected at peripheral DMA gateway.
Definition notification.h:62
@ SOF_IPC4_GATEWAY_LOW_THRES
IPC gateway reached low watermark threshold.
Definition notification.h:67
@ SOF_IPC4_WATCHDOG_EVENT
Watchdog expiration event.
Definition notification.h:65
@ SOF_IPC4_EDF_DOMAIN_UNSTABLE
Data-processing EDF task missed its deadline.
Definition notification.h:64
@ SOF_IPC4_GATEWAY_OVERRUN_DETECTED
Overrun detected at peripheral DMA gateway.
Definition notification.h:63
@ SOF_IPC4_I2S_SINK_MODE_CHANGED
I2S sink mode change (started/stopped dropping).
Definition notification.h:70
@ SOF_IPC4_STACK_OVERFLOW
Stack overflow detected in module or thread.
Definition notification.h:60
@ SOF_IPC4_SRE_DRIFT_TOO_HIGH
Sample Rate Estimator frequency drift exceeded limit.
Definition notification.h:72
@ SOF_IPC4_EXCEPTION_CAUGHT
Critical DSP exception or panic caught.
Definition notification.h:43
@ SOF_IPC4_NOTIFY_TIMESTAMP_CAPTURED
Audio wallclock timestamp captured.
Definition notification.h:40
@ SOF_IPC4_MODULE_NOTIFICATION
Generic module-specific event notification.
Definition notification.h:44
@ SOF_IPC4_MANAGEMENT_SERVICE
System management service event notification.
Definition notification.h:48
@ SOF_IPC4_PROBE_DATA_AVAILABLE
Probe extraction buffer contains recorded audio.
Definition notification.h:46
@ SOF_IPC4_NOTIFY_LOG_BUFFER_STATUS
Trace log buffer half-full or aging timer expired.
Definition notification.h:39
@ SOF_IPC4_NOTIFY_FW_READY
Firmware initialization complete and ready for IPC.
Definition notification.h:41
@ SOF_IPC4_NOTIFY_PHRASE_DETECTED
Key phrase detected by wake-on-voice engine.
Definition notification.h:37
@ SOF_IPC4_UAOL_EVENT
USB Audio Offload event notification.
Definition notification.h:45
@ SOF_IPC4_WATCHDOG_TIMEOUT
Watchdog timer timeout interrupt on DSP core.
Definition notification.h:47
@ SOF_IPC4_FW_AUD_CLASS_RESULT
Audio classifier / acoustic event result.
Definition notification.h:42
@ SOF_IPC4_NOTIFY_RESOURCE_EVENT
Resource event (underrun, overrun, budget violation).
Definition notification.h:38
@ SOF_IPC4_EDF_TASK
Event originated from an EDF DP task.
Definition notification.h:86
@ SOF_IPC4_MODULE_INSTANCE
Event originated from a module instance.
Definition notification.h:83
@ SOF_IPC4_PIPELINE
Event originated from a pipeline.
Definition notification.h:84
@ SOF_IPC4_GATEWAY
Event originated from a DMA gateway.
Definition notification.h:85
@ SOF_IPC4_INVALID_RESOURCE_TYPE
Invalid resource type sentinel.
Definition notification.h:87
sof_ipc_stream_direction
Definition stream.h:57
Data payload for mixer underrun event (SOF_IPC4_MIXER_UNDERRUN_DETECTED).
Definition notification.h:226
uint32_t expected_data_mixed
Expected bytes of data to be mixed.
Definition notification.h:229
uint32_t eos_flag
End-Of-Stream flag (1 if EOS reached).
Definition notification.h:227
uint32_t data_mixed
Bytes of data successfully mixed.
Definition notification.h:228
Data payload for process data error event (SOF_IPC4_PROCESS_DATA_ERROR).
Definition notification.h:218
uint32_t error_code
Native error code returned by processing function.
Definition notification.h:219
Full resource event notification structure sent in Mailbox Window 0.
Definition notification.h:246
uint32_t resource_type
Source category (enum sof_ipc4_resource_type).
Definition notification.h:247
union ipc4_resource_event_data event_data
Event-specific data union.
Definition notification.h:251
uint32_t event_type
Event type (enum sof_ipc4_resource_event_type).
Definition notification.h:249
uint32_t resource_id
Instance identifier of the firing entity.
Definition notification.h:248
uint32_t reserved0
Explicit alignment padding for 64-bit alignment.
Definition notification.h:250
This notification is reported by the Detector module upon key phrase detection.
Definition notification.h:132
uint32_t type
Opcode: SOF_IPC4_GLB_NOTIFICATION.
Definition notification.h:139
union ipc4_voice_cmd_notification::@77 primary
Primary 32-bit register union.
struct ipc4_voice_cmd_notification::@77::@79 r
Primary bitfields.
union ipc4_voice_cmd_notification::@78 extension
Extension 32-bit register union.
uint32_t word_id
ID of detected keyword.
Definition notification.h:137
uint32_t notif_type
Notification type (SOF_IPC4_NOTIFY_PHRASE_DETECTED).
Definition notification.h:138
uint32_t sv_score
Final speaker verification score (0..8192).
Definition notification.h:150
uint32_t msg_tgt
Message target: 0 for global message.
Definition notification.h:141
uint32_t rsp
Direction: 0 for unsolicited notification.
Definition notification.h:140
uint32_t _reserved_0
Reserved bit.
Definition notification.h:142
uint32_t dat
Raw 32-bit register value.
Definition notification.h:134
uint32_t _reserved_2
Reserved bits.
Definition notification.h:152
uint32_t rsvd1
Reserved bits.
Definition notification.h:151
Watchdog timeout notification structure (SOF_IPC4_WATCHDOG_TIMEOUT).
Definition notification.h:163
uint32_t _hw_rsvd_0
Hardware reserved bit.
Definition notification.h:175
uint32_t rsvd
Reserved padding.
Definition notification.h:170
union ipc4_watchdog_timeout_notification::@82 extension
Extension register value.
uint32_t rsvd1
Reserved padding.
Definition notification.h:183
uint32_t dat
Raw 32-bit register value.
Definition notification.h:165
union ipc4_watchdog_timeout_notification::@81 primary
Primary register value.
uint32_t _hw_rsvd_2
Hardware reserved bits.
Definition notification.h:184
struct ipc4_watchdog_timeout_notification::@81::@83 r
Primary bitfield layout.
uint32_t rsp
0 for notification.
Definition notification.h:173
uint32_t msg_tgt
0 for global message.
Definition notification.h:174
uint32_t core_id
ID of core that timed out.
Definition notification.h:168
uint32_t type
SOF_IPC4_GLB_NOTIFICATION.
Definition notification.h:172
uint32_t notif_type
SOF_IPC4_WATCHDOG_TIMEOUT.
Definition notification.h:171
uint32_t first_timeout
1 if initial timeout and crash dump was taken.
Definition notification.h:169
Polymorphic payload for generic resource event notification.
Definition notification.h:236
struct ipc4_process_data_error_event_data process_data_error
Process error payload.
Definition notification.h:238
struct ipc4_mixer_underrun_event_data mixer_underrun
Mixer underrun payload.
Definition notification.h:239
uint32_t dws[6]
Raw 6-DWORD data array for backwards compatibility.
Definition notification.h:237