diff --git a/examples/app_i2s_loopback_xvf3510/Makefile b/examples/app_i2s_loopback_xvf3510/Makefile deleted file mode 100644 index 3ddd7bcb..00000000 --- a/examples/app_i2s_loopback_xvf3510/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -APP_NAME = app_xua_i2s_loopback - -TARGET = XK_XVF3510_L71.xn - -# The flags passed to xcc when building the application -XCC_FLAGS = -Os -report -save-temps -g -Wno-unused-function -DXUD_SERIES_SUPPORT=XUD_X200_SERIES -DUSB_TILE=tile[1] - -# The USED_MODULES variable lists other module used by the application. These -# modules will extend the SOURCE_DIRS, INCLUDE_DIRS and LIB_DIRS variables. -# Modules are expected to be in the directory above the BASE_DIR directory. -USED_MODULES = lib_xua lib_xud lib_i2c - - -#============================================================================= -# The following part of the Makefile includes the common build infrastructure -# for compiling XMOS applications. You should not need to edit below here. - -XMOS_MAKE_PATH ?= ../.. -include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common - diff --git a/examples/app_i2s_loopback_xvf3510/XK_XVF3510_L71.xn b/examples/app_i2s_loopback_xvf3510/XK_XVF3510_L71.xn deleted file mode 100644 index be6fd040..00000000 --- a/examples/app_i2s_loopback_xvf3510/XK_XVF3510_L71.xn +++ /dev/null @@ -1,111 +0,0 @@ - - - Device - XVF3510 Device - - - tileref tile[2] - tileref usb_tile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/app_i2s_loopback_xvf3510/app_i2s_loopback.xc b/examples/app_i2s_loopback_xvf3510/app_i2s_loopback.xc deleted file mode 100644 index e6d2423a..00000000 --- a/examples/app_i2s_loopback_xvf3510/app_i2s_loopback.xc +++ /dev/null @@ -1,104 +0,0 @@ - -/* A very simple *example* of I2S loopback (analog in to analog out) - * using the I2S module built into lib_xua (usb audio library) - * - * - */ - -#include -#include -#include - -#include "xua_commands.h" -#include "xua.h" - -/* Port declarations. Note, the defines come from the xn file */ -buffered out port:32 p_i2s_dac[] = {I2S_MIC_DATA}; /* I2S Data-line(s) */ -buffered in port:32 p_i2s_adc[] = {I2S_DATA_IN}; /* I2S Data-line(s) */ - -#if defined(CODEC_MASTER) && (CODEC_MASTER != 0) -on tile[AUDIO_IO_TILE] : buffered in port:32 p_lrclk = PORT_I2S_LRCLK; -on tile[AUDIO_IO_TILE] : buffered in port:32 p_bclk = PORT_I2S_BCLK; -#else -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; -#endif - - -/* Port declarations. Note, the defines come from the xn file */ -/* Master clock for the audio IO tile */ -//on tile[1]: in port p_mclk_in_tile1 = PORT_MCLK_TILE1; -on tile[0]: in port p_mclk_in = PORT_PDM_MCLK; - - -/* Resources for USB feedback */ -in port p_for_mclk_count = PORT_MCLK_COUNT; /* Extra port for counting master clock ticks */ - -/* Clock-block declarations */ -clock clk_audio_bclk = on tile[0]: XS1_CLKBLK_3; /* Bit clock */ -clock clk_audio_mclk = on tile[0]: XS1_CLKBLK_2; /* Master clock */ -//clock clk_audio_mclk_usb = on tile[1]: XS1_CLKBLK_1; /* Master clock for USB tile */ - - - -on tile[0] : clock mclk_internal = XS1_CLKBLK_5; - -void set_node_pll_reg(tileref tile_ref, unsigned reg_val){ - write_sswitch_reg(get_tile_id(tile_ref), XS1_SSWITCH_PLL_CTL_NUM, reg_val); -} - -void run_clock(void) { - configure_clock_xcore(mclk_internal, 10); // 24.576 MHz - configure_port_clock_output(p_mclk_in, mclk_internal); - start_clock(mclk_internal); -} - -// Nominal setting is ref div = 25, fb_div = 1024, op_div = 2 -// PCF Freq 0.96MHz - -#define PLL_NOM 0xC003FF18 // This is 3.072MHz - -void set_pll(void) { - set_node_pll_reg(tile[0], PLL_NOM); - run_clock(); -} - -void loopback(chanend c_i2s) -{ - int samps[NUM_USB_CHAN_OUT] = {0}; - int sampFreq = FREQ; - - /* This block is the protocol for sample rate change */ - inuint(c_i2s); - outct(c_i2s, SET_SAMPLE_FREQ); - outuint(c_i2s, sampFreq); - chkct(c_i2s, XS1_CT_END); - - while(1) - { - inuint(c_i2s); - for (int i=0; i - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/app_i2s_loopback_xvf3510/hwsupport.xc b/examples/app_i2s_loopback_xvf3510/hwsupport.xc deleted file mode 100644 index 00a4126e..00000000 --- a/examples/app_i2s_loopback_xvf3510/hwsupport.xc +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include -#include -#include "i2c.h" -#include "dsd_support.h" -#include "debug_print.h" -#include "xassert.h" - - -void AudioHwInit() -{ -} -//: - -void AudioHwConfig(unsigned samFreq, unsigned mClk, unsigned dsdMode, - unsigned samRes_DAC, unsigned samRes_ADC) -{ -} -//: diff --git a/examples/app_i2s_loopback_xvf3510/xua_conf.h b/examples/app_i2s_loopback_xvf3510/xua_conf.h deleted file mode 100644 index df3c818b..00000000 --- a/examples/app_i2s_loopback_xvf3510/xua_conf.h +++ /dev/null @@ -1,37 +0,0 @@ - -#define NUM_USB_CHAN_OUT 2 -#define NUM_USB_CHAN_IN 2 -#define I2S_CHANS_DAC 2 -#define I2S_CHANS_ADC 2 -#define MCLK_441 (512 * 44100) -#define MCLK_48 (512 * 48000) -#define FREQ 48000 -#define MIN_FREQ FREQ -#define MAX_FREQ FREQ - -#define EXCLUDE_USB_AUDIO_MAIN -#define NUM_PDM_MICS 0 -#define XUD_TILE 1 -#define AUDIO_IO_TILE 0 -#define MIXER 0 -#define XUA_USB_EN 1 //switch on transfer samples - -#define SPDIF_TX_INDEX 0 -#define VENDOR_STR "XMOS" -#define VENDOR_ID 0x20B1 -#define PRODUCT_STR_A2 "XUA Example" -#define PRODUCT_STR_A1 "XUA Example" -#define PID_AUDIO_1 1 -#define PID_AUDIO_2 2 -#define AUDIO_CLASS 2 -#define AUDIO_CLASS_FALLBACK 0 -#define BCD_DEVICE 0x1234 -#define XUA_DFU_EN 0 - -#define N_BITS_I2S 32 -#define AUD_TO_USB_RATIO 1 -#define CODEC_MASTER 0 - - -/* TODO */ -#define XUA_DFU XUA_DFU_EN \ No newline at end of file