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
=======================
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: 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

View File

@@ -1,7 +1,7 @@
USB Audio Shared
................
:Latest release: 6.11.0alpha2
:Latest release: 6.11.1beta2
:Maintainer: xross
: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">
<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;${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/src}&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">
<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;${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/src}&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/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;${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/src}&quot;' />
<listOptionValue builtIn="false" value='&quot;${workspace_loc:/module_dfu}&quot;' />

View File

@@ -15,9 +15,14 @@
* CODEC configuration functions.
*/
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,
#endif
chanend ?c_config, chanend ?c_adc);
void SpdifTxWrapper(chanend c_spdif_tx);
#endif // __audio_h__

View File

@@ -75,6 +75,7 @@ unsigned dsdMode = DSD_MODE_OFF;
/* Master clock input */
extern port p_mclk_in;
extern in port p_mclk_in2;
#ifdef SPDIF
extern buffered out port:32 p_spdif_tx;
@@ -172,7 +173,7 @@ static inline void TransferAdatTxSamples(chanend c_adat_out, const unsigned samp
unsafe
{
unsigned * unsafe samplesFromHostAdat = &samplesFromHost[ADAT_TX_INDEX];
/* Note, when smux == 1 this loop just does a straight 1:1 copy */
//if(smux != 1)
{
@@ -181,31 +182,31 @@ static inline void TransferAdatTxSamples(chanend c_adat_out, const unsigned samp
{
adatSamples[adatSampleIndex] = samplesFromHostAdat[i];
adatSampleIndex += smux;
}
}
}
}
adatCounter++;
if(adatCounter == smux)
{
#ifdef ADAT_TX_USE_SHARED_BUFF
unsafe
{
/* Wait for ADAT core to be done with buffer */
{
/* Wait for ADAT core to be done with buffer */
/* Note, we are "running ahead" of the ADAT core */
inuint(c_adat_out);
/* Send buffer pointer over to ADAT core */
volatile unsigned * unsafe samplePtr = &adatSamples;
outuint(c_adat_out, (unsigned) samplePtr);
outuint(c_adat_out, (unsigned) samplePtr);
}
#else
#else
#pragma loop unroll
for (int i = 0; i < 8; i++)
{
outuint(c_adat_out, samplesFromHost[ADAT_TX_INDEX + i]);
outuint(c_adat_out, samplesFromHost[ADAT_TX_INDEX + i]);
}
#endif
adatCounter = 0;
@@ -368,11 +369,10 @@ static inline void InitPorts(unsigned divide)
p_lrclk @ tmp <: 0x7FFFFFFF;
#if (I2S_CHANS_ADC != 0)
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
}
@@ -411,8 +411,8 @@ static inline void InitPorts(unsigned divide)
p_lrclk when pinseq(1) :> void @ tmp;
#else
p_lrclk when pinseq(0) :> void @ tmp;
#endif
#endif
tmp += (I2S_CHANS_PER_FRAME * 32) - 32 + 1 ;
/* E.g. 2 * 32 - 32 + 1 = 33 for stereo */
/* E..g 8 * 32 - 32 + 1 = 225 for 8 chan TDM */
@@ -439,10 +439,10 @@ static inline void InitPorts(unsigned divide)
/* I2S delivery thread */
#pragma unsafe arrays
unsigned static deliver(chanend c_out, chanend ?c_spd_out,
unsigned static deliver(chanend c_out, chanend ?c_spd_out,
#ifdef ADAT_TX
chanend c_adat_out,
unsigned adatSmuxMode,
unsigned adatSmuxMode,
#endif
unsigned divide, unsigned curSamFreq,
#if(defined(SPDIF_RX) || defined(ADAT_RX))
@@ -495,17 +495,17 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out,
unsigned command = DoSampleTransfer(c_out, readBuffNo, underflowWord);
#ifdef ADAT_TX
unsafe{
unsafe{
//TransferAdatTxSamples(c_adat_out, samplesOut, adatSmuxMode, 0);
volatile unsigned * unsafe samplePtr = &samplesOut[ADAT_TX_INDEX];
outuint(c_adat_out, (unsigned) samplePtr);
outuint(c_adat_out, (unsigned) samplePtr);
}
#endif
#endif
if(command)
{
return command;
}
InitPorts(divide);
/* TODO In master mode, the i/o loop assumes L/RCLK = 32bit clocks. We should check this every interation
@@ -650,14 +650,14 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out,
/* Clock out the LR Clock, the DAC data and Clock in the next sample into ADC */
doI2SClocks(divide);
#endif
#if (I2S_CHANS_ADC != 0)
/* Input previous L sample into L in buffer */
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;
#pragma loop unroll
@@ -675,10 +675,10 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out,
samplesIn_0[((frameCount-1)&(I2S_CHANS_PER_FRAME-1))+i] = bitrev(sample); // channels 1, 3, 5.. on each line.
}
#endif
#ifdef ADAT_TX
#ifdef ADAT_TX
TransferAdatTxSamples(c_adat_out, samplesOut, adatSmuxMode, 1);
#endif
#endif
if(frameCount == 0)
{
@@ -741,7 +741,7 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out,
#ifndef CODEC_MASTER
doI2SClocks(divide);
#endif
#if (I2S_CHANS_ADC != 0)
index = 0;
/* Channels 0, 2, 4.. on each line */
@@ -843,6 +843,33 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out,
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
connect to the codec ports. It is used during DFU reset. */
unsigned static dummy_deliver(chanend c_out)
@@ -896,17 +923,21 @@ unsigned static dummy_deliver(chanend c_out)
#define SAMPLES_PER_PRINT 1
void audio(chanend c_mix_out,
#if SPDIF
chanend c_spdif_out,
#endif
#if (defined(ADAT_RX) || defined(SPDIF_RX))
chanend c_dig_rx,
#endif
chanend ?c_config, chanend ?c)
{
#ifdef SPDIF
chan c_spdif_out;
#endif
//#ifdef SPDIF
// chan c_spdif_out;
//endif
#ifdef ADAT_TX
chan c_adat_out;
unsigned adatSmuxMode = 0;
unsigned adatMultiple = 0;
#endif
unsigned curSamFreq = DEFAULT_FREQ;
@@ -963,17 +994,20 @@ chanend ?c_config, chanend ?c)
EnableBufferedPort(p_dsd_dac[i], 32);
}
#endif
/* Configure ADAT/SPDIF tx ports */
#ifdef SPDIF
SpdifTransmitPortConfig(p_spdif_tx, clk_mst_spd, p_mclk_in);
#endif
#ifdef ADAT_TX
/* Share SPDIF clk blk */
configure_clock_src(clk_mst_spd, p_mclk_in);
configure_out_port_no_ready(p_adat_tx, clk_mst_spd, 0);
set_clock_fall_delay(clk_mst_spd, 7);
#ifndef SPDIF
start_clock(clk_mst_spd);
#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 */
AudioHwInit(c_config);
@@ -984,17 +1018,19 @@ chanend ?c_config, chanend ?c)
if ((MCLK_441 % curSamFreq) == 0)
{
mClk = MCLK_441;
#ifdef ADAT_TX
#ifdef ADAT_TX
/* Calculate ADAT SMUX mode (1, 2, 4) */
adatSmuxMode = curSamFreq / 44100;
adatSmuxMode = curSamFreq / 44100;
adatMultiple = mClk / 44100;
#endif
}
else if ((MCLK_48 % curSamFreq) == 0)
{
mClk = MCLK_48;
#ifdef ADAT_TX
#ifdef ADAT_TX
/* Calculate ADAT SMUX mode (1, 2, 4) */
adatSmuxMode = curSamFreq / 48000;
adatSmuxMode = curSamFreq / 48000;
adatMultiple = mClk / 48000;
#endif
}
@@ -1114,7 +1150,8 @@ chanend ?c_config, chanend ?c)
par
{
#ifdef SPDIF
#if 0
//#ifdef SPDIF
{
set_thread_fast_mode_on();
SpdifTransmit(p_spdif_tx, c_spdif_out);
@@ -1144,7 +1181,7 @@ chanend ?c_config, chanend ?c)
// adatSmuxMode = 1 for FS = 44K1 or 48K0
// = 2 for FS = 88K2 or 96K0
// = 4 for FS = 176K4 or 192K0
outuint(c_adat_out, mClk/curSamFreq);
outuint(c_adat_out, adatMultiple);
outuint(c_adat_out, adatSmuxMode);
#endif
command = deliver(c_mix_out,
@@ -1155,7 +1192,7 @@ chanend ?c_config, chanend ?c)
#endif
#ifdef ADAT_TX
c_adat_out,
adatSmuxMode,
adatSmuxMode,
#endif
divide, curSamFreq,
#if defined (ADAT_RX) || defined (SPDIF_RX)

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.
*/
#ifndef BCD_DEVICE_N
#define BCD_DEVICE_N 0
#define BCD_DEVICE_N 1
#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"
genstrings(32, "OUT", "TX", "output", "DAC");
genstrings(33, "OUT", "TX", "output", "DAC");
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
and we save some memory over doing this all at runtime */
@@ -1245,6 +1245,46 @@
,
#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 */
@@ -2488,3 +2528,43 @@
,
#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;
unsigned char configDesc_MixerUnit[MIXER_LENGTH];
#endif
#if defined (SPDIF_RX) || defined (ADAT_RX)
#if defined(SPDIF_RX) || defined(ADAT_RX)
/* Interrupt EP */
USB_Descriptor_Endpoint_t Audio_Int_Endpoint;
#endif

View File

@@ -137,21 +137,23 @@ on tile[AUDIO_IO_TILE] : out port p_pll_clk = PORT_PLL_REF;
#endif
#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)
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)
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
/* Clock blocks */
#ifdef MIDI
on tile[AUDIO_IO_TILE] : clock clk_midi = CLKBLK_MIDI;
on tile[MIDI_TILE] : clock clk_midi = CLKBLK_MIDI;
#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
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,
#ifdef MIXER
chanend c_mix_ctl,
#ifdef SPDIF_TX
chanend c_spdif_tx,
#endif
chanend ?c_aud_cfg,
streaming chanend ?c_spdif_rx,
chanend ?c_adat_rx,
chanend ?c_clk_ctl,
chanend ?c_clk_int
#ifdef MIXER
chanend c_mix_ctl,
#endif
chanend ?c_aud_cfg,
streaming chanend ?c_spdif_rx,
chanend ?c_adat_rx,
chanend ?c_clk_ctl,
chanend ?c_clk_int
)
{
#ifdef MIXER
@@ -411,10 +416,13 @@ chanend ?c_clk_int
thread_speed();
#ifdef MIXER
audio(c_mix_out,
#if defined(SPDIF_RX) || defined(ADAT_RX)
c_dig_rx,
#ifdef SPDIF_TX
c_spdif_tx,
#endif
c_aud_cfg, c_adc);
#if defined(SPDIF_RX) || defined(ADAT_RX)
c_dig_rx,
#endif
c_aud_cfg, c_adc);
#else
audio(c_aud_in,
#if defined(SPDIF_RX) || defined(ADAT_RX)
@@ -486,6 +494,11 @@ int main()
#define c_adat_rx null
#endif
#ifdef SPDIF_TX
chan c_spdif_tx;
#endif
#if (defined (SPDIF_RX) || defined (ADAT_RX))
chan c_clk_ctl;
chan c_clk_int;
@@ -515,12 +528,23 @@ int main()
);
on tile[AUDIO_IO_TILE]: usb_audio_io(c_mix_out, c_adc
#ifdef SPDIF_TX
, c_spdif_tx
#endif
#ifdef MIXER
, c_mix_ctl
#endif
,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)
/* MIDI and IAP share a core */
on tile[IAP_TILE]:

View File

@@ -31,7 +31,7 @@
/* #define CLKBLK_MCLK XS1_CLKBLK_2 */
#define CLKBLK_I2S_BIT XS1_CLKBLK_3
#else
#else
/* XUD_U_SERIES */

View File

@@ -17,6 +17,8 @@
* \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)
*/
#include "devicedefines.h"
void buffer(chanend c_aud_out,
chanend c_aud_in,
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 */
/* 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);
if(freqChange == SET_SAMPLE_FREQ)

View File

@@ -20,8 +20,8 @@
</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">
<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 version = "6.11.1">module_queue</componentDependency>
<keyword>MIDI</keyword>
</component>
</components>
@@ -81,7 +81,10 @@
<release parenthash = "30f610d185606bd17061581debb6693369fcbb05" version = "6.10.0alpha2" githash = "517fe9667c43f2c5fe0d8e5dae06be716342a16a"></release>
<release parenthash = "38958db165ea44a8db74abd0cf294fcb466e5172" version = "6.11.0alpha0" githash = "af925d59b69833c0ec8d970b667b4164833e5d4c"></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>
<vendor>XMOS</vendor>
<version_defines>