libnx  v4.2.2
mm.h
1 /**
2  * @file mmu.h
3  * @brief Multimedia (mm) IPC wrapper.
4  * @author averne
5  * @copyright libnx Authors
6  */
7 
8 #pragma once
9 #include "../types.h"
10 #include "../sf/service.h"
11 
12 typedef enum {
13  MmuModuleId_Ram = 2,
14  MmuModuleId_Nvenc = 5,
15  MmuModuleId_Nvdec = 6,
16  MmuModuleId_Nvjpg = 7,
17 } MmuModuleId;
18 
19 typedef struct {
20  MmuModuleId module;
21  u32 id;
22 } MmuRequest;
23 
24 Result mmuInitialize(void);
25 void mmuExit(void);
26 Service* mmuGetServiceSession(void);
27 
28 Result mmuRequestInitialize(MmuRequest *request, MmuModuleId module, u32 unk, bool autoclear); ///< unk is ignored by official software
29 Result mmuRequestFinalize(const MmuRequest *request);
30 Result mmuRequestGet(const MmuRequest *request, u32 *out_freq_hz);
31 Result mmuRequestSetAndWait(const MmuRequest *request, u32 freq_hz, s32 timeout);
MmuRequest
Definition: mm.h:19
s32
int32_t s32
32-bit signed integer.
Definition: types.h:27
u32
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
Result
u32 Result
Function error code result type.
Definition: types.h:44
Service
Service object structure.
Definition: service.h:13