USB Audio Design Guide
6.7.2
DAC Configuration
The board is equipped with a single stereo audio DAC with integrated headphone
amplifier (Cirrus Logic CS43L21)
Configuration of both the DAC takes place using I2C. The design uses the I2C
component sc_i2c
31
.
The reset lines of the DAC is connected to bits 0
PORT 4F
.
6.7.3
AudioHwInit()
The
function is called on power up and is implemented to perform
the following:
·
Puts the DAC into reset
·
Initialise the I2C master software module
·
Initialises the CS2100 part over I2C
·
Configures the CS2100 part to output a ratio for a suitable initial master clock
frequency (
DEFAULT_MCLK_FREQ
)
6.7.4
AudioHwConfig()
The
function is called on every sample frequency change.
The
function first puts the both the DAC/headphone-amp and
into reset by writing to
PORT 4F
.
It then sets the required ratio in the CS2100 via I2C based on the
mClk
parameter.
After a delay, in order to allow the master clock from the CS2100 to settle the DAC
is take out of reset. The DAC is then configured via I2C, this primarily involves
switching the DAC into I2S slave mode
6.7.5
Mic Processing Example
The provided application includes a basic example of processing the data
from the PDM microphones.
This basic processing example is located in
user_pdm_process()
. It takes a block of PCM microphone samples as an input and
writes processed samples into the
output
array parameter.
The processing involves applying a simple gain globally to all of the microphones.
Normal operation sees this gain applied to the data from the 7 microphones and
then written to
output[0-6]
. The gain is increased and decreased by pressing
buttons B and C respectively.
http://www.github.com/xcore/sc_i2c
XM0088546.1
Содержание xCORE-200 Multi-channel Audio board
Страница 6: ...1 Overview XM0088546 1...