From 082c06262a0791b3bbe4587b9bc699713fd7c16f Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 13 Nov 2013 16:40:15 +0000 Subject: [PATCH 1/4] BCD_DEVICE bump. 6.2 -> 6.3 --- module_usb_audio/devicedefines.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module_usb_audio/devicedefines.h b/module_usb_audio/devicedefines.h index b12c8eab..4d14bbc6 100644 --- a/module_usb_audio/devicedefines.h +++ b/module_usb_audio/devicedefines.h @@ -246,8 +246,8 @@ /* Device release number in BCD: 0xJJMNi */ #ifndef BCD_DEVICE -#define BCD_DEVICE (0x0620) -#warning BCD_DEVICE not defined. Using 0x0620 +#define BCD_DEVICE (0x0630) +#warning BCD_DEVICE not defined. Using 0x0630 #endif /* Addition interfaces based on defines */ From 1bc57b91dc3373167411b8b85821cbee0da83809 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 13 Nov 2013 16:43:22 +0000 Subject: [PATCH 2/4] Fixed build issue when DFU not enabled. --- module_usb_audio/endpoint0/endpoint0.xc | 2 -- 1 file changed, 2 deletions(-) diff --git a/module_usb_audio/endpoint0/endpoint0.xc b/module_usb_audio/endpoint0/endpoint0.xc index 0dd3d312..0c3a30b1 100755 --- a/module_usb_audio/endpoint0/endpoint0.xc +++ b/module_usb_audio/endpoint0/endpoint0.xc @@ -567,9 +567,7 @@ void Endpoint0( chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, c_audioControl, c_mix_ctl, c_clk_ctl); } #endif -#ifdef DFU } -#endif } break; From 65f01c15e5922c4ff3cfa4c0afe90eede9a761b2 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 13 Nov 2013 16:45:53 +0000 Subject: [PATCH 3/4] Define AUDIO_IO_CORE changed to AUDIO_IO_TILE. Define now used so multi-tile builds. --- module_usb_audio/main.xc | 48 +++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/module_usb_audio/main.xc b/module_usb_audio/main.xc index 33937ae8..9e35866c 100755 --- a/module_usb_audio/main.xc +++ b/module_usb_audio/main.xc @@ -27,9 +27,13 @@ #include "iap.h" #endif +#ifndef AUDIO_IO_TILE +#define AUDIO_IO_TILE 0 +#endif + /* Audio I/O */ #if I2S_WIRES_DAC > 0 -on tile[0] : buffered out port:32 p_i2s_dac[I2S_WIRES_DAC] = +on tile[AUDIO_IO_TILE] : buffered out port:32 p_i2s_dac[I2S_WIRES_DAC] = {PORT_I2S_DAC0, #endif #if I2S_WIRES_DAC > 1 @@ -58,7 +62,7 @@ on tile[0] : buffered out port:32 p_i2s_dac[I2S_WIRES_DAC] = #endif #if I2S_WIRES_ADC > 0 -on tile[0] : buffered in port:32 p_i2s_adc[I2S_WIRES_ADC] = +on tile[AUDIO_IO_TILE] : buffered in port:32 p_i2s_adc[I2S_WIRES_ADC] = {PORT_I2S_ADC0, #endif #if I2S_WIRES_ADC > 1 @@ -86,47 +90,45 @@ on tile[0] : buffered in port:32 p_i2s_adc[I2S_WIRES_ADC] = }; #endif -#ifndef AUDIO_IO_CORE -#define AUDIO_IO_CORE 0 -#endif + #ifndef CODEC_MASTER -on tile[AUDIO_IO_CORE] : buffered out port:32 p_lrclk = PORT_I2S_LRCLK; -on tile[AUDIO_IO_CORE] : buffered out port:32 p_bclk = PORT_I2S_BCLK; +on tile[AUDIO_IO_TILE] : buffered out port:32 p_lrclk = PORT_I2S_LRCLK; +on tile[AUDIO_IO_TILE] : buffered out port:32 p_bclk = PORT_I2S_BCLK; #else -on tile[AUDIO_IO_CORE] : in port p_lrclk = PORT_I2S_LRCLK; -on tile[AUDIO_IO_CORE] : in port p_bclk = PORT_I2S_BCLK; +on tile[AUDIO_IO_TILE] : in port p_lrclk = PORT_I2S_LRCLK; +on tile[AUDIO_IO_TILE] : in port p_bclk = PORT_I2S_BCLK; #endif -on tile[AUDIO_IO_CORE] : port p_mclk_in = PORT_MCLK_IN; +on tile[AUDIO_IO_TILE] : port p_mclk_in = PORT_MCLK_IN; on tile[0] : in port p_for_mclk_count = PORT_MCLK_COUNT; #ifdef SPDIF -on tile[AUDIO_IO_CORE] : buffered out port:32 p_spdif_tx = PORT_SPDIF_OUT; +on tile[AUDIO_IO_TILE] : buffered out port:32 p_spdif_tx = PORT_SPDIF_OUT; #endif #ifdef MIDI -on tile[AUDIO_IO_CORE] : port p_midi_tx = PORT_MIDI_OUT; -on tile[AUDIO_IO_CORE] : port p_midi_rx = PORT_MIDI_IN; +on tile[AUDIO_IO_TILE] : port p_midi_tx = PORT_MIDI_OUT; +on tile[AUDIO_IO_TILE] : port p_midi_rx = PORT_MIDI_IN; #endif /* Clock blocks */ #ifdef MIDI -on tile[AUDIO_IO_CORE] : clock clk_midi = XS1_CLKBLK_REF; +on tile[AUDIO_IO_TILE] : clock clk_midi = XS1_CLKBLK_REF; #endif -on tile[AUDIO_IO_CORE] : clock clk_audio_mclk = XS1_CLKBLK_2; /* Master clock */ +on tile[AUDIO_IO_TILE] : clock clk_audio_mclk = XS1_CLKBLK_2; /* Master clock */ -#if(AUDIO_IO_CORE != 0) +#if(AUDIO_IO_TILE != 0) on tile[0] : clock clk_audio_mclk2 = XS1_CLKBLK_2; /* Master clock */ on tile[0] : in port p_mclk_in2 = PORT_MCLK_IN2; #endif -on tile[AUDIO_IO_CORE] : clock clk_audio_bclk = XS1_CLKBLK_3; /* Bit clock */ +on tile[AUDIO_IO_TILE] : clock clk_audio_bclk = XS1_CLKBLK_3; /* Bit clock */ #ifdef SPDIF -on tile[AUDIO_IO_CORE] : clock clk_mst_spd = XS1_CLKBLK_1; +on tile[AUDIO_IO_TILE] : clock clk_mst_spd = XS1_CLKBLK_1; #endif /* L Series needs a port to use for USB reset */ @@ -144,8 +146,8 @@ clock clk = XS1_CLKBLK_4; #endif #ifdef IAP -on tile [AUDIO_IO_CORE] : port p_i2c_sda = PORT_I2C_SDA; -on tile [AUDIO_IO_CORE] : port p_i2c_scl = PORT_I2C_SCL; +on tile [AUDIO_IO_TILE] : port p_i2c_sda = PORT_I2C_SDA; +on tile [AUDIO_IO_TILE] : port p_i2c_scl = PORT_I2C_SCL; #endif /* Endpoint type tables for XUD */ @@ -259,7 +261,7 @@ int main() //set_port_clock(p_for_mclk_count, clk_audio_mclk); { unsigned x; -#if(AUDIO_IO_CORE != 0) +#if(AUDIO_IO_TILE != 0) set_clock_src(clk_audio_mclk2, p_mclk_in2); set_port_clock(p_for_mclk_count, clk_audio_mclk2); start_clock(clk_audio_mclk2); @@ -297,7 +299,7 @@ int main() } - on tile[AUDIO_IO_CORE]: + on tile[AUDIO_IO_TILE]: { thread_speed(); @@ -323,7 +325,7 @@ int main() } #if defined (MIDI) || defined IAP - on tile[AUDIO_IO_CORE]: + on tile[AUDIO_IO_TILE]: { thread_speed(); #ifdef MIDI From 65d5e58bff9f816846a1fb1551331da21284ca28 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 13 Nov 2013 16:49:29 +0000 Subject: [PATCH 4/4] Comment and #if 1 tidy only --- module_usb_audio/usb_buffer/usb_buffer.xc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/module_usb_audio/usb_buffer/usb_buffer.xc b/module_usb_audio/usb_buffer/usb_buffer.xc index 8a4ce701..a8a41f79 100644 --- a/module_usb_audio/usb_buffer/usb_buffer.xc +++ b/module_usb_audio/usb_buffer/usb_buffer.xc @@ -24,7 +24,7 @@ void GetADCCounts(unsigned samFreq, int &min, int &mid, int &max); #define BUFFER_SIZE_OUT (1028 >> 2) #define BUFFER_SIZE_IN (1028 >> 2) -/* Packet buffers for audio data */ +/* Packet nuffers for audio data */ extern unsigned int g_curSamFreqMultiplier; @@ -520,7 +520,6 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud case XUD_SetData_Select(c_midi_to_host, ep_midi_to_host, tmp): asm("#midi d->h"); -#if 1 swap(midi_to_host_buffer, midi_to_host_waiting_buffer); /* The buffer has been sent to the host, so we can ack the midi thread */ @@ -544,7 +543,6 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud { midi_waiting_on_send_to_host = 0; } -#endif break; #endif