This commit is contained in:
Ross Owen
2015-03-17 11:50:02 +00:00
14 changed files with 238 additions and 74 deletions

View File

@@ -1,8 +1,9 @@
sc_usb_audio Change Log sc_usb_audio Change Log
======================= =======================
HEAD 6.11.1
---- ------
- ADDED: ADAT transmit functionality, including SMUX. See ADAT_TX and ADAT_TX_INDEX.
- RESOLVED: Build issue with CODEC_MASTER (xCore is I2S slave) enabled - RESOLVED: Build issue with CODEC_MASTER (xCore is I2S slave) enabled
- RESOLVED: Channel ordering issue in when TDM and CODEC_MASTER mode enabled - RESOLVED: Channel ordering issue in when TDM and CODEC_MASTER mode enabled
- RESOLVED: DFU fails when SPDIF_RX enabled due to clock block being shared between SPDIF - RESOLVED: DFU fails when SPDIF_RX enabled due to clock block being shared between SPDIF

View File

@@ -1,7 +1,7 @@
USB Audio Shared USB Audio Shared
................ ................
:Latest release: 6.11.0alpha2 :Latest release: 6.11.1beta2
:Maintainer: xross :Maintainer: xross
:Description: USB Audio Shared Components. For use in the XMOS USB Audio Refererence Designs. :Description: USB Audio Shared Components. For use in the XMOS USB Audio Refererence Designs.

View File

@@ -156,7 +156,11 @@
<option id = "com.xmos.xc.compiler.option.include.paths.23684077" name="com.xmos.xc.compiler.option.include.paths" superClass="com.xmos.xc.compiler.option.include.paths" valueType="includePath"> <option id = "com.xmos.xc.compiler.option.include.paths.23684077" name="com.xmos.xc.compiler.option.include.paths" superClass="com.xmos.xc.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include&quot;"/> <listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include/gcc&quot;"/> <listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include/gcc&quot;"/>
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx}&quot;' /> <listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx/xmosdfu.dSYM/Contents/Resources/DWARF}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx/xmosdfu.dSYM/Contents/Resources}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx/xmosdfu.dSYM/Contents}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx/xmosdfu.dSYM}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host}&quot;' /> <listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/src}&quot;' /> <listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/src}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu}&quot;' /> <listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu}&quot;' />
@@ -271,7 +275,11 @@
<option id = "com.xmos.c.compiler.option.include.paths.18653743" name="com.xmos.c.compiler.option.include.paths" superClass="com.xmos.c.compiler.option.include.paths" valueType="includePath"> <option id = "com.xmos.c.compiler.option.include.paths.18653743" name="com.xmos.c.compiler.option.include.paths" superClass="com.xmos.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include&quot;"/> <listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include/gcc&quot;"/> <listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include/gcc&quot;"/>
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx}&quot;' /> <listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx/xmosdfu.dSYM/Contents/Resources/DWARF}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx/xmosdfu.dSYM/Contents/Resources}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx/xmosdfu.dSYM/Contents}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx/xmosdfu.dSYM}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host}&quot;' /> <listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/src}&quot;' /> <listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/src}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu}&quot;' /> <listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu}&quot;' />
@@ -392,7 +400,11 @@
<listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include/gcc&quot;"/> <listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include/gcc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include/c++/4.2.1&quot;"/> <listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include/c++/4.2.1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include/c++/4.2.1/xcore-xmos-elf&quot;"/> <listOptionValue builtIn="false" value="&quot;${XMOS_TOOL_PATH}/target/include/c++/4.2.1/xcore-xmos-elf&quot;"/>
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx}&quot;' /> <listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx/xmosdfu.dSYM/Contents/Resources/DWARF}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx/xmosdfu.dSYM/Contents/Resources}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx/xmosdfu.dSYM/Contents}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx/xmosdfu.dSYM}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host/xmos_dfu_osx}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host}&quot;' /> <listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/host}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/src}&quot;' /> <listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu/src}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu}&quot;' /> <listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu}&quot;' />

