USB Audio Design Guide
master-clock and bit-clock. The following table shows the required pattern for
different values of this divide:
Divide
Output pattern
Outputs per sample
2
0xAAAAAAAA
2
4
0xCCCCCCCC
4
8
0xF0F0F0F0
8
Figure 15:
Output
patterns
In any case, the bit clock outputs 32 clock cycles per sample. In the special
case where the divide is 1 (i.e. the bit clock frequency equals the master clock
frequency), the
p_bclk
port is set to a special mode where it simply outputs its
clock input (i.e.
p_mclk
). See
configure_port_clock_output()
in
xs1.h
for details.
p_lrclk
is clocked by
p_bclk
. In I2S mode the port outputs the pattern
0x7fffffff
followed by
0x80000000
repeatedly. This gives a signal that has a transition one
bit-clock before the data (as required by the I2S standard) and alternates between
high and low for the left and right channels of audio.
3.5.2
Changing Audio Sample Frequency
When the host changes sample frequency, a new frequency is sent to the audio
driver core by Endpoint 0 (via the buffering cores and mixer).
First, a change of sample frequency is reported by sending the new frequency
over an XC channel. The audio core detects this by checking for the presence of a
control token on the channel channel
Upon receiving the change of sample frequency request, the audio core stops the
I2S/TDM interface and calls the CODEC/port configuration functions.
Once this is complete, the I2S/TDM interface is restarted at the new frequency.
3.6
Digital Mixer
The mixer core(s) take outgoing audio from the decoupler core and incoming
audio from the audio driver core. It then applies the volume to each channel
and passes incoming audio on to the decoupler and outgoing audio to the audio
driver. The volume update is achieved using the built-in 32bit to 64bit signed
multiply-accumulate function (
macs
). The mixer is implemented in the file
mixer.xc
.
The mixer takes two cores and can perform eight mixes with up to 18 inputs at
sample rates up to 96kHz and two mixes with up to 18 inputs at higher sample
rates. The component automatically moves down to two mixes when switching to
a higher rate.
The mixer can take inputs from either:
·
The USB outputs from the host—these samples come from the decoupler core.
XM0088546.1
Summary of Contents for xCORE-200 Multi-channel Audio board
Page 6: ...1 Overview XM0088546 1...