
USB Audio Design Guide 21/61
Divide Output pattern Outputs per sample
2 0xAAAAAAAA 2
4 0xCCCCCCCC 4
8 0xF0F0F0F0 8
Figure 13:
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
. The port outputs the pattern
0x7fffffff
followed
by
0x80000000
repeatedly. This gives a signal that has a transition one bitclock
before the data (as required by the I2S standard) and alternates between high and
low for the left and right channels of audio.
3.8.2 Changing Audio Sample Frequency
When the host changes sample frequency, a new frequency is sent to the audio
driver core by Endpoint 0. First, a change of sample frequency is reported by
sending the new frequency over an XC channel. The audio core detects this using
the
select
function on a channel (a
default
case such that processing can continue
if no signal is present on the channel).
Upon receiving the change of sample frequency request, the audio core stops
the I2S interface and calls the CODEC/port configuration functions. Once this is
complete, the I2S interface is restarted at the new frequency.
3.9 Digital Mixer
The mixer core takes outgoing audio from the decoupler and incoming audio from
the audio driver. 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.
·
The inputs from the audio interface on the device—these samples come from
the audio driver.
REV 6.1
Comentários a estes Manuais