USB Audio Design Guide
The following code snippet illustrates how the output of the S/PDIF receive compo-
nent could be used:
w h i l e (1)
{
c _ s p d i f _ r x : > d a t a ;
if ( b a d P a r i t y ( d a t a )
c o n t i n u e ;
tag = d a t a & 0 xF ;
/* E x t r a c t 24 bit a u d i o s a m p l e */
s a m p l e = ( d a t a < < 4) & 0 x F F F F F F 0 0 ;
s w i t c h ( tag )
{
c a s e F R A M E _ X :
c a s e F R A M E _ X :
// S t o r e l e f t
b r e a k ;
c a s e F R A M E _ Z :
// S t o r e r i g h t
b r e a k ;
}
}
3.9
ADAT Receive
The ADAT receive component receives up to eight channels of audio at a sample
rate of 44.1kHz or 48kHz. The API for calling the receiver functions is described in
§
The component outputs 32 bits words split into nine word frames. The frames are
laid out in the following manner:
·
Control byte
·
Channel 0 sample
·
Channel 1 sample
·
Channel 2 sample
·
Channel 3 sample
·
Channel 4 sample
·
Channel 5 sample
·
Channel 6 sample
XM0088546.1
Содержание xCORE-200 Multi-channel Audio board
Страница 6: ...1 Overview XM0088546 1...