From a120d7a83e59d1eab4f4b40adfe41519ea4cd9a9 Mon Sep 17 00:00:00 2001 From: Oscar Bailey Date: Fri, 23 Aug 2019 09:30:05 +0100 Subject: [PATCH 01/13] Added audio stream start/stop callbacks for input/output --- CHANGELOG.rst | 1 + lib_xua/src/core/endpoint0/xua_endpoint0.c | 51 +++++++++++++++---- .../src/core/user/audiostream/audiostream.c | 29 ++++++++++- .../src/core/user/audiostream/audiostream.h | 12 +++++ 4 files changed, 81 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 232e19a7..35975793 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,7 @@ lib_xua Change Log * ADDED: Initial library documentation * ADDED: Application note AN00247: Using lib_xua with lib_spdif (transmit) + * ADDED: Callbacks for input/output audio stream start/stop * CHANGE: I2S hardware resources no longer used globally and must be passed to XUA_AudioHub() * CHANGE: XUA_AudioHub() no longer pars S/PDIF transmitter task diff --git a/lib_xua/src/core/endpoint0/xua_endpoint0.c b/lib_xua/src/core/endpoint0/xua_endpoint0.c index b3ef87a0..5ebdfbd0 100755 --- a/lib_xua/src/core/endpoint0/xua_endpoint0.c +++ b/lib_xua/src/core/endpoint0/xua_endpoint0.c @@ -409,23 +409,48 @@ void XUA_Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, } #if (NUM_USB_CHAN_OUT > 0) && (NUM_USB_CHAN_IN > 0) - if ((sp.wIndex == INTERFACE_NUMBER_AUDIO_OUTPUT) || (sp.wIndex == INTERFACE_NUMBER_AUDIO_INPUT)) + unsigned num_input_interfaces = g_interfaceAlt[INTERFACE_NUMBER_AUDIO_INPUT]; + unsigned num_output_interfaces = g_interfaceAlt[INTERFACE_NUMBER_AUDIO_OUTPUT]; + if (sp.wIndex == INTERFACE_NUMBER_AUDIO_INPUT) { - /* Check for stream start stop on output and input audio interfaces */ - if(sp.wValue && !g_interfaceAlt[INTERFACE_NUMBER_AUDIO_OUTPUT] && !g_interfaceAlt[INTERFACE_NUMBER_AUDIO_INPUT]) + // in: 0 -> 1 + if (sp.wValue && !num_input_interfaces) { - /* If start and input AND output not currently running */ - UserAudioStreamStart(); + UserAudioInputStreamStart(); + if (!num_output_interfaces) + { + UserAudioStreamStart(); + } } - else if(((sp.wIndex == 1) && (!sp.wValue)) && g_interfaceAlt[INTERFACE_NUMBER_AUDIO_OUTPUT] && (!g_interfaceAlt[INTERFACE_NUMBER_AUDIO_INPUT])) + // in: 1 -> 0 + else if (!sp.wValue && num_input_interfaces) { - /* if output stop and output running and input not running */ - UserAudioStreamStop(); + UserAudioInputStreamStop(); + if (!num_output_interfaces) + { + UserAudioStreamStop(); + } } - else if(((sp.wIndex == 2) && (!sp.wValue)) && g_interfaceAlt[INTERFACE_NUMBER_AUDIO_INPUT] && (!g_interfaceAlt[INTERFACE_NUMBER_AUDIO_OUTPUT])) + } + else if (sp.wIndex == INTERFACE_NUMBER_AUDIO_OUTPUT) + { + // out: 0 -> 1 + if (sp.wValue && !num_output_interfaces) { - /* if input stop and input running and output not running */ - UserAudioStreamStop(); + UserAudioOutputStreamStart(); + if (!num_input_interfaces) + { + UserAudioStreamStart(); + } + } + // out: 1 -> 0 + else if (!sp.wValue && num_output_interfaces) + { + UserAudioOutputStreamStop(); + if (!num_input_interfaces) + { + UserAudioStreamStop(); + } } } #elif (NUM_USB_CHAN_OUT > 0) @@ -435,11 +460,13 @@ void XUA_Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, { /* if start and not currently running */ UserAudioStreamStart(); + UserAudioOutputStreamStart(); } else if (!sp.wValue && g_interfaceAlt[INTERFACE_NUMBER_AUDIO_OUTPUT]) { /* if stop and currently running */ UserAudioStreamStop(); + UserAudioOutputStreamStop(); } } #elif (NUM_USB_CHAN_IN > 0) @@ -449,11 +476,13 @@ void XUA_Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, { /* if start and not currently running */ UserAudioStreamStart(); + UserAudioInputStreamStart(); } else if (!sp.wValue && g_interfaceAlt[INTERFACE_NUMBER_AUDIO_INPUT]) { /* if stop and currently running */ UserAudioStreamStop(); + UserAudioInputStreamStop(); } } #endif diff --git a/lib_xua/src/core/user/audiostream/audiostream.c b/lib_xua/src/core/user/audiostream/audiostream.c index d07491df..de729e39 100644 --- a/lib_xua/src/core/user/audiostream/audiostream.c +++ b/lib_xua/src/core/user/audiostream/audiostream.c @@ -1,6 +1,9 @@ // Copyright (c) 2013-2018, XMOS Ltd, All rights reserved -/* Deafult implementations of AudioStreamStop() and AudioStreamStart(). Both can be over-ridden */ +/* Default implementations of AudioStreamStop() and AudioStreamStart() + * callbacks. + */ + void UserAudioStreamStop() __attribute__ ((weak)); void UserAudioStreamStop() { @@ -12,3 +15,27 @@ void UserAudioStreamStart() { return; } + +void UserAudioInputStreamStop() __attribute__ ((weak)); +void UserAudioInputStreamStop() +{ + return; +} + +void UserAudioInputStreamStart() __attribute__ ((weak)); +void UserAudioInputStreamStart() +{ + return; +} + +void UserAudioOutputStreamStop() __attribute__ ((weak)); +void UserAudioOutputStreamStop() +{ + return; +} + +void UserAudioOutputStreamStart() __attribute__ ((weak)); +void UserAudioOutputStreamStart() +{ + return; +} diff --git a/lib_xua/src/core/user/audiostream/audiostream.h b/lib_xua/src/core/user/audiostream/audiostream.h index 60942914..f1c5060f 100644 --- a/lib_xua/src/core/user/audiostream/audiostream.h +++ b/lib_xua/src/core/user/audiostream/audiostream.h @@ -14,5 +14,17 @@ void UserAudioStreamStart(void); /* Any actions required on stream stop e.g. DAC mute - run every steam stop */ void UserAudioStreamStop(void); +/* Any actions required on input stream start */ +void UserAudioInputStreamStart(void); + +/* Any actions required on input stream stop */ +void UserAudioInputStreamStop(void); + +/* Any actions required on output stream start */ +void UserAudioOutputStreamStart(void); + +/* Any actions required on output stream stop */ +void UserAudioOutputStreamStop(void); + #endif From 3fc2729db853ae4ba8e24c11d25740b09f1130bd Mon Sep 17 00:00:00 2001 From: Oscar Bailey Date: Fri, 23 Aug 2019 09:52:53 +0100 Subject: [PATCH 02/13] Update Copyright --- lib_xua/src/core/endpoint0/xua_endpoint0.c | 2 +- lib_xua/src/core/user/audiostream/audiostream.c | 2 +- lib_xua/src/core/user/audiostream/audiostream.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_xua/src/core/endpoint0/xua_endpoint0.c b/lib_xua/src/core/endpoint0/xua_endpoint0.c index 5ebdfbd0..a66088f0 100755 --- a/lib_xua/src/core/endpoint0/xua_endpoint0.c +++ b/lib_xua/src/core/endpoint0/xua_endpoint0.c @@ -1,4 +1,4 @@ -// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved +// Copyright (c) 2011-2019, XMOS Ltd, All rights reserved /** * @brief Implements endpoint zero for an USB Audio 1.0/2.0 device * @author Ross Owen, XMOS Semiconductor diff --git a/lib_xua/src/core/user/audiostream/audiostream.c b/lib_xua/src/core/user/audiostream/audiostream.c index de729e39..863bb1a0 100644 --- a/lib_xua/src/core/user/audiostream/audiostream.c +++ b/lib_xua/src/core/user/audiostream/audiostream.c @@ -1,4 +1,4 @@ -// Copyright (c) 2013-2018, XMOS Ltd, All rights reserved +// Copyright (c) 2013-2019, XMOS Ltd, All rights reserved /* Default implementations of AudioStreamStop() and AudioStreamStart() * callbacks. diff --git a/lib_xua/src/core/user/audiostream/audiostream.h b/lib_xua/src/core/user/audiostream/audiostream.h index f1c5060f..bb218fd5 100644 --- a/lib_xua/src/core/user/audiostream/audiostream.h +++ b/lib_xua/src/core/user/audiostream/audiostream.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved +// Copyright (c) 2011-2019, XMOS Ltd, All rights reserved #ifndef _AUDIOSTREAM_H_ #define _AUDIOSTREAM_H_ From 5b05e4e32e06107b228dd380f169110c9cf3f47e Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Tue, 27 Aug 2019 11:06:44 +0100 Subject: [PATCH 03/13] Update CHANGELOG.rst --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 35975793..1f871966 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,7 +6,7 @@ lib_xua Change Log * ADDED: Initial library documentation * ADDED: Application note AN00247: Using lib_xua with lib_spdif (transmit) - * ADDED: Callbacks for input/output audio stream start/stop + * ADDED: Separate callbacks for input/output audio stream start/stop * CHANGE: I2S hardware resources no longer used globally and must be passed to XUA_AudioHub() * CHANGE: XUA_AudioHub() no longer pars S/PDIF transmitter task From 9d84debefdf6c0a2d972b32e642e155704bc0df7 Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Tue, 13 Aug 2019 12:44:22 +0100 Subject: [PATCH 04/13] Update to support "xwaf.xcommon" builds --- lib_xua/module_build_info | 87 ++++++++++++++++++++++++++------------- 1 file changed, 58 insertions(+), 29 deletions(-) diff --git a/lib_xua/module_build_info b/lib_xua/module_build_info index 2a36dedf..c3221cf1 100644 --- a/lib_xua/module_build_info +++ b/lib_xua/module_build_info @@ -1,37 +1,66 @@ -# You can set flags specifically for your module by using the MODULE_XCC_FLAGS -# variable. So the following -# -# MODULE_XCC_FLAGS = $(XCC_FLAGS) -O3 -# -# specifies that everything in the modules should have the application -# build flags with -O3 appended (so the files will build at -# optimization level -O3). -# -# You can also set MODULE_XCC_C_FLAGS, MODULE_XCC_XC_FLAGS etc.. +VERSION = 0.2.0 -MODULE_XCC_FLAGS = $(XCC_FLAGS) -O3 -DREF_CLK_FREQ=100 -fasm-linenum -fcomment-asm +DEPENDENT_MODULES = lib_logging(>=2.1.0) \ + lib_xassert(>=2.0.0) \ + lib_xud(>=0.1.0) \ + lib_spdif(>=3.0.0) \ + lib_mic_array(>=3.2.0) + +MODULE_XCC_FLAGS = $(XCC_FLAGS) \ + -O3 \ + -DREF_CLK_FREQ=100 \ + -fasm-linenum \ + -fcomment-asm + +# Core +XCC_FLAGS_xua_endpoint0.c = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue +XCC_FLAGS_xua_ep0_uacreqs.xc = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue +XCC_FLAGS_dbcalc.xc = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue +XCC_FLAGS_audioports.c = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue +XCC_FLAGS_audioports.xc = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue + +# DFU +XCC_FLAGS_dfu.xc = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue +XCC_FLAGS_flash_interface.c = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue +XCC_FLAGS_flashlib_user.c = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue OPTIONAL_HEADERS += xua_conf.h -VERSION = 0.2.0 +EXPORT_INCLUDE_DIRS = api \ + src/core \ + src/core/audiohub \ + src/core/buffer/ep \ + src/core/endpoint0 \ + src/dfu -DEPENDENT_MODULES = lib_logging(>=2.1.0) lib_xassert(>=2.0.0) lib_xud(>=0.1.0) lib_spdif(>=3.0.0) +INCLUDE_DIRS = $(EXPORT_INCLUDE_DIRS) \ + src/core/buffer/decouple \ + src/core/clocking \ + src/core/mixer \ + src/core/pdm_mics \ + src/core/ports \ + src/core/support \ + src/core/support/powersave \ + src/core/user \ + src/core/user/audiostream \ + src/core/user/hostactive \ + src/midi -INCLUDE_DIRS = api src/* +SOURCE_DIRS = src/core \ + src/core/audiohub \ + src/core/buffer/decouple \ + src/core/buffer/ep \ + src/core/clocking \ + src/core/endpoint0 \ + src/core/mixer \ + src/core/pdm_mics \ + src/core/ports \ + src/core/support \ + src/core/support/powersave \ + src/core/user/audiostream \ + src/core/user/hostactive \ + src/core/xuduser \ + src/dfu \ + src/midi -#ignore host dir -SOURCE_DIRS = src/* - -# The following file specific flags are not automatically kept in sync with the wscript file -# Core EXCLUDE_FILES += descriptors_2.rst -XCC_FLAGS_xua_endpoint0.c = -Os -mno-dual-issue $(XCC_FLAGS) -XCC_FLAGS_xua_ep0_uacreqs.xc = -Os -mno-dual-issue $(XCC_FLAGS) -XCC_FLAGS_dbcalc.xc = -Os -mno-dual-issue $(XCC_FLAGS) -XCC_FLAGS_audioports.c = -Os -mno-dual-issue $(XCC_FLAGS) -XCC_FLAGS_audioports.xc = -Os -mno-dual-issue $(XCC_FLAGS) - -# DFU -XCC_FLAGS_dfu.xc = -Os -mno-dual-issue $(XCC_FLAGS) -XCC_FLAGS_flash_interface.c = -Os -mno-dual-issue $(XCC_FLAGS) -XCC_FLAGS_flashlib_user.c = -Os -mno-dual-issue $(XCC_FLAGS) From f1ba1dace8595dfbb7e20e0fb788336373fd37e6 Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Tue, 13 Aug 2019 12:46:33 +0100 Subject: [PATCH 05/13] Bump version --- CHANGELOG.rst | 5 ++ lib_xua/module_build_info | 2 +- lib_xua/wscript | 109 -------------------------------------- 3 files changed, 6 insertions(+), 110 deletions(-) delete mode 100644 lib_xua/wscript diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1f871966..75003253 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ lib_xua Change Log ================== +0.3.0 +----- + + * CHANGED: Build files updated to support new "xcommon" behaviour in xwaf. + 0.2.0 ----- diff --git a/lib_xua/module_build_info b/lib_xua/module_build_info index c3221cf1..2935f960 100644 --- a/lib_xua/module_build_info +++ b/lib_xua/module_build_info @@ -1,4 +1,4 @@ -VERSION = 0.2.0 +VERSION = 0.3.0 DEPENDENT_MODULES = lib_logging(>=2.1.0) \ lib_xassert(>=2.0.0) \ diff --git a/lib_xua/wscript b/lib_xua/wscript deleted file mode 100644 index 76f039b3..00000000 --- a/lib_xua/wscript +++ /dev/null @@ -1,109 +0,0 @@ -import os.path - - -def create_list_from_make_flag(bld, list_of_flags): - for i, flag in enumerate(list_of_flags): - if flag.startswith('$('): - for f in bld.env[flag.strip('$()')]: - list_of_flags.insert(i, f) - i += 1 - list_of_flags.remove(flag) - return list_of_flags - - -def create_list_of_strings(whitespace_seperated_list): - list_of_strings = whitespace_seperated_list.split(' ') - for item in list_of_strings: - item = "'{}'".format(item) - return list_of_strings - - -def read_module_build_info(bld): - with open(os.path.join(bld.path.abspath(), 'module_build_info')) as file: - module_build_info = {} - for line in file.readlines(): - line = line.strip() - if line and not line.startswith('#'): - key, value = line.split('=', 1) - module_build_info[key.strip(' +')] = value.strip() - - try: - module_build_info['OPTIONAL_HEADERS'] = ( - create_list_of_strings(module_build_info['OPTIONAL_HEADERS'])) - except KeyError: - pass - - try: - module_build_info['DEPENDENT_MODULES'] = ( - create_list_of_strings(module_build_info['DEPENDENT_MODULES'])) - except KeyError: - pass - - try: - module_build_info['MODULE_XCC_FLAGS'] = ( - create_list_from_make_flag(bld, - create_list_of_strings(module_build_info['MODULE_XCC_FLAGS']))) - except KeyError: - pass - - try: - module_build_info['MODULE_XCC_XC_FLAGS'] = ( - create_list_from_make_flag(bld, - create_list_of_strings(module_build_info['MODULE_XCC_XC_FLAGS']))) - except KeyError: - pass - - try: - module_build_info['MODULE_XCC_C_FLAGS'] = ( - create_list_from_make_flag(bld, - create_list_of_strings(module_build_info['MODULE_XCC_C_FLAGS']))) - except KeyError: - pass - - try: - module_build_info['MODULE_XCC_CPP_FLAGS'] = ( - create_list_from_make_flag(bld, - create_list_of_strings(module_build_info['MODULE_XCC_CPP_FLAGS']))) - except KeyError: - pass - - try: - module_build_info['MODULE_XCC_ASM_FLAGS'] = ( - create_list_from_make_flag(bld, - create_list_of_strings(module_build_info['MODULE_XCC_ASM_FLAGS']))) - except KeyError: - pass - - try: - module_build_info['INCLUDE_DIRS'] = ( - create_list_of_strings(module_build_info['INCLUDE_DIRS'])) - except KeyError: - pass - - return module_build_info - - -def use_module(bld): - module_build_info = read_module_build_info(bld) - source = bld.path.ant_glob(['src/**/*.xc', 'src/**/*.c', 'src/**/*.S'], - excl=['**/descriptors_2.rst']) - bld.env.MODULE_XCC_FLAGS = module_build_info['MODULE_XCC_FLAGS'] - - # The following file specific flags are not automatically kept in sync with the module_build_info file - # Core - bld.env['XCC_FLAGS_endpoint0.c'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - bld.env['XCC_FLAGS_xua_ep0_uacreqs.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - bld.env['XCC_FLAGS_dbcalc.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - bld.env['XCC_FLAGS_audioports.c'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - bld.env['XCC_FLAGS_audioports.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - # DFU - bld.env['XCC_FLAGS_dfu.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - bld.env['XCC_FLAGS_flash_interface.c'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - bld.env['XCC_FLAGS_flashlib_user.c'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - - bld.module( - source=source, - depends_on=module_build_info['DEPENDENT_MODULES'], - includes=module_build_info['INCLUDE_DIRS'], - optional_headers=module_build_info['OPTIONAL_HEADERS'], - version=module_build_info['VERSION']) \ No newline at end of file From 8d3cc039f7896e90bd7c0f60a3b2f176c80bc7c6 Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Tue, 13 Aug 2019 15:04:41 +0100 Subject: [PATCH 06/13] Update dependency requirements --- CHANGELOG.rst | 6 ++++++ lib_xua/module_build_info | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 75003253..5e0532e6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,12 @@ lib_xua Change Log * CHANGED: Build files updated to support new "xcommon" behaviour in xwaf. + * Changes to dependencies: + + - lib_dsp: Added dependency 5.0.0 + + - lib_mic_array: Added dependency 4.0.0 + 0.2.0 ----- diff --git a/lib_xua/module_build_info b/lib_xua/module_build_info index 2935f960..2a96c9f5 100644 --- a/lib_xua/module_build_info +++ b/lib_xua/module_build_info @@ -1,10 +1,10 @@ VERSION = 0.3.0 -DEPENDENT_MODULES = lib_logging(>=2.1.0) \ - lib_xassert(>=2.0.0) \ - lib_xud(>=0.1.0) \ - lib_spdif(>=3.0.0) \ - lib_mic_array(>=3.2.0) +DEPENDENT_MODULES = lib_logging(>=3.0.0) \ + lib_xassert(>=4.0.0) \ + lib_xud(>=0.2.0) \ + lib_spdif(>=4.0.0) \ + lib_mic_array(>=4.0.0) MODULE_XCC_FLAGS = $(XCC_FLAGS) \ -O3 \ From a7a577acad6411f60ffef4331bbfe437b056753e Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Wed, 21 Aug 2019 18:37:07 +0100 Subject: [PATCH 07/13] Update cleanup call --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5e404793..044d9bfe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -133,7 +133,7 @@ pipeline { } post { cleanup { - cleanWs() + xcoreCleanSandbox() } } } From 244232d3e1c65b8ac01117883b3a3b77681af9f1 Mon Sep 17 00:00:00 2001 From: Oscar Bailey Date: Thu, 29 Aug 2019 10:01:03 +0100 Subject: [PATCH 08/13] Change view to lib_xua_xwaf_xcommon --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 044d9bfe..85251dcd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,8 @@ pipeline { agent none environment { REPO = 'lib_xua' - VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}" + VIEW = 'lib_xua_xwaf_xcommon' + //VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}" } triggers { /* Trigger this Pipeline on changes to the repos dependencies From eafcc89a6b9943c15a1bb57ad84a9dfcda5bf192 Mon Sep 17 00:00:00 2001 From: Oscar Bailey Date: Thu, 5 Sep 2019 15:52:51 +0100 Subject: [PATCH 09/13] Change XUA to use new mic array API --- lib_xua/src/core/pdm_mics/pdm_mic.xc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib_xua/src/core/pdm_mics/pdm_mic.xc b/lib_xua/src/core/pdm_mics/pdm_mic.xc index 2221d1f7..2bb37bff 100644 --- a/lib_xua/src/core/pdm_mics/pdm_mic.xc +++ b/lib_xua/src/core/pdm_mics/pdm_mic.xc @@ -88,7 +88,7 @@ void XUA_PdmBuffer(streaming chanend c_ds_output[2], chanend c_audio) fir_coefs[6] = g_third_stage_div_12_fir; //dcc = {MIC_ARRAY_MAX_FRAME_SIZE_LOG2, 1, 0, 0, decimationfactor, fir_coefs[decimationfactor/2], 0, 0, DECIMATOR_NO_FRAME_OVERLAP, 2}; - dcc.frame_size_log2 = MIC_ARRAY_MAX_FRAME_SIZE_LOG2; + dcc.len = MIC_ARRAY_MAX_FRAME_SIZE_LOG2; dcc.apply_dc_offset_removal = 1; dcc.index_bit_reversal = 0; dcc.windowing_function = null; @@ -107,6 +107,7 @@ void XUA_PdmBuffer(streaming chanend c_ds_output[2], chanend c_audio) dc[0].mic_gain_compensation[2]=0; dc[0].mic_gain_compensation[3]=0; dc[0].channel_count = 4; + dc[0].async_interface_enabled = 0; dc[1].dcc = &dcc; dc[1].data = mic_decimator_fir_data[4]; dc[1].mic_gain_compensation[0]=0; @@ -114,6 +115,7 @@ void XUA_PdmBuffer(streaming chanend c_ds_output[2], chanend c_audio) dc[1].mic_gain_compensation[2]=0; dc[1].mic_gain_compensation[3]=0; dc[1].channel_count = 4; + dc[0].async_interface_enabled = 0; mic_array_decimator_configure(c_ds_output, decimatorCount, dc); From a682ed7d19438478920f2621f53d4e17a84477be Mon Sep 17 00:00:00 2001 From: Oscar Bailey Date: Thu, 5 Sep 2019 16:03:31 +0100 Subject: [PATCH 10/13] Update copyright --- lib_xua/src/core/pdm_mics/pdm_mic.xc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_xua/src/core/pdm_mics/pdm_mic.xc b/lib_xua/src/core/pdm_mics/pdm_mic.xc index 2bb37bff..b853f2d0 100644 --- a/lib_xua/src/core/pdm_mics/pdm_mic.xc +++ b/lib_xua/src/core/pdm_mics/pdm_mic.xc @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2018, XMOS Ltd, All rights reserved +// Copyright (c) 2015-2019, XMOS Ltd, All rights reserved #include "xua.h" From 508c62af000d766fc66268ccb78b130d75ea1460 Mon Sep 17 00:00:00 2001 From: Oscar Bailey Date: Thu, 5 Sep 2019 16:34:59 +0100 Subject: [PATCH 11/13] Keep version on 0.2.0 --- CHANGELOG.rst | 16 +++++----------- lib_xua/module_build_info | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5e0532e6..a113f942 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,17 +1,6 @@ lib_xua Change Log ================== -0.3.0 ------ - - * CHANGED: Build files updated to support new "xcommon" behaviour in xwaf. - - * Changes to dependencies: - - - lib_dsp: Added dependency 5.0.0 - - - lib_mic_array: Added dependency 4.0.0 - 0.2.0 ----- @@ -24,6 +13,7 @@ lib_xua Change Log * CHANGE: Moved to lib_spdif (from module_spdif_tx & module_spdif_rx) * CHANGE: Define NUM_PDM_MICS renamed to XUA_NUM_PDM_MICS * CHANGE: Define NO_USB renamed to XUA_USB_EN + * CHANGE: Build files updated to support new "xcommon" behaviour in xwaf. * RESOLVED: wChannelConfig in UAC1 descriptor set according to output channel count * RESOLVED: Indexing of ADAT channel strings (#18059) @@ -35,6 +25,10 @@ lib_xua Change Log - lib_xassert: Added dependency 3.0.1 + - lib_dsp: Added dependency 5.0.0 + + - lib_mic_array: Added dependency 4.0.0 + 0.1.2 ----- diff --git a/lib_xua/module_build_info b/lib_xua/module_build_info index 2a96c9f5..ce383df3 100644 --- a/lib_xua/module_build_info +++ b/lib_xua/module_build_info @@ -1,4 +1,4 @@ -VERSION = 0.3.0 +VERSION = 0.2.0 DEPENDENT_MODULES = lib_logging(>=3.0.0) \ lib_xassert(>=4.0.0) \ From eb1ca1eb8d99ea06643766e4235ba5f9391c4d3b Mon Sep 17 00:00:00 2001 From: Oscar Bailey Date: Fri, 6 Sep 2019 09:13:09 +0100 Subject: [PATCH 12/13] Update CHANGELOG --- CHANGELOG.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a113f942..2a114f45 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -21,14 +21,14 @@ lib_xua Change Log * Changes to dependencies: - - lib_spdif: Added dependency 3.1.0 - - - lib_xassert: Added dependency 3.0.1 - - lib_dsp: Added dependency 5.0.0 - lib_mic_array: Added dependency 4.0.0 + - lib_spdif: Added dependency 3.1.0 + + - lib_xassert: Added dependency 3.0.1 + 0.1.2 ----- From a1aca010fb95d193506f846ac86c6ce808c37406 Mon Sep 17 00:00:00 2001 From: shuchitak <38428600+shuchitak@users.noreply.github.com> Date: Fri, 13 Sep 2019 10:20:23 +0100 Subject: [PATCH 13/13] Update Jenkinsfile --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 85251dcd..044d9bfe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,8 +6,7 @@ pipeline { agent none environment { REPO = 'lib_xua' - VIEW = 'lib_xua_xwaf_xcommon' - //VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}" + VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}" } triggers { /* Trigger this Pipeline on changes to the repos dependencies