Sound Open Firmware
Loading...
Searching...
No Matches
notifier.h File Reference
Include dependency graph for notifier.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  notify
 
struct  notify_data
 

Macros

#define NOTIFIER_TARGET_CORE_MASK(x)   (1 << (x))
 
#define NOTIFIER_TARGET_CORE_LOCAL   NOTIFIER_TARGET_CORE_MASK(cpu_get_id())
 
#define NOTIFIER_TARGET_CORE_ALL_MASK   0xFFFFFFFF
 
#define NOTIFIER_CLK_CHANGE_ID(clk)   NOTIFIER_ID_CPU_FREQ
 

Typedefs

typedef void(* notifier_callback_t) (void *receiver_data, enum notify_id event_type, void *caller_data)
 

Enumerations

enum  notify_id {
  NOTIFIER_ID_CPU_FREQ = 0 , NOTIFIER_ID_SSP_FREQ , NOTIFIER_ID_KPB_CLIENT_EVT , NOTIFIER_ID_DMA_DOMAIN_CHANGE ,
  NOTIFIER_ID_DMA_COPY , NOTIFIER_ID_DMA_IRQ , NOTIFIER_ID_DAI_TRIGGER , NOTIFIER_ID_MIC_PRIVACY_STATE_CHANGE ,
  NOTIFIER_ID_VAD , NOTIFIER_ID_COUNT
}
 

Functions

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 notifier_unregister (void *receiver_data_filter, void *caller_id_filter, enum notify_id type)
 Unregister all callbacks matching that arguments tuple.
 
void notifier_unregister_all (void *receiver_data_filter, void *caller_id_filter)
 Unregister callbacks matching the arguments for every notify_id.
 
void notifier_notify_remote (void)
 
void notifier_event (const void *caller_id, enum notify_id event_type, uint32_t core_mask, void *caller_data, uint32_t data_size)
 
void init_system_notify (struct sof *sof)
 
void free_system_notify (void)
 
static struct notify_data * notify_data_get (void)
 

Macro Definition Documentation

◆ NOTIFIER_CLK_CHANGE_ID

#define NOTIFIER_CLK_CHANGE_ID (   clk)    NOTIFIER_ID_CPU_FREQ

◆ NOTIFIER_TARGET_CORE_ALL_MASK

#define NOTIFIER_TARGET_CORE_ALL_MASK   0xFFFFFFFF

◆ NOTIFIER_TARGET_CORE_LOCAL

#define NOTIFIER_TARGET_CORE_LOCAL   NOTIFIER_TARGET_CORE_MASK(cpu_get_id())

◆ NOTIFIER_TARGET_CORE_MASK

#define NOTIFIER_TARGET_CORE_MASK (   x)    (1 << (x))

Typedef Documentation

◆ notifier_callback_t

typedef void(* notifier_callback_t) (void *receiver_data, enum notify_id event_type, void *caller_data)

Enumeration Type Documentation

◆ notify_id

enum notify_id
Enumerator
NOTIFIER_ID_CPU_FREQ 
NOTIFIER_ID_SSP_FREQ 
NOTIFIER_ID_KPB_CLIENT_EVT 
NOTIFIER_ID_DMA_DOMAIN_CHANGE 
NOTIFIER_ID_DMA_COPY 
NOTIFIER_ID_DMA_IRQ 
NOTIFIER_ID_DAI_TRIGGER 
NOTIFIER_ID_MIC_PRIVACY_STATE_CHANGE 
NOTIFIER_ID_VAD 
NOTIFIER_ID_COUNT 

Function Documentation

◆ arch_notify_get()

struct notify ** arch_notify_get ( void  )

◆ free_system_notify()

void free_system_notify ( void  )

◆ init_system_notify()

void init_system_notify ( struct sof *  sof)

◆ notifier_event()

void notifier_event ( const void *  caller_id,
enum notify_id  event_type,
uint32_t  core_mask,
void *  caller_data,
uint32_t  data_size 
)

◆ notifier_notify_remote()

void notifier_notify_remote ( void  )

◆ notifier_register()

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.

The identifier for un-registration is the tuple (receiver_data, caller_id_filter, event_type), the callback argument is not part of it.

caller_data argument from notifier_event()

Parameters
receiver_dataprivate data passed to the callback.
caller_id_filteroptional, can be used to be notified only by some specific notifier_event() calls when not NULL.
event_typelist of callbacks to be added to
callbackcallback function

◆ notifier_unregister()

void notifier_unregister ( void *  receiver_data_filter,
void *  caller_id_filter,
enum notify_id  type 
)

Unregister all callbacks matching that arguments tuple.

NULL acts as a wildcard.

◆ notifier_unregister_all()

void notifier_unregister_all ( void *  receiver_data_filter,
void *  caller_id_filter 
)

Unregister callbacks matching the arguments for every notify_id.

A NULL parameter acts as a wildcard.

◆ notify_data_get()

static struct notify_data * notify_data_get ( void  )
inlinestatic