
USB Audio Design Guide 29/61
3.12.1 Integration
The ADAT receive function communicates with the clockGen component which
passes audio data onto the audio driver and handles locking to the ADAT clock
source if required.
3.13 Clock Recovery
An application can either provide fixed master clock sources via selectable oscil-
lators, clock generation IC, etc., to provide the audio master or use an external
PLL/Clock Multiplier to generate a master clock based on reference from the XS1.
Using an external PLL/Clock Multiplier allows the design to lock to an external
clock source from a digital steam (e.g. S/PDIF or ADAT input).
The clock recovery core (clockGen) is responsible for generating the reference
frequency to the Fractional-N Clock Generator. This, in turn, generates the master
clock used over the whole design.
When running in Internal Clock mode this core simply generates this clock using a
local timer, based on the XS1 reference clock.
When running in an external clock mode (i.e. S/PDIF Clock” or “ADAT Clock” mode)
digital samples are received from the S/PDIF and/or ADAT receive core. The
external frequency is calculated through counting samples in a given period. The
reference clock to the Fractional-N Clock Multiplier is then generated based on this
external stream. If this stream becomes invalid, the timer event will fire to ensure
that valid master clock generation continues regardless of cable unplugs etc.
This core gets clock selection Get/Set commands from Endpoint 0 via the
c_clk_ctl
channel. This core also records the validity of external clocks, which is also queried
through the same channel from Endpoint 0.
This core also can cause the decouple core to request an interrupt packet on change
of clock validity. This functionality is based on the Audio Class 2.0 status/interrupt
endpoint feature.
3.14 MIDI
The MIDI driver implements a 31250 baud UART input and output. On receiving
32-bit USB MIDI events from the
buffer
core, it parses these and translates them
to 8-bit MIDI messages which are sent over UART. Similarly, incoming 8-bit MIDI
messages are aggregated into 32-bit USB-MIDI events and passed on to the
buffer
core. The MIDI core is implemented in the file usb_midi.xc.
3.15 Audio Controls via Human Interface Device (HID)
The design supports simple audio controls such as play/pause, volume etc via the
USB Human Interface Device Class Specification.
REV 6.1
Kommentare zu diesen Handbüchern