8#ifndef __SOF_LIB_NOTIFIER_H__
9#define __SOF_LIB_NOTIFIER_H__
18#define NOTIFIER_TARGET_CORE_MASK(x) (1 << (x))
19#define NOTIFIER_TARGET_CORE_LOCAL NOTIFIER_TARGET_CORE_MASK(cpu_get_id())
20#define NOTIFIER_TARGET_CORE_ALL_MASK 0xFFFFFFFF
48#define NOTIFIER_CLK_CHANGE_ID(clk) \
49 ((clk) == CLK_SSP ? NOTIFIER_ID_SSP_FREQ : NOTIFIER_ID_CPU_FREQ)
51#define NOTIFIER_CLK_CHANGE_ID(clk) NOTIFIER_ID_CPU_FREQ
92 void *caller_data, uint32_t data_size);
void notifier_unregister(void *receiver_data_filter, void *caller_id_filter, enum notify_id type)
Unregister all callbacks matching that arguments tuple.
void notifier_event(const void *caller_id, enum notify_id event_type, uint32_t core_mask, void *caller_data, uint32_t data_size)
void notifier_notify_remote(void)
void(* notifier_callback_t)(void *receiver_data, enum notify_id event_type, void *caller_data)
Definition notifier.h:56
static struct notify_data * notify_data_get(void)
Definition notifier.h:98
notify_id
Definition notifier.h:22
@ NOTIFIER_ID_DMA_DOMAIN_CHANGE
Definition notifier.h:26
@ NOTIFIER_ID_VAD
Definition notifier.h:31
@ NOTIFIER_ID_KPB_CLIENT_EVT
Definition notifier.h:25
@ NOTIFIER_ID_SSP_FREQ
Definition notifier.h:24
@ NOTIFIER_ID_COUNT
Definition notifier.h:32
@ NOTIFIER_ID_DAI_TRIGGER
Definition notifier.h:29
@ NOTIFIER_ID_DMA_COPY
Definition notifier.h:27
@ NOTIFIER_ID_MIC_PRIVACY_STATE_CHANGE
Definition notifier.h:30
@ NOTIFIER_ID_DMA_IRQ
Definition notifier.h:28
@ NOTIFIER_ID_CPU_FREQ
Definition notifier.h:23
void notifier_unregister_all(void *receiver_data_filter, void *caller_id_filter)
Unregister callbacks matching the arguments for every notify_id.
struct notify ** arch_notify_get(void)
int notifier_register(void *receiver_data, void *caller_id_filter, enum notify_id event_type, notifier_callback_t callback)
Register a callback to be run when event 'type' happens.
void free_system_notify(void)
void init_system_notify(struct sof *sof)
Sound Open Firmware global runtime context.
struct sof * sof_get(void)
Get the global Sound Open Firmware runtime instance pointer.
RTOS spinlock primitives and initialization.
uint32_t data_size
Definition notifier.h:43
const void * caller
Definition notifier.h:41
enum notify_id type
Definition notifier.h:42
void * data
Definition notifier.h:44
struct k_spinlock lock
Definition notifier.h:37
struct list_item list[NOTIFIER_ID_COUNT]
Definition notifier.h:36
General firmware context.
Definition sof.h:50
struct notify_data * notify_data
Definition sof.h:90