MIC Services

From 3dbrew
Jump to navigation Jump to search

Microphone service "mic:u"

Command Header Description
0x00010042 MapSharedMem
0x00020000 UnmapSharedMem
0x00030140 (u8 unk0, u8 unk1, u32 unk2, u32 offset, u8 unk3) ? (input offset = offset where the offset field is located in sharedmem, normally sharedmemsize-4)
0x00040040 (u8 input) ?
0x00050000 ?
0x00060000 This writes an output u8 to cmdreply indexword[2]. val = *((u16*)0x1ec62000) >> 15.
0x00070000 GetEventHandle.
0x00080040 SetControl(u8 input). This is a wrapper for CDCMIC command 0x00010040.
0x00090000 GetControl. This is a wrapper for CDCMIC command 0x00020000.
0x000A0040 SetRecording(u8 input). This is a wrapper for CDCMIC command 0x00030040. 0 = disable recording, 1 = enable recording. When recording is disabled with this, MIC-module writes value 0xFFFF to the output audio sample data in shared-mem, since that's what the MIC hardware returns here.
0x000B0000 IsRecording. This is a wrapper for CDCMIC command 0x00040000.
0x000C0042 (size, <translate-header>, bufptr) This is a wrapper for CDCMIC command 0x00050042.
0x000D0040 (u8 input) This writes the input value to a MIC-module state field.
0x000E0000 This writes the u8 value of the MIC-module field also used by command 0x000D0040, to cmdreply indexword[2].
0x000F0040 (u8 input) This writes the input u8 value to a MIC-module state field.
0x00100040 Initialize

This is an interface for using the MIC hardware via the "cdc:MIC" service and the MIC IO registers.

Only one session can be open for this service total(that is, only one process can use this service at a time).

Control value

Bit Description
3-0 ?
6-4 Amplification, 0=none.
7 ?

See Also

MIC Shared Memory