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

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

Advertisement

USB Audio Design Guide
/* Configures the CODEC for the required sample frequency .
* CODEC reset and frequency select are connected to port 32 A
*
* Port 32 A is shared with other functionality ( LEDs etc ) so we
* access via inline assembly . We also take care to retain the
* state of the other bits .
*/
void AudioHwConfig ( unsigned samFreq , unsigned mClk , chanend ? c_codec ,
{
}
Finally, the application has functions for audio streaming start/stop that enable/dis-
able an LED on the board (also on port 32A):
XM0088546.1
unsigned dsdMode ,
unsigned samRes_DAC , unsigned samRes_ADC )
timer t ;
unsigned time ;
unsigned tmp ;
/* Put codec in reset and set master clock select appropriately */
/* Read current port output */
PORT32A_PEEK ( tmp ) ;
/* Put CODEC reset line low */
tmp &= (~ P32A_COD_RST ) ;
if (( samFreq % 22050) == 0)
{
/* Frequency select low for 441000 etc */
tmp &= (~ P32A_CLK_SEL ) ;
}
else // if (( samFreq % 24000) == 0)
{
/* Frequency select high for 48000 etc */
tmp |= P32A_CLK_SEL ;
}
PORT32A_OUT ( tmp ) ;
/* Hold in reset for 2 ms */
t : > time ;
time += 200000;
t when timerafter ( time ) : > int _ ;
/* Codec out of reset */
PORT32A_PEEK ( tmp ) ;
tmp |= P32A_COD_RST ;
PORT32A_OUT ( tmp ) ;
56/110

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents