Hardware/Audio Interface

From WiiBrew
< Hardware(Redirected from Hardware/AI)
Jump to navigation Jump to search
Audio Interface
Access
BroadwayFull
StarletFull[check]
Registers
Base0x0d806c00
Length0x20
Access size32 bits
Byte orderBig Endian
IRQs
Broadway5
This box: view  talk  edit

This is mainly taken from YAGCD. (Note: YAGCD reports the base address of AI as 0xCC006C00, because that is location of it on the GameCube. On the Wii it is 0xCD806C00.) The abbreviation for Audio Interface is AI.

Registers

AI_CONTROL (0xCD006C00)
  31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Access U
Field
  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Access U R/W R/W R/W R/W R/W R/W R/W
Field RATE SCRESET AIINTVLD AIINT AIINTMSK AFR PSTAT
Field Description
RATE Sample Rate. Cleared is 48KHz, set is 32KHz.
SCRESET Sample Counter Reset. Resets AI_AISCNT to 0.
AIINTVLD This bit controls whether AIINT is affected by the AI_AIIT register matching AI_AISCNT. Once set, AIINT will hold its last value. If 0, match affects AIINT. If 1, AIINT holds last value.
AIINT AI Interrupt Status and Clear. When read, holds the status of the AI Interrupt. If you set this bit, the Interrupt is cleared. The interrupt is generated when AIIT matches AI_AISCNT. Fires regardless of AIINTMSK.
AIINTMSK AI Interrupt Mask. If 1, Interrupt is enabled. If 0, it is masked.
AFR Auxiliary Frequency Register. Same values as RATE. Should only be changed when PSTAT is cleared.
PSTAT Play status. 0 is stopped/paused, 1 is playing. This actually controls the AIS clock. This means that AI_AISCNT is increased only when PSTAT is 1.


AI_VOLUME (0xCD006C04)
  31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Access U
Field
  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Access R/W R/W
Field AVRR AVRL
Field Description
AVRR The Right channel's volume. 0x00 is Muted, 0xFF is full volume.
AVRL The Left channel's volume. 0x00 is Muted, 0xFF is full volume.


AI_AISCNT (0xCD006C08)
  31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Access R
Field AISCNT(H)
  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Access R
Field AISCNT(L)
Field Description
AISCNT Amount of samples played so far. Controlled with AI_CONTROL.

AI_AIIT (0xCD006C0C)
  31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Access R/W
Field AIIT(H)
  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Access R/W
Field AIIT(L)
Field Description
AIIT AI Interrupt Timing. This register indicates the stereo sample count to issue an audio interface interrupt to the main processor. The interrupt is issued when the value of the AI_AISCNT register matches the content of this register.