View File

@@ -15,9 +15,14 @@
* CODEC configuration functions. * CODEC configuration functions.
*/ */
void audio(chanend c_in, void audio(chanend c_in,
#if (defined(SPDIF_RX) || defined(ADAT_RX)) #ifdef SPDIF_TX
chanend c_spdif_tx,
#endif
#if(defined(SPDIF_RX) || defined(ADAT_RX))
chanend c_dig, chanend c_dig,
#endif #endif
chanend ?c_config, chanend ?c_adc); chanend ?c_config, chanend ?c_adc);
void SpdifTxWrapper(chanend c_spdif_tx);
#endif // __audio_h__ #endif // __audio_h__

View File

@@ -75,6 +75,7 @@ unsigned dsdMode = DSD_MODE_OFF;
/* Master clock input */ /* Master clock input */
extern port p_mclk_in; extern port p_mclk_in;
extern in port p_mclk_in2;
#ifdef SPDIF #ifdef SPDIF
extern buffered out port:32 p_spdif_tx; extern buffered out port:32 p_spdif_tx;
@@ -368,11 +369,10 @@ static inline void InitPorts(unsigned divide)
p_lrclk @ tmp <: 0x7FFFFFFF; p_lrclk @ tmp <: 0x7FFFFFFF;
#if (I2S_CHANS_ADC != 0) #if (I2S_CHANS_ADC != 0)
for(int i = 0; i < I2S_WIRES_ADC; i++) for(int i = 0; i < I2S_WIRES_ADC; i++)
{ {
asm("setpt res[%0], %1"::"r"(p_i2s_adc[i]),"r"(tmp-1)); asm("setpt res[%0], %1"::"r"(p_i2s_adc[i]),"r"(tmp+31));
} }
#endif #endif
} }
@@ -657,7 +657,7 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out,
#if (I2S_CHANS_ADC != 0) #if (I2S_CHANS_ADC != 0)
/* Input previous L sample into L in buffer */ /* Input previous L sample into L in buffer */
index = 0; index = 0;
/* First input (i.e. frameCoint == 0) we read last ADC channel of previous frame.. */ /* First input (i.e. frameCount == 0) we read last ADC channel of previous frame.. */
unsigned buffIndex = frameCount ? !readBuffNo : readBuffNo; unsigned buffIndex = frameCount ? !readBuffNo : readBuffNo;
#pragma loop unroll #pragma loop unroll
@@ -843,6 +843,33 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out,
return 0; return 0;
} }
#ifdef SPDIF
void SpdifTxWrapper(chanend c_spdif_tx)
{
unsigned portId;
#if SPDIF_TX_TILE == AUDIO_IO_TILE
SpdifTransmitPortConfig(p_spdif_tx, clk_mst_spd, p_mclk_in);
#error
#else
//configure_clock_src(clk, p_mclk);
// TODO could share clock block here..
asm("ldw %0, dp[p_mclk_in2]":"=r"(portId));
asm("setclk res[%0], %1"::"r"(clk_mst_spd), "r"(portId));
configure_out_port_no_ready(p_spdif_tx, clk_mst_spd, 0);
set_clock_fall_delay(clk_mst_spd, 7);
start_clock(clk_mst_spd);
#endif
while(1)
{
SpdifTransmit(p_spdif_tx, c_spdif_tx);
}
}
#endif
/* This function is a dummy version of the deliver thread that does not /* This function is a dummy version of the deliver thread that does not
connect to the codec ports. It is used during DFU reset. */ connect to the codec ports. It is used during DFU reset. */
unsigned static dummy_deliver(chanend c_out) unsigned static dummy_deliver(chanend c_out)
@@ -896,17 +923,21 @@ unsigned static dummy_deliver(chanend c_out)
#define SAMPLES_PER_PRINT 1 #define SAMPLES_PER_PRINT 1
void audio(chanend c_mix_out, void audio(chanend c_mix_out,
#if SPDIF
chanend c_spdif_out,
#endif
#if (defined(ADAT_RX) || defined(SPDIF_RX)) #if (defined(ADAT_RX) || defined(SPDIF_RX))
chanend c_dig_rx, chanend c_dig_rx,
#endif #endif
chanend ?c_config, chanend ?c) chanend ?c_config, chanend ?c)
{ {
#ifdef SPDIF //#ifdef SPDIF
chan c_spdif_out; // chan c_spdif_out;
#endif //endif
#ifdef ADAT_TX #ifdef ADAT_TX
chan c_adat_out; chan c_adat_out;
unsigned adatSmuxMode = 0; unsigned adatSmuxMode = 0;
unsigned adatMultiple = 0;
#endif #endif
unsigned curSamFreq = DEFAULT_FREQ; unsigned curSamFreq = DEFAULT_FREQ;
@@ -963,17 +994,20 @@ chanend ?c_config, chanend ?c)
EnableBufferedPort(p_dsd_dac[i], 32); EnableBufferedPort(p_dsd_dac[i], 32);
} }
#endif #endif
/* Configure ADAT/SPDIF tx ports */
#ifdef SPDIF
SpdifTransmitPortConfig(p_spdif_tx, clk_mst_spd, p_mclk_in);
#endif
#ifdef ADAT_TX #ifdef ADAT_TX
/* Share SPDIF clk blk */
configure_clock_src(clk_mst_spd, p_mclk_in); configure_clock_src(clk_mst_spd, p_mclk_in);
configure_out_port_no_ready(p_adat_tx, clk_mst_spd, 0); configure_out_port_no_ready(p_adat_tx, clk_mst_spd, 0);
set_clock_fall_delay(clk_mst_spd, 7); set_clock_fall_delay(clk_mst_spd, 7);
#ifndef SPDIF
start_clock(clk_mst_spd); start_clock(clk_mst_spd);
#endif #endif
#endif
/* Configure ADAT/SPDIF tx ports */
#ifdef SPDIF
//SpdifTransmitPortConfig(p_spdif_tx, clk_mst_spd, p_mclk_in);
#endif
/* Perform required CODEC/ADC/DAC initialisation */ /* Perform required CODEC/ADC/DAC initialisation */
AudioHwInit(c_config); AudioHwInit(c_config);
@@ -987,6 +1021,7 @@ chanend ?c_config, chanend ?c)
#ifdef ADAT_TX #ifdef ADAT_TX
/* Calculate ADAT SMUX mode (1, 2, 4) */ /* Calculate ADAT SMUX mode (1, 2, 4) */
adatSmuxMode = curSamFreq / 44100; adatSmuxMode = curSamFreq / 44100;
adatMultiple = mClk / 44100;
#endif #endif
} }
else if ((MCLK_48 % curSamFreq) == 0) else if ((MCLK_48 % curSamFreq) == 0)
@@ -995,6 +1030,7 @@ chanend ?c_config, chanend ?c)
#ifdef ADAT_TX #ifdef ADAT_TX
/* Calculate ADAT SMUX mode (1, 2, 4) */ /* Calculate ADAT SMUX mode (1, 2, 4) */
adatSmuxMode = curSamFreq / 48000; adatSmuxMode = curSamFreq / 48000;
adatMultiple = mClk / 48000;
#endif #endif
} }
@@ -1114,7 +1150,8 @@ chanend ?c_config, chanend ?c)
par par
{ {
#ifdef SPDIF #if 0
//#ifdef SPDIF
{ {
set_thread_fast_mode_on(); set_thread_fast_mode_on();
SpdifTransmit(p_spdif_tx, c_spdif_out); SpdifTransmit(p_spdif_tx, c_spdif_out);
@@ -1144,7 +1181,7 @@ chanend ?c_config, chanend ?c)
// adatSmuxMode = 1 for FS = 44K1 or 48K0 // adatSmuxMode = 1 for FS = 44K1 or 48K0
// = 2 for FS = 88K2 or 96K0 // = 2 for FS = 88K2 or 96K0
// = 4 for FS = 176K4 or 192K0 // = 4 for FS = 176K4 or 192K0
outuint(c_adat_out, mClk/curSamFreq); outuint(c_adat_out, adatMultiple);
outuint(c_adat_out, adatSmuxMode); outuint(c_adat_out, adatSmuxMode);
#endif #endif
command = deliver(c_mix_out, command = deliver(c_mix_out,

View File

@@ -469,7 +469,7 @@
* @brief Device firmware version number in Binary Coded Decimal format: 0xJJMN where JJ: major, M: minor, N: sub-minor version number. * @brief Device firmware version number in Binary Coded Decimal format: 0xJJMN where JJ: major, M: minor, N: sub-minor version number.
*/ */
#ifndef BCD_DEVICE_N #ifndef BCD_DEVICE_N
#define BCD_DEVICE_N 0 #define BCD_DEVICE_N 1
#endif #endif
/** /**

View File

@@ -49,8 +49,8 @@ print "/* Not very nice looking but the standard preprocessor is not very powerf
print "/* Output Strings */\n\n" print "/* Output Strings */\n\n"
genstrings(32, "OUT", "TX", "output", "DAC"); genstrings(33, "OUT", "TX", "output", "DAC");
print "/* Input Strings */\n\n" print "/* Input Strings */\n\n"
genstrings(32, "IN", "RX", "input", "ADC"); genstrings(33, "IN", "RX", "input", "ADC");

View File

@@ -1,4 +1,4 @@
/* AUTOGENERATED using stringtable.py */ /* AUTOGENERATED using chanstringgen.py */
/* Not very nice looking but the standard preprocessor is not very powerful /* Not very nice looking but the standard preprocessor is not very powerful
and we save some memory over doing this all at runtime */ and we save some memory over doing this all at runtime */
@@ -1245,6 +1245,46 @@
, ,
#endif #endif
#if (NUM_USB_CHAN_OUT > 32-1)
.outputChanStr_32 = ""
#if (32 < I2S_CHANS_DAC+1)
"Analogue 32"
#endif
#if ((32 < SPDIF_TX_INDEX+2+1) && (32 > SPDIF_TX_INDEX)) && defined(SPDIF_TX)
#if (32 < I2S_CHANS_DAC+1)
"/"
#endif
#if(32 - SPDIF_TX_INDEX == 1)
"SPDIF 1"
#elif(32 - SPDIF_TX_INDEX == 2)
"SPDIF 2"
#endif
#endif
#if ((32 < ADAT_TX_INDEX+8+1) && (32 > ADAT_TX_INDEX)) && defined(ADAT_TX)
#if ((32 < SPDIF_TX_INDEX+2+1) && (32 > SPDIF_TX_INDEX)) && defined(SPDIF_TX) || (32 < I2S_CHANS_DAC+1)
"/"
#endif
#if(32 - ADAT_TX_INDEX == 1)
"ADAT 1"
#elif(32 - ADAT_TX_INDEX == 2)
"ADAT 2"
#elif(32 - ADAT_TX_INDEX == 3)
"ADAT 3"
#elif(32 - ADAT_TX_INDEX == 4)
"ADAT 4"
#elif(32 - ADAT_TX_INDEX == 5)
"ADAT 5"
#elif(32 - ADAT_TX_INDEX == 6)
"ADAT 6"
#elif(32 - ADAT_TX_INDEX == 7)
"ADAT 7"
#elif(32 - ADAT_TX_INDEX == 8)
"ADAT 8"
#endif
#endif
,
#endif
/* Input Strings */ /* Input Strings */
@@ -2488,3 +2528,43 @@
, ,
#endif #endif
#if (NUM_USB_CHAN_IN > 32-1)
.inputChanStr_32 = ""
#if (32 < I2S_CHANS_ADC+1)
"Analogue 32"
#endif
#if ((32 < SPDIF_RX_INDEX+2+1) && (32 > SPDIF_RX_INDEX)) && defined(SPDIF_RX)
#if (32 < I2S_CHANS_ADC+1)
"/"
#endif
#if(32 - SPDIF_TX_INDEX == 1)
"SPDIF 1"
#elif(32 - SPDIF_TX_INDEX == 2)
"SPDIF 2"
#endif
#endif
#if ((32 < ADAT_RX_INDEX+8+1) && (32 > ADAT_RX_INDEX)) && defined(ADAT_RX)
#if ((32 < SPDIF_RX_INDEX+2+1) && (32 > SPDIF_RX_INDEX)) && defined(SPDIF_RX) || (32 < I2S_CHANS_ADC+1)
"/"
#endif
#if(32 - ADAT_TX_INDEX == 1)
"ADAT 1"
#elif(32 - ADAT_TX_INDEX == 2)
"ADAT 2"
#elif(32 - ADAT_TX_INDEX == 3)
"ADAT 3"
#elif(32 - ADAT_TX_INDEX == 4)
"ADAT 4"
#elif(32 - ADAT_TX_INDEX == 5)
"ADAT 5"
#elif(32 - ADAT_TX_INDEX == 6)
"ADAT 6"
#elif(32 - ADAT_TX_INDEX == 7)
"ADAT 7"
#elif(32 - ADAT_TX_INDEX == 8)
"ADAT 8"
#endif
#endif
,
#endif

View File

@@ -696,7 +696,7 @@ typedef struct
// USB_Descriptor_Audio_MixerUnit_t Audio_MixerUnit; // USB_Descriptor_Audio_MixerUnit_t Audio_MixerUnit;
unsigned char configDesc_MixerUnit[MIXER_LENGTH]; unsigned char configDesc_MixerUnit[MIXER_LENGTH];
#endif #endif
#if defined (SPDIF_RX) || defined (ADAT_RX) #if defined(SPDIF_RX) || defined(ADAT_RX)
/* Interrupt EP */ /* Interrupt EP */
USB_Descriptor_Endpoint_t Audio_Int_Endpoint; USB_Descriptor_Endpoint_t Audio_Int_Endpoint;
#endif #endif

View File

@@ -137,21 +137,23 @@ on tile[AUDIO_IO_TILE] : out port p_pll_clk = PORT_PLL_REF;
#endif #endif
#ifdef MIDI #ifdef MIDI
on tile[AUDIO_IO_TILE] : port p_midi_tx = PORT_MIDI_OUT; on tile[MIDI_TILE] : port p_midi_tx = PORT_MIDI_OUT;
#if(MIDI_RX_PORT_WIDTH == 4) #if(MIDI_RX_PORT_WIDTH == 4)
on tile[AUDIO_IO_TILE] : buffered in port:4 p_midi_rx = PORT_MIDI_IN; on tile[MIDI_TILE] : buffered in port:4 p_midi_rx = PORT_MIDI_IN;
#elif(MIDI_RX_PORT_WIDTH == 1) #elif(MIDI_RX_PORT_WIDTH == 1)
on tile[AUDIO_IO_TILE] : buffered in port:1 p_midi_rx = PORT_MIDI_IN; on tile[MIDI_TILE] : buffered in port:1 p_midi_rx = PORT_MIDI_IN;
#endif #endif
#endif #endif
/* Clock blocks */ /* Clock blocks */
#ifdef MIDI #ifdef MIDI
on tile[AUDIO_IO_TILE] : clock clk_midi = CLKBLK_MIDI; on tile[MIDI_TILE] : clock clk_midi = CLKBLK_MIDI;
#endif #endif
on tile[AUDIO_IO_TILE] : clock clk_mst_spd = CLKBLK_SPDIF_TX; #if defined(SPDIF) || defined(ADAT_TX)
on tile[SPDIF_TX_TILE] : clock clk_mst_spd = CLKBLK_SPDIF_TX;
#endif
#ifdef SPDIF_RX #ifdef SPDIF_RX
on tile[XUD_TILE] : clock clk_spd_rx = CLKBLK_SPDIF_RX; on tile[XUD_TILE] : clock clk_spd_rx = CLKBLK_SPDIF_RX;
@@ -377,14 +379,17 @@ void usb_audio_core(chanend c_mix_out
} }
void usb_audio_io(chanend c_aud_in, chanend ?c_adc, void usb_audio_io(chanend c_aud_in, chanend ?c_adc,
#ifdef MIXER #ifdef SPDIF_TX
chanend c_mix_ctl, chanend c_spdif_tx,
#endif #endif
chanend ?c_aud_cfg, #ifdef MIXER
streaming chanend ?c_spdif_rx, chanend c_mix_ctl,
chanend ?c_adat_rx, #endif
chanend ?c_clk_ctl, chanend ?c_aud_cfg,
chanend ?c_clk_int streaming chanend ?c_spdif_rx,
chanend ?c_adat_rx,
chanend ?c_clk_ctl,
chanend ?c_clk_int
) )
{ {
#ifdef MIXER #ifdef MIXER
@@ -411,10 +416,13 @@ chanend ?c_clk_int
thread_speed(); thread_speed();
#ifdef MIXER #ifdef MIXER
audio(c_mix_out, audio(c_mix_out,
#if defined(SPDIF_RX) || defined(ADAT_RX) #ifdef SPDIF_TX
c_dig_rx, c_spdif_tx,
#endif #endif
c_aud_cfg, c_adc); #if defined(SPDIF_RX) || defined(ADAT_RX)
c_dig_rx,
#endif
c_aud_cfg, c_adc);
#else #else
audio(c_aud_in, audio(c_aud_in,
#if defined(SPDIF_RX) || defined(ADAT_RX) #if defined(SPDIF_RX) || defined(ADAT_RX)
@@ -486,6 +494,11 @@ int main()
#define c_adat_rx null #define c_adat_rx null
#endif #endif
#ifdef SPDIF_TX
chan c_spdif_tx;
#endif
#if (defined (SPDIF_RX) || defined (ADAT_RX)) #if (defined (SPDIF_RX) || defined (ADAT_RX))
chan c_clk_ctl; chan c_clk_ctl;
chan c_clk_int; chan c_clk_int;
@@ -515,12 +528,23 @@ int main()
); );
on tile[AUDIO_IO_TILE]: usb_audio_io(c_mix_out, c_adc on tile[AUDIO_IO_TILE]: usb_audio_io(c_mix_out, c_adc
#ifdef SPDIF_TX
, c_spdif_tx
#endif
#ifdef MIXER #ifdef MIXER
, c_mix_ctl , c_mix_ctl
#endif #endif
,c_aud_cfg, c_spdif_rx, c_adat_rx, c_clk_ctl, c_clk_int ,c_aud_cfg, c_spdif_rx, c_adat_rx, c_clk_ctl, c_clk_int
); );
#ifdef SPDIF_TX
on tile[SPDIF_TX_TILE]:
{
thread_speed();
SpdifTxWrapper(c_spdif_tx);
}
#endif
#if defined(MIDI) && defined(IAP) && (IAP_TILE == MIDI_TILE) #if defined(MIDI) && defined(IAP) && (IAP_TILE == MIDI_TILE)
/* MIDI and IAP share a core */ /* MIDI and IAP share a core */
on tile[IAP_TILE]: on tile[IAP_TILE]:

View File

@@ -17,6 +17,8 @@
* \param c_aud_ctl Audio control channel connected to Endpoint0() * \param c_aud_ctl Audio control channel connected to Endpoint0()
* \param p_off_mclk A port that is clocked of the MCLK input (not the MCLK input itself) * \param p_off_mclk A port that is clocked of the MCLK input (not the MCLK input itself)
*/ */
#include "devicedefines.h"
void buffer(chanend c_aud_out, void buffer(chanend c_aud_out,
chanend c_aud_in, chanend c_aud_in,
chanend c_aud_fb, chanend c_aud_fb,

View File

@@ -378,7 +378,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
* lastClock being incorrect */ * lastClock being incorrect */
/* Get MCLK count */ /* Get MCLK count */
asm (" getts %0, res[%1]" : "=r" (u_tmp) : "r" (p_off_mclk)); asm volatile(" getts %0, res[%1]" : "=r" (u_tmp) : "r" (p_off_mclk));
GET_SHARED_GLOBAL(freqChange, g_freqChange); GET_SHARED_GLOBAL(freqChange, g_freqChange);
if(freqChange == SET_SAMPLE_FREQ) if(freqChange == SET_SAMPLE_FREQ)

View File

@@ -20,8 +20,8 @@
</component> </component>
<component description = "MIDI" type = "demoCode" scope = "General Use" path = "module_usb_midi" local = "false" id = "module_usb_midi" name = "MIDI Module for USB Audio Framework"> <component description = "MIDI" type = "demoCode" scope = "General Use" path = "module_usb_midi" local = "false" id = "module_usb_midi" name = "MIDI Module for USB Audio Framework">
<board></board> <board></board>
<componentDependency version = "6.11.0">module_queue</componentDependency>
<componentDependency repo = "git://github.com/xcore/sc_util" version = "1.0.4">module_xassert</componentDependency> <componentDependency repo = "git://github.com/xcore/sc_util" version = "1.0.4">module_xassert</componentDependency>
<componentDependency version = "6.11.1">module_queue</componentDependency>
<keyword>MIDI</keyword> <keyword>MIDI</keyword>
</component> </component>
</components> </components>
@@ -81,7 +81,10 @@
<release parenthash = "30f610d185606bd17061581debb6693369fcbb05" version = "6.10.0alpha2" githash = "517fe9667c43f2c5fe0d8e5dae06be716342a16a"></release> <release parenthash = "30f610d185606bd17061581debb6693369fcbb05" version = "6.10.0alpha2" githash = "517fe9667c43f2c5fe0d8e5dae06be716342a16a"></release>
<release parenthash = "38958db165ea44a8db74abd0cf294fcb466e5172" version = "6.11.0alpha0" githash = "af925d59b69833c0ec8d970b667b4164833e5d4c"></release> <release parenthash = "38958db165ea44a8db74abd0cf294fcb466e5172" version = "6.11.0alpha0" githash = "af925d59b69833c0ec8d970b667b4164833e5d4c"></release>
<release parenthash = "a4af4fd0f27b117df1f6e7ff6a10299f2ea91349" version = "6.11.0alpha1" githash = "bed9f5314a0f7f2c952da24bd6efa18931b12b93"></release> <release parenthash = "a4af4fd0f27b117df1f6e7ff6a10299f2ea91349" version = "6.11.0alpha1" githash = "bed9f5314a0f7f2c952da24bd6efa18931b12b93"></release>
<release parenthash = "66ce8f8a6e982c3de563205d12e0ed10725ef8c3" version = "6.11.0alpha2"></release> <release parenthash = "66ce8f8a6e982c3de563205d12e0ed10725ef8c3" version = "6.11.0alpha2" githash = "7f8c3c687022e4664ba8f7d455ffcef8656911c0"></release>
<release parenthash = "6eaa986eb9b385a4be9de719fd906daa8b36a6bf" version = "6.11.1beta0" githash = "fa12263ac6248aa95abcdb11eaa5d6b09cffff7f"></release>
<release parenthash = "8335ef56cdc879e7e84a338534e10091b86b1e5a" version = "6.11.1beta1" githash = "3e61cee71c4aaa845908d5d9dfb9257a1000215d"></release>
<release parenthash = "214c5c4f4287b2e0f78a397d5ae9edeaceefa3b2" version = "6.11.1beta2"></release>
<subpartnumber>XM-004720-SM</subpartnumber> <subpartnumber>XM-004720-SM</subpartnumber>
<vendor>XMOS</vendor> <vendor>XMOS</vendor>
<version_defines> <version_defines>