28 typedef struct tag_dspHookCookie
30 struct tag_dspHookCookie*
next;
void(* dspHookFn)(DSP_HookType hook)
DSP hook function.
Definition: dsp.h:25
Result DSP_FlushDataCache(const void *address, u32 size)
Flushes the cache.
Result DSP_RegisterInterruptEvents(Handle handle, u32 interrupt, u32 channel)
Registers an event handle with the DSP through IPC.
Result DSP_WriteProcessPipe(u32 channel, const void *buffer, u32 length)
Writes to a pipe.
Result dspInit(void)
Initializes the dsp service.
Result DSP_SendData(u16 regNo, u16 value)
Writes to a DSP register.
Result DSP_SetSemaphoreMask(u16 mask)
Masks the DSP hardware semaphore value.
void dspExit(void)
Closes the dsp service.
Result DSP_LoadComponent(const void *component, u32 size, u16 prog_mask, u16 data_mask, bool *is_loaded)
Loads a DSP binary and starts the DSP.
Result DSP_RecvDataIsReady(u16 regNo, bool *is_ready)
Checks if you can read a DSP register.
Result DSP_ConvertProcessAddressFromDspDram(u32 dsp_address, u32 *arm_address)
Converts a DSP memory address to a virtual address usable by the process.
void dspUnhook(dspHookCookie *cookie)
Removes a DSP status hook.
Result DSP_ReadPipeIfPossible(u32 channel, u32 peer, void *buffer, u16 length, u16 *length_read)
Reads a pipe if possible.
void dspHook(dspHookCookie *cookie, dspHookFn callback)
Sets up a DSP status hook.
Result DSP_SetSemaphore(u16 value)
Sets the DSP hardware semaphore value.
Result DSP_RecvData(u16 regNo, u16 *value)
Reads a DSP register.
DSP_InterruptType
DSP interrupt types.
Definition: dsp.h:12
@ DSP_INTERRUPT_PIPE
Pipe interrupt.
Definition: dsp.h:13
Result DSP_SendDataIsEmpty(u16 regNo, bool *is_empty)
Checks if you can write to a DSP register ?
Result DSP_InvalidateDataCache(const void *address, u32 size)
Invalidates the cache.
Result DSP_UnloadComponent(void)
Stops the DSP by unloading the binary.
DSP_HookType
DSP hook types.
Definition: dsp.h:18
@ DSPHOOK_ONSLEEP
DSP is going to sleep.
Definition: dsp.h:19
@ DSPHOOK_ONCANCEL
DSP was sleeping and the app was cancelled.
Definition: dsp.h:21
@ DSPHOOK_ONWAKEUP
DSP is waking up.
Definition: dsp.h:20
Result DSP_GetHeadphoneStatus(bool *is_inserted)
Checks if a headphone is inserted.
Result DSP_GetSemaphoreHandle(Handle *semaphore)
Retrieves the handle of the DSP semaphore.
bool dspIsComponentLoaded(void)
Returns true if a component is loaded, false otherwise.
DSP hook cookie.
Definition: dsp.h:29
struct tag_dspHookCookie * next
Next cookie.
Definition: dsp.h:30
dspHookFn callback
Hook callback.
Definition: dsp.h:31
u32 Handle
Resource handle.
Definition: types.h:41
s32 Result
Function result.
Definition: types.h:42
uint16_t u16
16-bit unsigned integer
Definition: types.h:22
uint32_t u32
32-bit unsigned integer
Definition: types.h:23