forked from PAWPAW-Mirror/lib_xua
Merge from master and work to tidy PDM code for release
This commit is contained in:
@@ -1,13 +1,22 @@
|
|||||||
sc_usb_audio Change Log
|
sc_usb_audio Change Log
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
6.12.7
|
6.13.0
|
||||||
------
|
------
|
||||||
- ADDED: Device now uses implicit feedback when input stream is available (previously explicit
|
- ADDED: Device now uses implicit feedback when input stream is available (previously explicit
|
||||||
feedback pipe always used). This saves chanend/EP resources and means less processing
|
feedback pipe always used). This saves chanend/EP resources and means less processing
|
||||||
burden for the host. Previous behaviour available by enabling UAC_FORCE_FEEDBACK_EP
|
burden for the host. Previous behaviour available by enabling UAC_FORCE_FEEDBACK_EP
|
||||||
- CHANGE: Mixer and non-mixer channel comms scheme (decouple <-> audio path) now the identical
|
- RESOLVED: Exception when SPDIF_TX and ADAT_TX both enabled due to clock-block being configured
|
||||||
|
after already started. Caused by SPDIF_TX define check typo
|
||||||
|
- RESOLVED: DFU flag address changed to properly conform to memory address range allocated to
|
||||||
|
apps by tools
|
||||||
|
- RESOLVED: Build failure when DFU disabled
|
||||||
|
- RESOLVED: Build issue when I2S_CHANS_ADC/DAC set to 0 and CODEC_MASTER enabled
|
||||||
|
- RESOLVED: Typo in MCLK_441 checking for MIN_FREQ define
|
||||||
|
- CHANGE: Mixer and non-mixer channel comms scheme (decouple <-> audio path) now identical
|
||||||
|
- CHANGE: Input stream buffering modified such that during overflow older samples are removed
|
||||||
|
rather than ignoring most recent samples. Removes any chance of stale input packets
|
||||||
|
being sent to host.
|
||||||
|
|
||||||
6.12.6
|
6.12.6
|
||||||
------
|
------
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
USB Audio Shared
|
USB Audio Shared
|
||||||
................
|
................
|
||||||
|
|
||||||
:Latest release: 6.12.5rc0
|
:Latest release: 6.13.0beta1
|
||||||
: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.
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?><xproject><repository>sc_usb_audio</repository><partnum>XM-004720-SM</partnum></xproject>
|
<?xml version="1.0" encoding="UTF-8"?><xproject><repository>sc_usb_audio</repository><partnum>XM-004720-SM</partnum><version>6.13.0beta0</version></xproject>
|
||||||
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?><xproject><repository>sc_usb_audio</repository><partnum>XM-004720-SM</partnum></xproject>
|
<?xml version="1.0" encoding="UTF-8"?><xproject><repository>sc_usb_audio</repository><partnum>XM-004720-SM</partnum><version>6.13.0beta0</version></xproject>
|
||||||
@@ -11,4 +11,4 @@
|
|||||||
|
|
||||||
MODULE_XCC_XC_FLAGS = $(XCC_XC_FLAGS)
|
MODULE_XCC_XC_FLAGS = $(XCC_XC_FLAGS)
|
||||||
|
|
||||||
DEPENDENT_MODULES = module_xassert
|
DEPENDENT_MODULES = lib_xassert
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
@@ -46,6 +47,187 @@
|
|||||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||||
|
=======
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<?fileVersion 4.0.0?>
|
||||||
|
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
|
|
||||||
|
<cconfiguration id="com.xmos.cdt.toolchain.97674742">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.xmos.cdt.toolchain.97674742" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||||
|
<externalSettings />
|
||||||
|
<extensions>
|
||||||
|
<extension id="com.xmos.cdt.core.XEBinaryParser" point="org.eclipse.cdt.core.BinaryParser" />
|
||||||
|
<extension id="com.xmos.cdt.core.XdeErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||||
|
<buildTargets>
|
||||||
|
<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
|
<buildCommand>xmake</buildCommand>
|
||||||
|
<buildArguments> -f .makefile</buildArguments>
|
||||||
|
<buildTarget>all</buildTarget>
|
||||||
|
<stopOnError>true</stopOnError>
|
||||||
|
<useDefaultCommand>true</useDefaultCommand>
|
||||||
|
<runAllBuilders>true</runAllBuilders>
|
||||||
|
</target>
|
||||||
|
<target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
|
<buildCommand>xmake</buildCommand>
|
||||||
|
<buildArguments> -f .makefile</buildArguments>
|
||||||
|
<buildTarget>clean</buildTarget>
|
||||||
|
<stopOnError>true</stopOnError>
|
||||||
|
<useDefaultCommand>true</useDefaultCommand>
|
||||||
|
<runAllBuilders>true</runAllBuilders>
|
||||||
|
</target>
|
||||||
|
</buildTargets>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration buildProperties="" description="" id="com.xmos.cdt.toolchain.97674742" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||||
|
<folderInfo id="com.xmos.cdt.toolchain.97674742.1127281840" name="/" resourcePath="">
|
||||||
|
<toolChain id = "com.xmos.cdt.toolchain.57153879" name="com.xmos.cdt.toolchain" superClass="com.xmos.cdt.toolchain">
|
||||||
|
<targetPlatform archList="all" binaryParser="com.xmos.cdt.core.XEBinaryParser" id = "com.xmos.cdt.core.platform.66882026" isAbstract="false" osList="linux,win32,macosx" superClass="com.xmos.cdt.core.platform" />
|
||||||
|
<builder arguments=" -f .makefile" id = "com.xmos.cdt.builder.base.95623060" keepEnvironmentInBuildfile="false" managedBuildOn="false" superClass="com.xmos.cdt.builder.base">
|
||||||
|
<outputEntries>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH" kind="outputPath" name="bin" />
|
||||||
|
</outputEntries>
|
||||||
|
</builder>
|
||||||
|
<tool id = "com.xmos.cdt.xc.compiler.55196333" name="com.xmos.cdt.xc.compiler" superClass="com.xmos.cdt.xc.compiler">
|
||||||
|
<option id = "com.xmos.xc.compiler.option.defined.symbols.36159420" name="com.xmos.xc.compiler.option.defined.symbols" superClass="com.xmos.xc.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||||
|
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||||
|
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||||
|
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||||
|
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=11"/>
|
||||||
|
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||||
|
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1111"/>
|
||||||
|
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=11"/>
|
||||||
|
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__MCPP=2"/>
|
||||||
|
<listOptionValue builtIn="false" value="__XC__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||||
|
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||||
|
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||||
|
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||||
|
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||||
|
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||||
|
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||||
|
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||||
|
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||||
|
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||||
|
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||||
|
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||||
|
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||||
|
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__cplusplus=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__GNUG__=4"/>
|
||||||
|
<listOptionValue builtIn="false" value="__GXX_WEAK__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__DEPRECATED=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__EXCEPTIONS=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__WCHAR_UNSIGNED__=1"/>
|
||||||
|
</option>
|
||||||
|
<option id = "com.xmos.xc.compiler.option.include.paths.75459587" name="com.xmos.xc.compiler.option.include.paths" superClass="com.xmos.xc.compiler.option.include.paths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/audiostream}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/clocking}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/endpoint0}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/hostactive}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/locks}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/mixer}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/pdm_mics}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/pll}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/ports}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/powersave}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/usb_buffer}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/xuduser}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio}"' />
|
||||||
|
|
||||||
|
</option>
|
||||||
|
<inputType id = "com.xmos.cdt.xc.compiler.input.39988298" name="XC" superClass="com.xmos.cdt.xc.compiler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id = "com.xmos.cdt.c.compiler.50820960" name="com.xmos.cdt.c.compiler" superClass="com.xmos.cdt.c.compiler">
|
||||||
|
<option id = "com.xmos.c.compiler.option.defined.symbols.45893308" name="com.xmos.c.compiler.option.defined.symbols" superClass="com.xmos.c.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="__STDC_VERSION__=199901L"/>
|
||||||
|
>>>>>>> master
|
||||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=11"/>
|
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=11"/>
|
||||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||||
@@ -552,6 +734,7 @@
|
|||||||
<option id="com.xmos.c.compiler.option.include.paths.26873840" 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.26873840" name="com.xmos.c.compiler.option.include.paths" superClass="com.xmos.c.compiler.option.include.paths" valueType="includePath">
|
||||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||||
|
<<<<<<< HEAD
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/audiostream}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/audiostream}""/>
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/clocking}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/clocking}""/>
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/endpoint0}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/endpoint0}""/>
|
||||||
@@ -565,6 +748,22 @@
|
|||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/xuduser}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/xuduser}""/>
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio}""/>
|
||||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/clang""/>
|
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/clang""/>
|
||||||
|
=======
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/audiostream}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/clocking}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/endpoint0}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/hostactive}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/locks}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/mixer}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/pdm_mics}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/pll}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/ports}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/powersave}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/usb_buffer}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/xuduser}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio}"' />
|
||||||
|
|
||||||
|
>>>>>>> master
|
||||||
</option>
|
</option>
|
||||||
<inputType id="com.xmos.cdt.c.compiler.input.c.54425371" name="C" superClass="com.xmos.cdt.c.compiler.input.c"/>
|
<inputType id="com.xmos.cdt.c.compiler.input.c.54425371" name="C" superClass="com.xmos.cdt.c.compiler.input.c"/>
|
||||||
</tool>
|
</tool>
|
||||||
@@ -878,6 +1077,7 @@
|
|||||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/4.2.1""/>
|
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/4.2.1""/>
|
||||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/4.2.1/xcore-xmos-elf""/>
|
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/4.2.1/xcore-xmos-elf""/>
|
||||||
|
<<<<<<< HEAD
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/audiostream}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/audiostream}""/>
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/clocking}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/clocking}""/>
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/endpoint0}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio/endpoint0}""/>
|
||||||
@@ -892,6 +1092,22 @@
|
|||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/module_usb_audio}""/>
|
||||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/clang""/>
|
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/clang""/>
|
||||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/v1""/>
|
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/v1""/>
|
||||||
|
=======
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/audiostream}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/clocking}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/endpoint0}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/hostactive}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/locks}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/mixer}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/pdm_mics}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/pll}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/ports}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/powersave}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/usb_buffer}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio/xuduser}"' />
|
||||||
|
<listOptionValue builtIn="false" value='"${workspace_loc:/module_usb_audio}"' />
|
||||||
|
|
||||||
|
>>>>>>> master
|
||||||
</option>
|
</option>
|
||||||
<inputType id="com.xmos.cdt.cxx.compiler.input.cpp.46174429" name="C++" superClass="com.xmos.cdt.cxx.compiler.input.cpp"/>
|
<inputType id="com.xmos.cdt.cxx.compiler.input.cpp.46174429" name="C++" superClass="com.xmos.cdt.cxx.compiler.input.cpp"/>
|
||||||
</tool>
|
</tool>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?><xproject><repository>sc_usb_audio</repository><partnum>XM-004720-SM</partnum></xproject>
|
<?xml version="1.0" encoding="UTF-8"?><xproject><repository>sc_usb_audio</repository><partnum>XM-004720-SM</partnum><version>6.13.0beta0</version></xproject>
|
||||||
@@ -720,7 +720,7 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out,
|
|||||||
/* Manual IN instruction since compiler generates an extra setc per IN (bug #15256) */
|
/* Manual IN instruction since compiler generates an extra setc per IN (bug #15256) */
|
||||||
unsigned sample;
|
unsigned sample;
|
||||||
asm volatile("in %0, res[%1]" : "=r"(sample) : "r"(p_i2s_adc[index++]));
|
asm volatile("in %0, res[%1]" : "=r"(sample) : "r"(p_i2s_adc[index++]));
|
||||||
|
|
||||||
if(buffIndex)
|
if(buffIndex)
|
||||||
samplesIn_1[((frameCount-1)&(I2S_CHANS_PER_FRAME-1))+i] = bitrev(sample); // channels 1, 3, 5.. on each line.
|
samplesIn_1[((frameCount-1)&(I2S_CHANS_PER_FRAME-1))+i] = bitrev(sample); // channels 1, 3, 5.. on each line.
|
||||||
else
|
else
|
||||||
@@ -1013,7 +1013,7 @@ chanend ?c_config, chanend ?c
|
|||||||
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
|
#ifndef SPDIF_TX
|
||||||
start_clock(clk_mst_spd);
|
start_clock(clk_mst_spd);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -465,14 +465,14 @@
|
|||||||
* @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_M
|
#ifndef BCD_DEVICE_M
|
||||||
#define BCD_DEVICE_M 12
|
#define BCD_DEVICE_M 13
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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 5
|
#define BCD_DEVICE_N 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1417,10 +1417,10 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
|
|||||||
/* Type 1 Format Type Descriptor */
|
/* Type 1 Format Type Descriptor */
|
||||||
.Audio_Out_Format =
|
.Audio_Out_Format =
|
||||||
{
|
{
|
||||||
.bLength = 0x06,
|
.bLength = 0x06,
|
||||||
.bDescriptorType = UAC_CS_DESCTYPE_INTERFACE,
|
.bDescriptorType = UAC_CS_DESCTYPE_INTERFACE,
|
||||||
.bDescriptorSubtype = UAC_CS_AS_INTERFACE_SUBTYPE_FORMAT_TYPE,
|
.bDescriptorSubtype = UAC_CS_AS_INTERFACE_SUBTYPE_FORMAT_TYPE,
|
||||||
.bFormatType = UAC_FORMAT_TYPE_I,
|
.bFormatType = UAC_FORMAT_TYPE_I,
|
||||||
.bSubslotSize = HS_STREAM_FORMAT_OUTPUT_1_SUBSLOT_BYTES,
|
.bSubslotSize = HS_STREAM_FORMAT_OUTPUT_1_SUBSLOT_BYTES,
|
||||||
.bBitResolution = HS_STREAM_FORMAT_OUTPUT_1_RESOLUTION_BITS,
|
.bBitResolution = HS_STREAM_FORMAT_OUTPUT_1_RESOLUTION_BITS,
|
||||||
},
|
},
|
||||||
@@ -1430,7 +1430,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
|
|||||||
{
|
{
|
||||||
.bLength = sizeof(USB_Descriptor_Endpoint_t),
|
.bLength = sizeof(USB_Descriptor_Endpoint_t),
|
||||||
.bDescriptorType = USB_DESCTYPE_ENDPOINT,
|
.bDescriptorType = USB_DESCTYPE_ENDPOINT,
|
||||||
.bEndpointAddress = ENDPOINT_ADDRESS_OUT_AUDIO,
|
.bEndpointAddress = ENDPOINT_ADDRESS_OUT_AUDIO,
|
||||||
.bmAttributes = 0x05, /* (bitmap) */
|
.bmAttributes = 0x05, /* (bitmap) */
|
||||||
.wMaxPacketSize = HS_STREAM_FORMAT_OUTPUT_1_MAXPACKETSIZE,
|
.wMaxPacketSize = HS_STREAM_FORMAT_OUTPUT_1_MAXPACKETSIZE,
|
||||||
.bInterval = 1,
|
.bInterval = 1,
|
||||||
@@ -1451,11 +1451,11 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
|
|||||||
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
|
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
|
||||||
.Audio_Out_Fb_Endpoint =
|
.Audio_Out_Fb_Endpoint =
|
||||||
{
|
{
|
||||||
.bLength = 0x07,
|
.bLength = 0x07,
|
||||||
.bDescriptorType = USB_DESCTYPE_ENDPOINT,
|
.bDescriptorType = USB_DESCTYPE_ENDPOINT,
|
||||||
.bEndpointAddress = ENDPOINT_ADDRESS_IN_FEEDBACK,
|
.bEndpointAddress = ENDPOINT_ADDRESS_IN_FEEDBACK,
|
||||||
.bmAttributes = 17, /* (bitmap) */
|
.bmAttributes = 17, /* (bitmap) */
|
||||||
.wMaxPacketSize = 0x0004,
|
.wMaxPacketSize = 0x0004,
|
||||||
.bInterval = 4, /* Only values <= 1 frame (4) supported by MS */
|
.bInterval = 4, /* Only values <= 1 frame (4) supported by MS */
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
@@ -1616,7 +1616,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
|
|||||||
.wMaxPacketSize = 0x0004,
|
.wMaxPacketSize = 0x0004,
|
||||||
.bInterval = 4, /* Only values <= 1 frame (4) supported by MS */
|
.bInterval = 4, /* Only values <= 1 frame (4) supported by MS */
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
#endif /* OUTPUT_FORMAT_COUNT > 2 */
|
#endif /* OUTPUT_FORMAT_COUNT > 2 */
|
||||||
#endif /* OUTPUT */
|
#endif /* OUTPUT */
|
||||||
#if (NUM_USB_CHAN_IN > 0)
|
#if (NUM_USB_CHAN_IN > 0)
|
||||||
|
|||||||
@@ -586,7 +586,7 @@ void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl,
|
|||||||
* - Audio STREAMING interface request (In or Out)
|
* - Audio STREAMING interface request (In or Out)
|
||||||
* - Audio endpoint request (Audio 1.0 Sampling freq requests are sent to the endpoint)
|
* - Audio endpoint request (Audio 1.0 Sampling freq requests are sent to the endpoint)
|
||||||
*/
|
*/
|
||||||
if(((interfaceNum == 0) || (interfaceNum == 1) || (interfaceNum == 2))
|
if(((interfaceNum == 0) || (interfaceNum == 1) || (interfaceNum == 2))
|
||||||
#ifdef DFU
|
#ifdef DFU
|
||||||
&& !DFU_mode_active
|
&& !DFU_mode_active
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -362,10 +362,10 @@ static void mixer1(chanend c_host, chanend c_mix_ctl, chanend c_mixer2)
|
|||||||
/* Request from audio()/mixer2() */
|
/* Request from audio()/mixer2() */
|
||||||
request = inuint(c_mixer2);
|
request = inuint(c_mixer2);
|
||||||
|
|
||||||
|
|
||||||
/* Forward on Request for data to decouple thread */
|
/* Forward on Request for data to decouple thread */
|
||||||
outuint(c_host, request);
|
outuint(c_host, request);
|
||||||
|
|
||||||
/* Between request to decouple and respose ~ 400nS latency for interrupt to fire */
|
/* Between request to decouple and respose ~ 400nS latency for interrupt to fire */
|
||||||
select
|
select
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,287 +24,54 @@ in port p_mclk = PORT_PDM_MCLK;
|
|||||||
clock mclk = on tile[PDM_TILE]: XS1_CLKBLK_1;
|
clock mclk = on tile[PDM_TILE]: XS1_CLKBLK_1;
|
||||||
clock pdmclk = on tile[PDM_TILE]: XS1_CLKBLK_3;
|
clock pdmclk = on tile[PDM_TILE]: XS1_CLKBLK_3;
|
||||||
|
|
||||||
|
void user_pdm_process(frame_audio *audio)
|
||||||
on tile[0]:p_leds leds = DEFAULT_INIT;
|
|
||||||
|
|
||||||
// Buttons
|
|
||||||
in port p_buttons = on tile[0]: XS1_PORT_4A;
|
|
||||||
|
|
||||||
enum buttons
|
|
||||||
{
|
{
|
||||||
BUTTON_A=1<<0,
|
static unsigned gain = 8*4096*8;
|
||||||
BUTTON_B=1<<1,
|
|
||||||
BUTTON_C=1<<2,
|
|
||||||
BUTTON_D=1<<3
|
|
||||||
};
|
|
||||||
|
|
||||||
|
for(unsigned i=0;i<7;i++)
|
||||||
static const one_meter_thirty_degrees[6] = {0, 3, 8, 11, 8, 3};
|
{
|
||||||
|
unsigned output = audio->data[i][0];
|
||||||
|
audio->data[i][0] = ((uint64_t)output*gain)>>8;
|
||||||
|
|
||||||
static void set_dir(client interface led_button_if lb, unsigned dir, unsigned delay[]){
|
|
||||||
|
|
||||||
for(unsigned i=0;i<13;i++)
|
|
||||||
lb.set_led_brightness(i, 0);
|
|
||||||
delay[0] = 5;
|
|
||||||
for(unsigned i=0;i<6;i++)
|
|
||||||
delay[i+1] = one_meter_thirty_degrees[(i - dir + 3 +6)%6];
|
|
||||||
|
|
||||||
switch(dir){
|
|
||||||
case 0:{
|
|
||||||
lb.set_led_brightness(0, 255);
|
|
||||||
lb.set_led_brightness(1, 255);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1:{
|
|
||||||
lb.set_led_brightness(2, 255);
|
|
||||||
lb.set_led_brightness(3, 255);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2:{
|
|
||||||
lb.set_led_brightness(4, 255);
|
|
||||||
lb.set_led_brightness(5, 255);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 3:{
|
|
||||||
lb.set_led_brightness(6, 255);
|
|
||||||
lb.set_led_brightness(7, 255);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 4:{
|
|
||||||
lb.set_led_brightness(8, 255);
|
|
||||||
lb.set_led_brightness(9, 255);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 5:{
|
|
||||||
lb.set_led_brightness(10, 255);
|
|
||||||
lb.set_led_brightness(11, 255);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void lores_DAS_fixed(streaming chanend c_ds_output_0, streaming chanend c_ds_output_1,
|
void pdm_process(streaming chanend c_ds_output_0, streaming chanend c_ds_output_1, chanend c_audio)
|
||||||
client interface led_button_if lb, chanend c_audio)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
unsigned buffer = 1; //buffer index
|
unsigned buffer = 1; //buffer index
|
||||||
frame_audio audio[2]; //double buffered
|
frame_audio audio[2]; //double buffered
|
||||||
memset(audio, sizeof(frame_audio), 0);
|
memset(audio, sizeof(frame_audio), 0);
|
||||||
|
|
||||||
int omni = 0;
|
decimator_init_audio_frame(c_ds_output_0, c_ds_output_1, buffer, audio);
|
||||||
|
|
||||||
#define MAX_DELAY 128
|
|
||||||
|
|
||||||
unsigned gain = 4096;
|
|
||||||
#ifdef FORM_BEAM
|
|
||||||
unsigned delay[7] = {0, 0, 0, 0, 0, 0, 0};
|
|
||||||
int delay_buffer[MAX_DELAY][7];
|
|
||||||
memset(delay_buffer, sizeof(int)*8*8, 0);
|
|
||||||
unsigned delay_head = 0;
|
|
||||||
unsigned dir = 0;
|
|
||||||
set_dir(lb, dir, delay);
|
|
||||||
#else
|
|
||||||
int summed = 0;
|
|
||||||
|
|
||||||
/* Light center LED, kill other LEDs */
|
|
||||||
for(unsigned i=0;i<13;i++)
|
|
||||||
lb.set_led_brightness(i, 0);
|
|
||||||
|
|
||||||
lb.set_led_brightness(12, 255);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
c_ds_output_0 <: (frame_audio * unsafe)audio[0].data[0];
|
while(1)
|
||||||
c_ds_output_1 <: (frame_audio * unsafe)audio[0].data[4];
|
{
|
||||||
|
frame_audio * current = decimator_get_next_audio_frame(c_ds_output_0, c_ds_output_1, buffer, audio);
|
||||||
|
|
||||||
while(1){
|
user_pdm_process(current);
|
||||||
|
|
||||||
schkct(c_ds_output_0, 8);
|
|
||||||
schkct(c_ds_output_1, 8);
|
|
||||||
|
|
||||||
c_ds_output_0 <: (frame_audio * unsafe)audio[buffer].data[0];
|
|
||||||
c_ds_output_1 <: (frame_audio * unsafe)audio[buffer].data[4];
|
|
||||||
|
|
||||||
buffer = 1 - buffer;
|
|
||||||
|
|
||||||
#ifdef FORM_BEAM
|
|
||||||
|
|
||||||
//copy the current sample to the delay buffer
|
|
||||||
for(unsigned i=0;i<7;i++)
|
|
||||||
delay_buffer[delay_head][i] = audio[buffer].data[i][0];
|
|
||||||
|
|
||||||
//light the LED for the current direction
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
int t;
|
|
||||||
|
|
||||||
select {
|
|
||||||
case lb.button_event():{
|
|
||||||
unsigned button;
|
|
||||||
e_button_state pressed;
|
|
||||||
lb.get_button_event(button, pressed);
|
|
||||||
if(pressed == BUTTON_PRESSED){
|
|
||||||
switch(button){
|
|
||||||
case 0:{
|
|
||||||
|
|
||||||
#ifdef FORM_BEAM
|
|
||||||
printf("beamed\n");
|
|
||||||
if(omni)
|
|
||||||
{
|
|
||||||
omni = 0;
|
|
||||||
lb.set_led_brightness(12, 0);
|
|
||||||
set_dir(lb, dir, delay);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dir--;
|
|
||||||
if(dir == -1)
|
|
||||||
dir = 5;
|
|
||||||
set_dir(lb, dir, delay);
|
|
||||||
printf("dir %d\n", dir+1);
|
|
||||||
for(unsigned i=0;i<7;i++)
|
|
||||||
printf("delay[%d] = %d\n", i, delay[i]);
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
summed = !summed;
|
|
||||||
|
|
||||||
if(summed)
|
|
||||||
{
|
|
||||||
for(unsigned i=0; i < 13; i++)
|
|
||||||
lb.set_led_brightness(i, 255);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for(unsigned i=0;i<13;i++)
|
|
||||||
lb.set_led_brightness(i, 0);
|
|
||||||
|
|
||||||
lb.set_led_brightness(12, 255);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1:{
|
|
||||||
gain = ((gain<<3) + gain)>>3;
|
|
||||||
printf("gain: %d\n", gain);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2:{
|
|
||||||
gain = ((gain<<3) - gain)>>3;
|
|
||||||
printf("gain: %d\n", gain);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 3:{
|
|
||||||
#ifdef FORM_BEAM
|
|
||||||
lb.set_led_brightness(12, 255);
|
|
||||||
|
|
||||||
for(unsigned i=0;i<12;i++)
|
|
||||||
lb.set_led_brightness(i, 0);
|
|
||||||
#if 0
|
|
||||||
dir++;
|
|
||||||
if(dir == 6)
|
|
||||||
dir = 0;
|
|
||||||
set_dir(lb, dir, delay);
|
|
||||||
printf("dir %d\n", dir+1);
|
|
||||||
for(unsigned i=0;i<7;i++)
|
|
||||||
printf("delay[%d] = %d\n", i, delay[i]);
|
|
||||||
printf("\n");
|
|
||||||
#endif
|
|
||||||
printf("omni\n");
|
|
||||||
omni = 1;
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:break;
|
|
||||||
}
|
|
||||||
int output = 0;
|
|
||||||
|
|
||||||
#ifdef FORM_BEAM
|
|
||||||
if(!omni)
|
|
||||||
{
|
|
||||||
/* Do the sum of the delayed mics */
|
|
||||||
for(unsigned i=0;i<7;i++)
|
|
||||||
output += delay_buffer[(delay_head - delay[i])%MAX_DELAY][i];
|
|
||||||
|
|
||||||
output = ((uint64_t)output*gain)>>8;
|
|
||||||
|
|
||||||
c_audio <: output;
|
|
||||||
|
|
||||||
/* Send out the individual mics */
|
/* Send out the individual mics */
|
||||||
for(unsigned i=0;i<7;i++)
|
for(unsigned i=0;i<7;i++)
|
||||||
{
|
|
||||||
/* Apply gain and output samples */
|
|
||||||
output = audio[buffer].data[i][0];
|
|
||||||
output = ((uint64_t)output*gain)>>8;
|
|
||||||
c_audio <: output;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
/* Send out Mic[0] 8 times */
|
unsigned output = current->data[i][0];
|
||||||
output = audio[buffer].data[0][0];
|
|
||||||
output <<=2;
|
|
||||||
|
|
||||||
output = ((uint64_t)output*gain)>>8;
|
|
||||||
|
|
||||||
for(unsigned i=0;i<8;i++)
|
|
||||||
c_audio <: output;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if(summed)
|
|
||||||
{
|
|
||||||
/* Output summed */
|
|
||||||
for(unsigned i=0;i<7;i++)
|
|
||||||
output += audio[buffer].data[i][0];
|
|
||||||
|
|
||||||
output = ((uint64_t)output*gain)>>8;
|
|
||||||
c_audio <: output;
|
c_audio <: output;
|
||||||
|
|
||||||
/* Apply gain to all mics and send */
|
|
||||||
for(unsigned i=0;i<7;i++)
|
|
||||||
{
|
|
||||||
output = audio[buffer].data[i][0];
|
|
||||||
output = ((uint64_t)output*gain)>>8;
|
|
||||||
c_audio <: output;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
c_audio <: 0;
|
||||||
{
|
|
||||||
/* Send mic 0 out 8 times */
|
|
||||||
for(unsigned i=0;i<8;i++)
|
|
||||||
{
|
|
||||||
/* Apply gain and output samples */
|
|
||||||
output = audio[buffer].data[0][0];
|
|
||||||
output = ((uint64_t)output*gain)>>8;
|
|
||||||
c_audio <: output<<2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FORM_BEAM
|
|
||||||
delay_head++;
|
|
||||||
delay_head%=MAX_DELAY;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define DF 1
|
||||||
|
|
||||||
|
#define OUTPUT_SAMPLE_RATE (48000/DF)
|
||||||
|
#define MASTER_CLOCK_FREQUENCY 24576000
|
||||||
|
|
||||||
//TODO make these not global
|
//TODO make these not global
|
||||||
int data_0[8*COEFS_PER_PHASE] = {0};
|
int data_0[4*COEFS_PER_PHASE*DF] = {0};
|
||||||
int data_1[8*COEFS_PER_PHASE] = {0};
|
int data_1[4*COEFS_PER_PHASE*DF] = {0};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void pcm_pdm_mic(chanend c_pcm_out)
|
void pcm_pdm_mic(chanend c_pcm_out)
|
||||||
{
|
{
|
||||||
@@ -312,8 +79,6 @@ void pcm_pdm_mic(chanend c_pcm_out)
|
|||||||
streaming chan c_ds_output_0, c_ds_output_1;
|
streaming chan c_ds_output_0, c_ds_output_1;
|
||||||
streaming chan c_buffer_mic0, c_buffer_mic1;
|
streaming chan c_buffer_mic0, c_buffer_mic1;
|
||||||
|
|
||||||
interface led_button_if lb;
|
|
||||||
|
|
||||||
configure_clock_src(mclk, p_mclk);
|
configure_clock_src(mclk, p_mclk);
|
||||||
configure_clock_src_divide(pdmclk, p_mclk, 2);
|
configure_clock_src_divide(pdmclk, p_mclk, 2);
|
||||||
configure_port_clock_output(p_pdm_clk, pdmclk);
|
configure_port_clock_output(p_pdm_clk, pdmclk);
|
||||||
@@ -323,17 +88,15 @@ void pcm_pdm_mic(chanend c_pcm_out)
|
|||||||
|
|
||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
const int * unsafe p[1] = {fir_1_coefs[0]};
|
decimator_config dc0 = {FRAME_SIZE_LOG2, 1, 0, 0, DF, FIR_LUT(DF), data_0, 0, {0,0, 0, 0}};
|
||||||
decimator_config dc0 = {0, 1, 0, 0, 1, p, data_0, 0, {0,0, 0, 0}};
|
decimator_config dc1 = {FRAME_SIZE_LOG2, 1, 0, 0, DF, FIR_LUT(DF), data_1, 0, {0,0, 0, 0}};
|
||||||
decimator_config dc1 = {0, 1, 0, 0, 1, p, data_1, 0, {0,0, 0, 0}};
|
|
||||||
|
|
||||||
par
|
par
|
||||||
{
|
{
|
||||||
button_and_led_server(lb, leds, p_buttons);
|
|
||||||
pdm_rx(p_pdm_mics, c_4x_pdm_mic_0, c_4x_pdm_mic_1);
|
pdm_rx(p_pdm_mics, c_4x_pdm_mic_0, c_4x_pdm_mic_1);
|
||||||
decimate_to_pcm_4ch(c_4x_pdm_mic_0, c_ds_output_0, dc0);
|
decimate_to_pcm_4ch(c_4x_pdm_mic_0, c_ds_output_0, dc0);
|
||||||
decimate_to_pcm_4ch(c_4x_pdm_mic_1, c_ds_output_1, dc1);
|
decimate_to_pcm_4ch(c_4x_pdm_mic_1, c_ds_output_1, dc1);
|
||||||
lores_DAS_fixed(c_ds_output_0, c_ds_output_1, lb, c_pcm_out);
|
pdm_process(c_ds_output_0, c_ds_output_1, c_pcm_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ xc_ptr g_aud_to_host_dptr;
|
|||||||
xc_ptr g_aud_to_host_rdptr;
|
xc_ptr g_aud_to_host_rdptr;
|
||||||
xc_ptr g_aud_to_host_zeros;
|
xc_ptr g_aud_to_host_zeros;
|
||||||
int sampsToWrite = DEFAULT_FREQ/8000; /* HS assumed here. Expect to be junked during a overflow before stream start */
|
int sampsToWrite = DEFAULT_FREQ/8000; /* HS assumed here. Expect to be junked during a overflow before stream start */
|
||||||
int totalSampsToWrite = DEFAULT_FREQ/8000;
|
int totalSampsToWrite = DEFAULT_FREQ/8000;
|
||||||
int aud_data_remaining_to_device = 0;
|
int aud_data_remaining_to_device = 0;
|
||||||
|
|
||||||
/* Audio over/under flow flags */
|
/* Audio over/under flow flags */
|
||||||
@@ -436,7 +436,7 @@ __builtin_unreachable();
|
|||||||
|
|
||||||
/* Round up to nearest word - note, not needed for slotsize == 4! */
|
/* Round up to nearest word - note, not needed for slotsize == 4! */
|
||||||
datasize = (datasize+3) & (~0x3);
|
datasize = (datasize+3) & (~0x3);
|
||||||
|
|
||||||
/* Move wr ptr on by old packet length */
|
/* Move wr ptr on by old packet length */
|
||||||
g_aud_to_host_wrptr += 4+datasize;
|
g_aud_to_host_wrptr += 4+datasize;
|
||||||
|
|
||||||
@@ -447,10 +447,10 @@ __builtin_unreachable();
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_aud_to_host_dptr = g_aud_to_host_wrptr + 4;
|
g_aud_to_host_dptr = g_aud_to_host_wrptr + 4;
|
||||||
|
|
||||||
/* Now calculate new packet length...
|
/* Now calculate new packet length...
|
||||||
* First get feedback val (ideally this would be syncronised)
|
* First get feedback val (ideally this would be syncronised)
|
||||||
* Note, if customer hasn't applied a valid MCLK this could go to 0
|
* Note, if customer hasn't applied a valid MCLK this could go to 0
|
||||||
* we need to handle this gracefully */
|
* we need to handle this gracefully */
|
||||||
asm volatile("ldw %0, dp[g_speed]" : "=r" (speed) :);
|
asm volatile("ldw %0, dp[g_speed]" : "=r" (speed) :);
|
||||||
|
|
||||||
@@ -475,36 +475,36 @@ __builtin_unreachable();
|
|||||||
space_left = aud_to_host_fifo_end - g_aud_to_host_wrptr;
|
space_left = aud_to_host_fifo_end - g_aud_to_host_wrptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if((space_left > 0) && (space_left < (totalSampsToWrite * g_numUsbChan_In * g_curSubSlot_In + 4)))
|
//if((space_left > 0) && (space_left < (totalSampsToWrite * g_numUsbChan_In * g_curSubSlot_In + 4)))
|
||||||
if((space_left < (totalSampsToWrite * g_numUsbChan_In * g_curSubSlot_In + 4)))
|
if((space_left < (totalSampsToWrite * g_numUsbChan_In * g_curSubSlot_In + 4)))
|
||||||
{
|
{
|
||||||
/* In pipe has filled its buffer - we need to overflow
|
/* In pipe has filled its buffer - we need to overflow
|
||||||
* Accept the packet, and throw away the oldest in the buffer */
|
* Accept the packet, and throw away the oldest in the buffer */
|
||||||
|
|
||||||
/* Keep throwing away packets until buffer is at a nice level.. */
|
/* Keep throwing away packets until buffer is at a nice level.. */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
unsigned rdPtr;
|
unsigned rdPtr;
|
||||||
|
|
||||||
/* Read length of packet in buffer at read pointer */
|
/* Read length of packet in buffer at read pointer */
|
||||||
unsigned datalength;
|
unsigned datalength;
|
||||||
|
|
||||||
GET_SHARED_GLOBAL(rdPtr, g_aud_to_host_rdptr);
|
GET_SHARED_GLOBAL(rdPtr, g_aud_to_host_rdptr);
|
||||||
asm volatile("ldw %0, %1[0]":"=r"(datalength):"r"(rdPtr));
|
asm volatile("ldw %0, %1[0]":"=r"(datalength):"r"(rdPtr));
|
||||||
|
|
||||||
/* Round up datalength */
|
/* Round up datalength */
|
||||||
datalength = ((datalength+3) & ~0x3) + 4;
|
datalength = ((datalength+3) & ~0x3) + 4;
|
||||||
|
|
||||||
/* Move read pointer on by length */
|
/* Move read pointer on by length */
|
||||||
rdPtr += datalength;
|
rdPtr += datalength;
|
||||||
if (rdPtr >= aud_to_host_fifo_end)
|
if (rdPtr >= aud_to_host_fifo_end)
|
||||||
{
|
{
|
||||||
rdPtr = aud_to_host_fifo_start;
|
rdPtr = aud_to_host_fifo_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
space_left += datalength;
|
space_left += datalength;
|
||||||
SET_SHARED_GLOBAL(g_aud_to_host_rdptr, rdPtr);
|
SET_SHARED_GLOBAL(g_aud_to_host_rdptr, rdPtr);
|
||||||
|
|
||||||
} while(space_left < (BUFF_SIZE_IN*4/2));
|
} while(space_left < (BUFF_SIZE_IN*4/2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -556,7 +556,7 @@ static inline void SetupZerosSendBuffer(XUD_ep aud_to_host_usb_ep, unsigned samp
|
|||||||
/* Set IN stream packet size to something sensible. We expect the buffer to
|
/* Set IN stream packet size to something sensible. We expect the buffer to
|
||||||
* over flow and this to be reset */
|
* over flow and this to be reset */
|
||||||
SET_SHARED_GLOBAL(sampsToWrite, 0);
|
SET_SHARED_GLOBAL(sampsToWrite, 0);
|
||||||
SET_SHARED_GLOBAL(totalSampsToWrite, 0);
|
SET_SHARED_GLOBAL(totalSampsToWrite, 0);
|
||||||
|
|
||||||
mid *= g_numUsbChan_In * slotSize;
|
mid *= g_numUsbChan_In * slotSize;
|
||||||
|
|
||||||
@@ -564,7 +564,7 @@ static inline void SetupZerosSendBuffer(XUD_ep aud_to_host_usb_ep, unsigned samp
|
|||||||
|
|
||||||
/* Mark EP ready with the zero buffer. Note this will simply update the packet size
|
/* Mark EP ready with the zero buffer. Note this will simply update the packet size
|
||||||
* if it is already ready */
|
* if it is already ready */
|
||||||
|
|
||||||
/* g_aud_to_host_buffer is already set to g_aud_to_host_zeros */
|
/* g_aud_to_host_buffer is already set to g_aud_to_host_zeros */
|
||||||
|
|
||||||
GET_SHARED_GLOBAL(p, g_aud_to_host_buffer);
|
GET_SHARED_GLOBAL(p, g_aud_to_host_buffer);
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ unsigned char fb_clocks[16];
|
|||||||
* @param c_aud_fb chanend for feeback to xud
|
* @param c_aud_fb chanend for feeback to xud
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
void buffer(register chanend c_aud_out, register chanend c_aud_in,
|
void buffer(register chanend c_aud_out, register chanend c_aud_in,
|
||||||
#if (NUM_USB_CHAN_IN == 0) || defined (UAC_FORCE_FEEDBACK_EP)
|
#if (NUM_USB_CHAN_IN == 0) || defined (UAC_FORCE_FEEDBACK_EP)
|
||||||
chanend c_aud_fb,
|
chanend c_aud_fb,
|
||||||
#endif
|
#endif
|
||||||
@@ -322,7 +322,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in,
|
|||||||
int min, mid, max;
|
int min, mid, max;
|
||||||
GetADCCounts(sampleFreq, min, mid, max);
|
GetADCCounts(sampleFreq, min, mid, max);
|
||||||
g_speed = mid<<16;
|
g_speed = mid<<16;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/* Ideally we want to wait for handshake (and pass back up) here. But we cannot keep this
|
/* Ideally we want to wait for handshake (and pass back up) here. But we cannot keep this
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?><xproject><repository>sc_usb_audio</repository><partnum>XM-004720-SM</partnum></xproject>
|
<?xml version="1.0" encoding="UTF-8"?><xproject><repository>sc_usb_audio</repository><partnum>XM-004720-SM</partnum><version>6.13.0beta0</version></xproject>
|
||||||
6
xpd.xml
6
xpd.xml
@@ -17,7 +17,7 @@
|
|||||||
<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 repo = "git://github.com/xcore/sc_util" version = "1.0.5">module_xassert</componentDependency>
|
<componentDependency repo = "git://github.com/xcore/sc_util" version = "1.0.5">module_xassert</componentDependency>
|
||||||
<componentDependency version = "6.12.4">module_queue</componentDependency>
|
<componentDependency version = "6.13.0">module_queue</componentDependency>
|
||||||
<keyword>MIDI</keyword>
|
<keyword>MIDI</keyword>
|
||||||
</component>
|
</component>
|
||||||
</components>
|
</components>
|
||||||
@@ -98,7 +98,9 @@
|
|||||||
<release parenthash = "2b8419d7fb9e95d87484ff96f6a4024b7fadbf85" version = "6.12.3rc3" githash = "85383c7463baada50b9ee80706508a58d5e511c5"></release>
|
<release parenthash = "2b8419d7fb9e95d87484ff96f6a4024b7fadbf85" version = "6.12.3rc3" githash = "85383c7463baada50b9ee80706508a58d5e511c5"></release>
|
||||||
<release parenthash = "381e480cbc7385d32a5f003517ce8608e653c270" version = "6.12.4rc0" githash = "31b6b1f7f41584707a0ed761f03b80c28669af10"></release>
|
<release parenthash = "381e480cbc7385d32a5f003517ce8608e653c270" version = "6.12.4rc0" githash = "31b6b1f7f41584707a0ed761f03b80c28669af10"></release>
|
||||||
<release parenthash = "f7af9f6132d619d7858ab16c728309f013f8472c" version = "6.12.4rc1" githash = "7f644a433a6ad3a2e323e4ae42ad0bfe7487090f"></release>
|
<release parenthash = "f7af9f6132d619d7858ab16c728309f013f8472c" version = "6.12.4rc1" githash = "7f644a433a6ad3a2e323e4ae42ad0bfe7487090f"></release>
|
||||||
<release parenthash = "ace38607b0adc325167d1eddab8c425e721451f1" version = "6.12.5rc0"></release>
|
<release parenthash = "ace38607b0adc325167d1eddab8c425e721451f1" version = "6.12.5rc0" githash = "23758e74f2ce9970b113e05084453c9596450622"></release>
|
||||||
|
<release parenthash = "9344178fcc4dc9da49e08ae049dd3a933b8202a8" version = "6.13.0beta0" githash = "c53447546e337a40da0bc64238d80666b35b7336"></release>
|
||||||
|
<release parenthash = "c53447546e337a40da0bc64238d80666b35b7336" version = "6.13.0beta1"></release>
|
||||||
<subpartnumber>XM-004720-SM</subpartnumber>
|
<subpartnumber>XM-004720-SM</subpartnumber>
|
||||||
<vendor>XMOS</vendor>
|
<vendor>XMOS</vendor>
|
||||||
<version_defines>
|
<version_defines>
|
||||||
|
|||||||
Reference in New Issue
Block a user