Home

Awesome

Audio controller (I2S, SPDIF, DAC)

Github: https://github.com/ultraembedded/core_audio

This component is a basic audio controller providing I2S, SPDIF, and DAC outputs.
Simple to drive AXI4-L register interface, with built in 2048 entry buffer and interrupt on programmable threshold.

Features
Instance
Register Map
OffsetNameDescription
0x00AUDIO_CFG[RW] Configuration Register
0x04AUDIO_STATUS[R] UART Status Register
0x08AUDIO_CLK_DIV[RW] Clock divisor
0x0cAUDIO_CLK_FRAC[RW] Clock divisor (fractional part)
0x20AUDIO_FIFO_WRITE[W] Audio data write FIFO
Register: AUDIO_CFG
BitsNameDescription
15:0INT_THRESHOLDBuffer low watermark interrupt threshold
16BYTE_SWAPByte order swap on buffer write
17CH_SWAPChannel swap
19:18TARGET0=I2S,1=SPDIF,2=DAC
26:24VOL_CTRLVolume control (0 = max, 7 = min)
31BUFFER_RSTFlush audio buffer
Register: AUDIO_STATUS
BitsNameDescription
31:16LEVELFIFO level
1FULLBuffer full
0EMPTYBuffer empty
Register: AUDIO_CLK_DIV
BitsNameDescription
15:0WHOLE_CYCLESNumber of whole cycles to divide clk by (clk_out = clk/(whole_cycles+1))
Register: AUDIO_CLK_FRAC
BitsNameDescription
15:0NUMERATORFractional clock divider numerator
31:16DENOMINATORFractional clock divider denominator
Register: AUDIO_FIFO_WRITE
BitsNameDescription
15:0CH_BChannel B audio sample write
31:16CH_AChannel A audio sample write