XMOS xCORE-200 Multi-channel Audio board Design Manual page 109

Usb audio
Hide thumbs Also See for xCORE-200 Multi-channel Audio board:
Table of Contents

Advertisement

USB Audio Design Guide
Parameters
c_spdif_rx
c_adat_rx
p
c_audio
c_clk_ctl
c_clk_int
Function
SpdifReceive
Description
S/PDIF receive function.
This function needs 1 thread and no memory other than ~2800 bytes of program
code. It can do 11025, 12000, 22050, 24000, 44100, 48000, 88200, 96000,
and 192000 Hz. When the decoder encounters a long series of zeros it will
lower the divider; when it encounters a short series of 0-1 transitions it will
increase the divider.
Output: the received 24-bit sample values are output as a word on the streaming
channel end. Each value is shifted up by 4-bits with the bottom four bits
being one of FRAME_X, FRAME_Y, or FRAME_Z. The bottom four bits should be
removed whereupon the sample value should be sign extended.
The function does not return unless compiled with TEST defined in which case
it returns any time that it loses synchronisation.
Type
void SpdifReceive(in buffered port:4 p,
Parameters
p
c
initial_divider
clk
XM0088546.1
channel connected to S/PDIF receive thread
channel connect to ADAT receive thread
port to output clock signal to drive external frequency synthe-
sizer
channel connected to the
channel connected to
channel connected to the
streaming chanend c,
int initial_divider,
clock clk)
S/PDIF input port. This port must be 4-bit buffered, declared as
in buffered port:4
channel to output samples to
initial divide for initial estimate of sample rate For a 100Mhz
reference clock, use an initial divider of 1 for 192000, 2 for
96000/88200, and 4 for 48000/44100.
clock block sourced from the 100 MHz reference clock.
audio()
thread
Endpoint0()
for configuration of the clock
decouple()
thread for clock interrupts
109/110

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents