USB Audio Design Guide
from the incoming master clock (typically the output of the external oscillator or
PLL). The audio driver is implemented in the file
audio.xc
.
The audio driver captures and plays audio data over I2S. It also forwards on relevant
audio data to the S/PDIF transmit core.
The audio core must be connected to a CODEC that supports I2S (other modes
such as “left justified” can be supported with firmware changes). In slave mode, the
XMOS device acts as the master generating the Bit Clock (BCLK) and Left-Right Clock
(LRCLK, also called Word Clock) signals. Any CODEC or DAC/ADC combination that
supports I2S and can be used.
Figure
shows the signals used to communicate audio between the XMOS device
and the CODEC.
Signal
Description
LRCLK
The word clock, transition at the start of a sample
BCLK
The bit clock, clocks data in and out
SDIN
Sample data in (from CODEC/ADC to the XMOS device)
SDOUT
Sample data out (from the XMOS device to CODEC/DAC)
MCLK
The master clock running the CODEC/DAC/ADC
Figure 12:
I2S Signals
The bit clock controls the rate at which data is transmitted to and from the CODEC.
In the case where the XMOS device is the master, it divides the MCLK to generate
the required signals for both BCLK and LRCLK, with BCLK then being used to clock
data in (SDIN) and data out (SDOUT) of the CODEC.
Figure
shows some example clock frequencies and divides for different sample
rates (note that this reflects the single tile L-Series reference board configuration):
Sample Rate (kHz)
MCLK (MHz)
BCLK (MHz)
Divide
44.1
11.2896
2.819
4
88.2
11.2896
5.638
2
176.4
11.2896
11.2896
1
48
24.576
3.072
8
96
24.576
6.144
4
192
24.576
12.288
2
Figure 13:
Clock Divides
used in single
tile L-Series
Ref Design
The master clock must be supplied by an external source e.g. clock generator,
fixed oscillators, PLL etc to generate the two frequencies to support 44.1kHz and
48kHz audio frequencies (e.g. 11.2896/22.5792MHz and 12.288/24.576MHz
respectively). This master clock input is then provided to the CODEC and the XMOS
device.
XM0088546.1
Summary of Contents for xCORE-200 Multi-channel Audio board
Page 6: ...1 Overview XM0088546 1...