diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 32bca934..7891f62e 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -3,21 +3,22 @@ sc_usb_audio Change Log
6.14.0
------
- - ADDED: Support for the use and integration of PDM microphones (including PDM to PCM
- conversion) via lib_mic_array
- - ADDED: Support for various "low" sample rates (i.e. < 44100) into UAC2 sample rate list
- and UAC1 descriptors
- ADDED: Support for for master-clock/sample-rate divides that are not a power of 2
(i.e. 32kHz from 24.567MHz)
- ADDED: Extended available sample-rate/master-clock ratios. Previous restriction was <=
512x (i.e. could not support 1024x and above e.g. 49.152MHz MCLK for Sample Rates
below 96kHz) (#13893)
+ - ADDED: Support for various "low" sample rates (i.e. < 44100) into UAC 2.0 sample rate
+ list and UAC 1.0 descriptors
+ - ADDED: Support for the use and integration of PDM microphones (including PDM to PCM
+ conversion) via lib_mic_array
- RESOLVED: MIDI data not accepted after "sleep" in OSX 10.11 (El Capitan) - related to sc_xud
- bug #17092
- - CHANGE: Asynchronous feedback system re-implemented to allow the previous two changelog
- items
+ issue #17092
+ - CHANGE: Asynchronous feedback system re-implemented to allow for the first two ADDED
+ changelog items
- CHANGE: Hardware divider used to generate bit-clock from master clock (xCORE-200 only).
Allows easy support for greater number of master-clock to sample-rate ratios.
+ - CHANGE: module_queue no longer uses any assert module/lib
6.13.0
------
diff --git a/README.rst b/README.rst
index e4dc65bd..18c62999 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
USB Audio Shared
................
-:Latest release: 6.13.0beta2
+:Latest release: 6.14.0beta2
:Maintainer: xross
:Description: USB Audio Shared Components. For use in the XMOS USB Audio Refererence Designs.
@@ -9,5 +9,5 @@ USB Audio Shared
Required software (dependencies)
================================
- * lib_xassert (git@github.com:xmos/lib_xassert.git)
+ * None
diff --git a/module_queue/.cproject b/module_queue/.cproject
index 5041e25c..b009a5bc 100644
--- a/module_queue/.cproject
+++ b/module_queue/.cproject
@@ -156,10 +156,7 @@
@@ -272,10 +269,7 @@
@@ -394,10 +388,7 @@
-
-
-
-
+
diff --git a/module_queue/module_build_info b/module_queue/module_build_info
index 5082786c..fb146b9d 100644
--- a/module_queue/module_build_info
+++ b/module_queue/module_build_info
@@ -11,4 +11,4 @@
MODULE_XCC_XC_FLAGS = $(XCC_XC_FLAGS)
-DEPENDENT_MODULES = lib_xassert
+DEPENDENT_MODULES =
diff --git a/module_queue/src/queue.h b/module_queue/src/queue.h
index 39b57728..1d120fc8 100644
--- a/module_queue/src/queue.h
+++ b/module_queue/src/queue.h
@@ -1,7 +1,7 @@
#ifndef QUEUE_H_
#define QUEUE_H_
-#include
+#define assert(x) asm("ecallf %0"::"r"(x));
typedef struct queue_t {
/// Read index.
diff --git a/module_usb_audio/.cproject b/module_usb_audio/.cproject
index 4e47aeca..cc782131 100644
--- a/module_usb_audio/.cproject
+++ b/module_usb_audio/.cproject
@@ -1,53 +1,3 @@
-<<<<<<< HEAD
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- xmake
- -f .makefile
- all
- true
- true
- true
-
-
- xmake
- -f .makefile
- clean
- true
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -324,775 +395,21 @@
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<<<<<<< HEAD
-
-
-
-
-
-
-
-
-
-
-
-
-
-=======
-
-
-
-
-
-
-
-
-
-
-
-
-
-
->>>>>>> master
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-<<<<<<< HEAD
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-=======
@@ -1107,112 +424,107 @@
->>>>>>> master
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/module_usb_audio/.project b/module_usb_audio/.project
index 80c9d6e8..cb42a172 100644
--- a/module_usb_audio/.project
+++ b/module_usb_audio/.project
@@ -1,90 +1,76 @@
- module_usb_audio
-
-
-
-
-
- com.xmos.cdt.core.LegacyProjectCheckerBuilder
-
-
-
-
- com.xmos.cdt.core.ProjectInfoSyncBuilder
-
-
-
-
- com.xmos.cdt.core.ModulePathBuilder
-
-
-
-
- org.eclipse.cdt.managedbuilder.core.genmakebuilder
- clean,full,incremental,
-
-
- ?children?
- ?name?=outputEntries\|?children?=?name?=entry\\\\|\\|\||
-
-
- ?name?
-
-
-
- org.eclipse.cdt.make.core.append_environment
- true
-
-
- org.eclipse.cdt.make.core.buildArguments
- CONFIG=Debug
-
-
- org.eclipse.cdt.make.core.buildCommand
- xmake
-
-
- org.eclipse.cdt.make.core.cleanBuildTarget
- clean
-
-
- org.eclipse.cdt.make.core.contents
- org.eclipse.cdt.make.core.activeConfigSettings
-
-
- org.eclipse.cdt.make.core.enableAutoBuild
- false
-
-
- org.eclipse.cdt.make.core.enableCleanBuild
- true
-
-
- org.eclipse.cdt.make.core.enableFullBuild
- true
-
-
- org.eclipse.cdt.make.core.stopOnError
- true
-
-
- org.eclipse.cdt.make.core.useDefaultBuildCmd
- false
-
-
-
-
- org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
- full,incremental,
-
-
-
-
-
- org.eclipse.cdt.core.cnature
- org.eclipse.cdt.managedbuilder.core.managedBuildNature
- org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
- com.xmos.cdt.core.XdeProjectNature
-
+ module_usb_audio
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+ ?children?
+ ?name?=outputEntries\|?children?=?name?=entry\\\\|\\|\||
+
+
+ ?name?
+
+
+
+ org.eclipse.cdt.make.core.append_environment
+ true
+
+
+ org.eclipse.cdt.make.core.buildArguments
+ CONFIG=Debug
+
+
+ org.eclipse.cdt.make.core.buildCommand
+ xmake
+
+
+ org.eclipse.cdt.make.core.cleanBuildTarget
+ clean
+
+
+ org.eclipse.cdt.make.core.contents
+ org.eclipse.cdt.make.core.activeConfigSettings
+
+
+ org.eclipse.cdt.make.core.enableAutoBuild
+ false
+
+
+ org.eclipse.cdt.make.core.enableCleanBuild
+ true
+
+
+ org.eclipse.cdt.make.core.enableFullBuild
+ true
+
+
+ org.eclipse.cdt.make.core.stopOnError
+ true
+
+
+ org.eclipse.cdt.make.core.useDefaultBuildCmd
+ false
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+ com.xmos.cdt.core.XdeProjectNature
+
+
diff --git a/module_usb_audio/audio.h b/module_usb_audio/audio.h
index 304656e8..24622ca3 100644
--- a/module_usb_audio/audio.h
+++ b/module_usb_audio/audio.h
@@ -26,7 +26,7 @@ void audio(chanend c_in,
#if (XUD_TILE != 0)
, server interface i_dfu dfuInterface
#endif
-#if (NUM_PDM_MICS > 0)
+#if (NUM_PDM_MICS > 0)
, chanend c_pdm_in
#endif
);
diff --git a/module_usb_audio/audio.xc b/module_usb_audio/audio.xc
index 5a1bbca3..6754b60a 100755
--- a/module_usb_audio/audio.xc
+++ b/module_usb_audio/audio.xc
@@ -705,14 +705,14 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out,
#endif
#if (NUM_PDM_MICS > 0)
- /* Get samples from PDM->PCM comverter */
+ /* Get samples from PDM->PCM comverter */
c_pdm_pcm <: 1;
#pragma loop unroll
for(int i = 0; i < NUM_PDM_MICS; i++)
{
c_pdm_pcm :> samplesIn_0[i];
}
-#endif
+#endif
}
@@ -1190,7 +1190,7 @@ chanend ?c_config, chanend ?c
#if NUM_PDM_MICS > 0
/* Send decimation factor to PDM task(s) */
- c_pdm_in <: curSamFreq;
+ c_pdm_in <: curSamFreq;
#endif
#ifdef ADAT_TX
diff --git a/module_usb_audio/endpoint0/audiorequests.xc b/module_usb_audio/endpoint0/audiorequests.xc
index c08353af..591d36fb 100644
--- a/module_usb_audio/endpoint0/audiorequests.xc
+++ b/module_usb_audio/endpoint0/audiorequests.xc
@@ -123,7 +123,7 @@ unsafe
{
unsigned * unsafe curSamFreqMultiplier = &g_curSamFreqMultiplier;
-static void setG_curSamFreqMultiplier(unsigned x)
+static void setG_curSamFreqMultiplier(unsigned x)
{
// asm(" stw %0, dp[g_curSamFreqMultiplier]" :: "r"(x));
*curSamFreqMultiplier = x;
@@ -337,7 +337,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c
}
setG_curSamFreqMultiplier(g_curSamFreq/(newMasterClock/512));
-#endif
+#endif
#ifdef ADAT_RX
/* Configure ADAT SMUX based on sample rate */
outuint(c_clk_ctl, SET_SMUX);
@@ -875,7 +875,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c
#endif
/* Special case for some low sample rates */
unsigned lowSampleRateList[] = {8000, 11025, 12000, 16000, 32000};
-
+
for (int k = 0; k < sizeof(lowSampleRateList)/sizeof(unsigned); k++)
{
if((lowSampleRateList[k] >= MIN_FREQ) && (lowSampleRateList[k] <= MAX_FREQ))
@@ -884,7 +884,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c
num_freqs++;
}
}
-
+
/* Just keep doubling for standard freqs >= 44.1/48kHz */
currentFreq44 = 44100;
currentFreq48 = 48000;
@@ -917,7 +917,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c
num_freqs++;
}
#endif
-
+
storeShort(buffer, 0, num_freqs);
return XUD_DoGetRequest(ep0_out, ep0_in, buffer, i, sp.wLength);
diff --git a/module_usb_audio/endpoint0/descriptors.h b/module_usb_audio/endpoint0/descriptors.h
index 40124dc1..c8d02437 100644
--- a/module_usb_audio/endpoint0/descriptors.h
+++ b/module_usb_audio/endpoint0/descriptors.h
@@ -2208,38 +2208,38 @@ unsigned char cfgDesc_Null[] =
#define AC_LENGTH (8 + INPUT_INTERFACES_A1 + OUTPUT_INTERFACES_A1)
-/* In UAC1 supported sample rates are listed in descriptor
+/* In UAC1 supported sample rates are listed in descriptor
* Note, using a value of <=2 or > 7 for num_freqs_a1 causes enumeration issues on Windows.
* To work around this we repeat MAX_FREQ_FS multiple times in some cases */
#define MAX(a,b) (((a)>(b))?(a):(b))
const unsigned num_freqs_a1 = MAX(3, (0
-#if(MIN_FREQ <= 8000) && (MAX_FREQ_FS >= 8000)
+#if(MIN_FREQ <= 8000) && (MAX_FREQ_FS >= 8000)
+ 1
#endif
-#if(MIN_FREQ <= 11025) && (MAX_FREQ_FS >= 11025)
+#if(MIN_FREQ <= 11025) && (MAX_FREQ_FS >= 11025)
+1
#endif
-#if(MIN_FREQ <= 12000) && (MAX_FREQ_FS >= 12000)
+#if(MIN_FREQ <= 12000) && (MAX_FREQ_FS >= 12000)
+1
#endif
-#if(MIN_FREQ <= 16000) && (MAX_FREQ_FS >= 16000)
+#if(MIN_FREQ <= 16000) && (MAX_FREQ_FS >= 16000)
+1
#endif
-#if(MIN_FREQ <= 32000) && (MAX_FREQ_FS >= 32000)
+#if(MIN_FREQ <= 32000) && (MAX_FREQ_FS >= 32000)
+1
#endif
-#if (MIN_FREQ <= 44100) && (MAX_FREQ_FS >= 44100)
+#if (MIN_FREQ <= 44100) && (MAX_FREQ_FS >= 44100)
+1
#endif
-#if (MIN_FREQ <= 48000) && (MAX_FREQ_FS >= 48000)
+#if (MIN_FREQ <= 48000) && (MAX_FREQ_FS >= 48000)
+1
#endif
-#if (MIN_FREQ <= 88200) && (MAX_FREQ_FS >= 88200)
+#if (MIN_FREQ <= 88200) && (MAX_FREQ_FS >= 88200)
+1
#endif
-#if (MIN_FREQ <= 96000) && (MAX_FREQ_FS >= 96000)
+#if (MIN_FREQ <= 96000) && (MAX_FREQ_FS >= 96000)
+1
#endif
));
@@ -2260,7 +2260,7 @@ const unsigned num_freqs_a1 = MAX(3, (0
#define CHARIFY_SR(x) (x & 0xff),((x & 0xff00)>> 8),((x & 0xff0000)>> 16)
#if (MIN_FREQ_FS < 12000) && (MAX_FREQ_FS > 48000)
-#error SAMPLE RATE RANGE TO GREAT FOR UAC1 ON WINDOWS
+#error SAMPLE RATE RANGE TO GREAT FOR UAC1 ON WINDOWS
#endif
unsigned char cfgDesc_Audio1[] =
@@ -2431,47 +2431,47 @@ unsigned char cfgDesc_Audio1[] =
|| (MIN_FREQ == 16000) && (MAX_FREQ_FS == 32000) \
|| (MIN_FREQ == 44100) && (MAX_FREQ_FS == 48000) \
|| (MIN_FREQ == 48000) && (MAX_FREQ_FS == 88200) \
- || (MIN_FREQ == 88200) && (MAX_FREQ_FS == 96000)
- CHARIFY_SR(MAX_FREQ_FS),
+ || (MIN_FREQ == 88200) && (MAX_FREQ_FS == 96000)
+ CHARIFY_SR(MAX_FREQ_FS),
#endif
#if (MIN_FREQ == MAX_FREQ_FS)
- CHARIFY_SR(MAX_FREQ_FS),
- CHARIFY_SR(MAX_FREQ_FS),
+ CHARIFY_SR(MAX_FREQ_FS),
+ CHARIFY_SR(MAX_FREQ_FS),
#endif
-#if(MIN_FREQ <= 8000) && (MAX_FREQ_FS >= 8000)
+#if(MIN_FREQ <= 8000) && (MAX_FREQ_FS >= 8000)
0x40, 0x1F, 0x00, /* sampleFreq - 8KHz */
#endif
-#if(MIN_FREQ <= 11025) && (MAX_FREQ_FS >= 11025)
+#if(MIN_FREQ <= 11025) && (MAX_FREQ_FS >= 11025)
0x11, 0x2B, 0x00, /* sampleFreq - 11.25KHz */
#endif
-#if(MIN_FREQ <= 12000) && (MAX_FREQ_FS >= 12000)
+#if(MIN_FREQ <= 12000) && (MAX_FREQ_FS >= 12000)
0xE0, 0x2E, 0x00, /* sampleFreq - 12KHz */
#endif
-#if(MIN_FREQ <= 16000) && (MAX_FREQ_FS >= 16000)
+#if(MIN_FREQ <= 16000) && (MAX_FREQ_FS >= 16000)
CHARIFY_SR(16000), /* sampleFreq - 16KHz */
#endif
-#if(MIN_FREQ <= 32000) && (MAX_FREQ_FS >= 32000)
+#if(MIN_FREQ <= 32000) && (MAX_FREQ_FS >= 32000)
CHARIFY_SR(32000), /* sampleFreq - 32KHz */
#endif
-#if (MIN_FREQ <= 44100) && (MAX_FREQ_FS >= 44100)
+#if (MIN_FREQ <= 44100) && (MAX_FREQ_FS >= 44100)
0x44, 0xAC, 0x00, /* sampleFreq - 44.1Khz */
#endif
-#if (MIN_FREQ <= 48000) && (MAX_FREQ_FS >= 48000)
+#if (MIN_FREQ <= 48000) && (MAX_FREQ_FS >= 48000)
0x80, 0xBB, 0x00, /* sampleFreq - 48KHz */
#endif
-#if (MIN_FREQ <= 88200) && (MAX_FREQ_FS >= 88200)
+#if (MIN_FREQ <= 88200) && (MAX_FREQ_FS >= 88200)
0x88, 0x58, 0x01, /* sampleFreq - 88.2KHz */
#endif
-#if (MIN_FREQ <= 96000) && (MAX_FREQ_FS >= 96000)
+#if (MIN_FREQ <= 96000) && (MAX_FREQ_FS >= 96000)
0x00, 0x77, 0x01, /* sampleFreq - 96KHz */
#endif
@@ -2559,50 +2559,50 @@ unsigned char cfgDesc_Audio1[] =
|| (MIN_FREQ == 16000) && (MAX_FREQ_FS == 32000) \
|| (MIN_FREQ == 44100) && (MAX_FREQ_FS == 48000) \
|| (MIN_FREQ == 48000) && (MAX_FREQ_FS == 88200) \
- || (MIN_FREQ == 88200) && (MAX_FREQ_FS == 96000)
- CHARIFY_SR(MAX_FREQ_FS),
+ || (MIN_FREQ == 88200) && (MAX_FREQ_FS == 96000)
+ CHARIFY_SR(MAX_FREQ_FS),
#endif
#if (MIN_FREQ == MAX_FREQ_FS)
- CHARIFY_SR(MAX_FREQ_FS),
- CHARIFY_SR(MAX_FREQ_FS),
+ CHARIFY_SR(MAX_FREQ_FS),
+ CHARIFY_SR(MAX_FREQ_FS),
#endif
-#if(MIN_FREQ <= 8000) && (MAX_FREQ_FS >= 8000)
+#if(MIN_FREQ <= 8000) && (MAX_FREQ_FS >= 8000)
0x40, 0x1F, 0x00, /* sampleFreq - 8000KHz */
#endif
-#if(MIN_FREQ <= 11025) && (MAX_FREQ_FS >= 11025)
+#if(MIN_FREQ <= 11025) && (MAX_FREQ_FS >= 11025)
0x11, 0x2B, 0x00, /* sampleFreq - 11025KHz */
#endif
-#if(MIN_FREQ <= 12000) && (MAX_FREQ_FS >= 12000)
+#if(MIN_FREQ <= 12000) && (MAX_FREQ_FS >= 12000)
0xE0, 0x2E, 0x00, /* sampleFreq - 12000KHz */
#endif
-#if(MIN_FREQ <= 16000) && (MAX_FREQ_FS >= 16000)
+#if(MIN_FREQ <= 16000) && (MAX_FREQ_FS >= 16000)
CHARIFY_SR(16000), /* sampleFreq - 32KHz */
#endif
-#if(MIN_FREQ <= 32000) && (MAX_FREQ_FS >= 32000)
+#if(MIN_FREQ <= 32000) && (MAX_FREQ_FS >= 32000)
CHARIFY_SR(32000), /* sampleFreq - 32KHz */
#endif
-#if (MIN_FREQ <= 44100) && (MAX_FREQ_FS >= 44100)
+#if (MIN_FREQ <= 44100) && (MAX_FREQ_FS >= 44100)
0x44, 0xAC, 0x00, /* sampleFreq - 44.1Khz */
#endif
-#if (MIN_FREQ <= 48000) && (MAX_FREQ_FS >= 48000)
+#if (MIN_FREQ <= 48000) && (MAX_FREQ_FS >= 48000)
0x80, 0xBB, 0x00, /* sampleFreq - 48KHz */
#endif
-#if (MIN_FREQ <= 88200) && (MAX_FREQ_FS >= 88200)
+#if (MIN_FREQ <= 88200) && (MAX_FREQ_FS >= 88200)
0x88, 0x58, 0x01, /* sampleFreq - 88.2KHz */
#endif
-#if (MIN_FREQ <= 96000) && (MAX_FREQ_FS >= 96000)
+#if (MIN_FREQ <= 96000) && (MAX_FREQ_FS >= 96000)
0x00, 0x77, 0x01, /* sampleFreq - 96KHz */
#endif
-
+
/* Standard Endpoint Descriptor */
0x09,
0x05, /* ENDPOINT */
diff --git a/module_usb_audio/main.xc b/module_usb_audio/main.xc
index 28ddd626..ad4a4b06 100755
--- a/module_usb_audio/main.xc
+++ b/module_usb_audio/main.xc
@@ -454,7 +454,7 @@ void usb_audio_io(chanend c_aud_in, chanend ?c_adc,
#if XUD_TILE != 0
, dfuInterface
#endif
-#if (NUM_PDM_MICS > 0)
+#if (NUM_PDM_MICS > 0)
, c_pdm_pcm
#endif
);
@@ -653,7 +653,7 @@ int main()
}
#endif
-#if (NUM_PDM_MICS > 0)
+#if (NUM_PDM_MICS > 0)
on stdcore[PDM_TILE]: pcm_pdm_mic(c_pdm_pcm);
#endif
USER_MAIN_CORES
diff --git a/module_usb_audio/mixer/fastmix.S b/module_usb_audio/mixer/fastmix.S
index 5758b370..9ded5fb4 100644
--- a/module_usb_audio/mixer/fastmix.S
+++ b/module_usb_audio/mixer/fastmix.S
@@ -189,7 +189,7 @@ DOMIX_BOT(7)
.linkset setPtr.maxtimers, 0;
.linkset setPtr.maxthreads, 1;
setPtr:
- ENTSP_lu6 0
+ ENTSP_lu6 0
shl r2, r2, 1
.xtabranch .label_0
bru r2
diff --git a/module_usb_audio/pdm_mics/pcm_pdm_mic.xc b/module_usb_audio/pdm_mics/pcm_pdm_mic.xc
index a00bbf9a..cf2821ce 100644
--- a/module_usb_audio/pdm_mics/pcm_pdm_mic.xc
+++ b/module_usb_audio/pdm_mics/pcm_pdm_mic.xc
@@ -29,7 +29,7 @@ void user_pdm_init();
int data_0[4*COEFS_PER_PHASE*MAX_DECIMATION_FACTOR] = {0};
int data_1[4*COEFS_PER_PHASE*MAX_DECIMATION_FACTOR] = {0};
-frame_audio mic_audio[2];
+frame_audio mic_audio[2];
void pdm_process(streaming chanend c_ds_output_0, streaming chanend c_ds_output_1, chanend c_audio)
{
@@ -38,13 +38,13 @@ void pdm_process(streaming chanend c_ds_output_0, streaming chanend c_ds_output_
int output[NUM_PDM_MICS];
user_pdm_init();
-
+
while(1)
- {
+ {
unsigned samplerate;
c_audio :> samplerate;
-
+
unsigned decimationfactor = 48000/samplerate;
unsafe
@@ -60,16 +60,16 @@ void pdm_process(streaming chanend c_ds_output_0, streaming chanend c_ds_output_
while(1)
{
frame_audio * unsafe current = decimator_get_next_audio_frame(c_ds_output_0, c_ds_output_1, buffer, mic_audio);
-
+
unsafe
{
int req;
user_pdm_process(current, output);
-
+
c_audio :> req;
-
+
if(req)
- {
+ {
for(int i = 0; i < NUM_PDM_MICS; i++)
{
c_audio <: output[i]*decimationfactor;
@@ -80,7 +80,7 @@ void pdm_process(streaming chanend c_ds_output_0, streaming chanend c_ds_output_
break;
}
}
- }
+ }
}
}
@@ -92,14 +92,14 @@ void pcm_pdm_mic(chanend c_pcm_out)
{
streaming chan c_4x_pdm_mic_0, c_4x_pdm_mic_1;
streaming chan c_ds_output_0, c_ds_output_1;
-
- /* TODO, always run mics at 3MHz */
+
+ /* TODO, always run mics at 3MHz */
configure_clock_src_divide(pdmclk, p_mclk, 2);
configure_port_clock_output(p_pdm_clk, pdmclk);
configure_in_port(p_pdm_mics, pdmclk);
start_clock(pdmclk);
- par
+ par
{
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);
diff --git a/module_usb_audio/ports/audioports.xc b/module_usb_audio/ports/audioports.xc
index 31373c82..20188e07 100644
--- a/module_usb_audio/ports/audioports.xc
+++ b/module_usb_audio/ports/audioports.xc
@@ -56,7 +56,7 @@ unsigned int divide)
#endif
#if defined(__XS2A__)
- /* Clock bitclock clock block from master clock pin (divided) */
+ /* Clock bitclock clock block from master clock pin (divided) */
configure_clock_src_divide(clk_audio_bclk, p_mclk_in, (divide/2));
configure_port_clock_output(p_bclk, clk_audio_bclk);
#else
diff --git a/module_usb_audio/usb_buffer/usb_buffer.xc b/module_usb_audio/usb_buffer/usb_buffer.xc
index 19e0cc51..274af50b 100644
--- a/module_usb_audio/usb_buffer/usb_buffer.xc
+++ b/module_usb_audio/usb_buffer/usb_buffer.xc
@@ -481,10 +481,10 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in,
/* Number of MCLK ticks in this SOF period (E.g = 125 * 24.576 = 3072) */
int count = (int) ((short)(u_tmp - lastClock));
-
- unsigned long long full_result = count * feedbackMul * sampleFreq;
-
- clockcounter += full_result;
+
+ unsigned long long full_result = count * feedbackMul * sampleFreq;
+
+ clockcounter += full_result;
/* Store MCLK for next time around... */
lastClock = u_tmp;
@@ -494,20 +494,20 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in,
if(sofCount == 128)
{
sofCount = 0;
-
+
clockcounter += mod_from_last_time;
clocks = clockcounter / masterClockFreq;
mod_from_last_time = clockcounter % masterClockFreq;
-
+
if(usb_speed == XUD_SPEED_HS)
- {
+ {
clocks <<= 3;
}
else
{
clocks <<= 6;
}
-
+
#ifdef FB_TOLERANCE_TEST
if (clocks > (expected_fb - FB_TOLERANCE) &&
clocks < (expected_fb + FB_TOLERANCE))
diff --git a/module_usb_midi/.cproject b/module_usb_midi/.cproject
index b7f42267..bd78753f 100644
--- a/module_usb_midi/.cproject
+++ b/module_usb_midi/.cproject
@@ -156,10 +156,7 @@
-
-
-
-
+
@@ -274,10 +271,7 @@
-
-
-
-
+
@@ -398,10 +392,7 @@
-
-
-
-
+
diff --git a/module_usb_midi/src/midiinparse.xc b/module_usb_midi/src/midiinparse.xc
index 020f9b61..913b5b54 100644
--- a/module_usb_midi/src/midiinparse.xc
+++ b/module_usb_midi/src/midiinparse.xc
@@ -2,11 +2,9 @@
* @file midiinparse.xc
* @brief Generates USB MIDI events from MIDI events
* @author Russell Gallop, XMOS Semiconductor
- * @version 0.1
*/
#include
-//#include
#include "midiinparse.h"
/**
@@ -14,13 +12,13 @@
*
*/
void dump_midi_in_parse_state(struct midi_in_parse_state &s) {
- printstr("expect_msg_len: 0x"); printhexln(s.expect_msg_len);
- printstr("msg_type: 0x"); printhexln(s.msg_type);
- printstr("receivebuffer: 0x"); printhex(s.receivebuffer[0]);
- printstr(", 0x"); printhex(s.receivebuffer[1]);
- printstr(", 0x"); printhexln(s.receivebuffer[2]);
- printstr("received: 0x"); printhexln(s.received);
- printstr("codeIndexNumber: 0x"); printhexln(s.codeIndexNumber);
+ printstr("expect_msg_len: 0x"); printhexln(s.expect_msg_len);
+ printstr("msg_type: 0x"); printhexln(s.msg_type);
+ printstr("receivebuffer: 0x"); printhex(s.receivebuffer[0]);
+ printstr(", 0x"); printhex(s.receivebuffer[1]);
+ printstr(", 0x"); printhexln(s.receivebuffer[2]);
+ printstr("received: 0x"); printhexln(s.received);
+ printstr("codeIndexNumber: 0x"); printhexln(s.codeIndexNumber);
}
/**
diff --git a/xpd.xml b/xpd.xml
index ca293bdf..1922b7ce 100644
--- a/xpd.xml
+++ b/xpd.xml
@@ -7,7 +7,6 @@
- lib_xassert
UAC2
@@ -16,16 +15,10 @@
- module_queue
- lib_xassert
+ module_queue
MIDI
-
- master
- 9c4955e3ab0604e6ba4b66ad46e01b5d96d5d6fb
- git@github.com:xmos/lib_xassert.git
-
USB Audio Shared Components. For use in the XMOS USB Audio Refererence Designs.
module_dfu/doc
False
@@ -112,4 +105,4 @@
1.0
-
\ No newline at end of file
+