From 961bebf683d840c95c5429908d0f49bf03aa9a3b Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 18 Mar 2015 10:24:20 +0000 Subject: [PATCH 01/12] Resolved enum issue when MAX_MIX_COUNT > 0. Introduced in 6.11 mixer opts (bug #16564) --- CHANGELOG.rst | 5 +++++ module_usb_audio/mixer/mixer.xc | 12 ++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index cf2cb203..237efafd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ sc_usb_audio Change Log ======================= +HEAD +---- + - RESOLVED: Enumeration issue when MAX_MIX_COUNT > 0. Introduced in mixer optimisations + in 6.11.0 + 6.11.1 ------ - ADDED: ADAT transmit functionality, including SMUX. See ADAT_TX and ADAT_TX_INDEX. diff --git a/module_usb_audio/mixer/mixer.xc b/module_usb_audio/mixer/mixer.xc index 88cb10e4..28be3cf7 100644 --- a/module_usb_audio/mixer/mixer.xc +++ b/module_usb_audio/mixer/mixer.xc @@ -363,9 +363,6 @@ static void mixer1(chanend c_host, chanend c_mix_ctl, chanend c_mixer2) /* Request from audio() */ inuint(c_mixer2); - GiveSamplesToDevice(c_mixer2, samples_to_device_map, multOut, underflow); - GetSamplesFromDevice(c_mixer2); - /* Request data from decouple thread */ outuint(c_host, 0); @@ -504,9 +501,6 @@ static void mixer1(chanend c_host, chanend c_mix_ctl, chanend c_mixer2) sampFreq = inuint(c_host); mixer1_mix2_flag = sampFreq > 96000; - /* Wait for request */ - inuint(c_mixer2); - /* Inform mixer2 (or audio()) about freq change */ outct(c_mixer2, command); outuint(c_mixer2, sampFreq); @@ -515,9 +509,6 @@ static void mixer1(chanend c_host, chanend c_mix_ctl, chanend c_mixer2) case SET_STREAM_FORMAT_OUT: case SET_STREAM_FORMAT_IN: - /* Wait for request */ - inuint(c_mixer2); - /* Inform mixer2 (or audio()) about format change */ outct(c_mixer2, command); outuint(c_mixer2, inuint(c_host)); @@ -612,7 +603,8 @@ static void mixer1(chanend c_host, chanend c_mix_ctl, chanend c_mixer2) } #else /* IF MAX_MIX_COUNT > 0 */ /* No mixes, this thread runs on its own doing just volume */ - + GiveSamplesToDevice(c_mixer2, samples_to_device_map, multOut, underflow); + GetSamplesFromDevice(c_mixer2); GiveSamplesToHost(c_host, samples_to_host_map, multIn); GetSamplesFromHost(c_host, underflow); #endif From 77b446c682adda3ede873574d721653c102aa5fa Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 18 Mar 2015 11:22:29 +0000 Subject: [PATCH 02/12] Added HID report defines to user_hid.h --- module_usb_audio/user_hid.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/module_usb_audio/user_hid.h b/module_usb_audio/user_hid.h index e834aa04..dd0b355e 100644 --- a/module_usb_audio/user_hid.h +++ b/module_usb_audio/user_hid.h @@ -1,3 +1,12 @@ + +/* These defines relate to the HID report desc - do not mod */ +#define HID_CONTROL_PLAYPAUSE_SHIFT 0x01 +#define HID_CONTROL_NEXT_SHIFT 0x02 +#define HID_CONTROL_PREV_SHIFT 0x03 +#define HID_CONTROL_VOLUP_SHIFT 0x04 +#define HID_CONTROL_VOLDN_SHIFT 0x05 +#define HID_CONTROL_MUTE_SHIFT 0x06 + void UserReadHIDButtons(unsigned char hidData[]); From 816f3aec9e335c82f3b01ea6abf2be72b6df54de Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 18 Mar 2015 11:24:31 +0000 Subject: [PATCH 03/12] Changeling update for previous commit. --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 237efafd..1b25fc23 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,7 @@ HEAD ---- - RESOLVED: Enumeration issue when MAX_MIX_COUNT > 0. Introduced in mixer optimisations in 6.11.0 + - CHANGE: HID report descriptor defines added to shared user_hid.h 6.11.1 ------ From 7f8e90dda4085dac9f83d8673c97822d8aaf766f Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 18 Mar 2015 11:56:30 +0000 Subject: [PATCH 04/12] Potential build issue due to duplicate labels in inline asm in set_interrupt_handler macro --- CHANGELOG.rst | 2 ++ module_usb_audio/usb_buffer/interrupt.h | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1b25fc23..ec533b34 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,8 @@ HEAD ---- - RESOLVED: Enumeration issue when MAX_MIX_COUNT > 0. Introduced in mixer optimisations in 6.11.0 + - RESOLVED: Potential build issue due to duplicate labels in inline asm in + set_interrupt_handler macro - CHANGE: HID report descriptor defines added to shared user_hid.h 6.11.1 diff --git a/module_usb_audio/usb_buffer/interrupt.h b/module_usb_audio/usb_buffer/interrupt.h index d52ee1b7..044258f6 100644 --- a/module_usb_audio/usb_buffer/interrupt.h +++ b/module_usb_audio/usb_buffer/interrupt.h @@ -160,11 +160,11 @@ #define set_interrupt_handler(f, nstackwords, args, c, ...) \ asm (" .section .dp.data, \"adw\", @progbits\n" \ " .align 4\n" \ - "__" #f "_kernel_stack:\n" \ + "__" #f "_kernel_stack%=:\n" \ " .space " #nstackwords ", 0\n" \ - " .text\n"); \ - asm("mov r10, %0; ldaw r11, dp[__" #f "_kernel_stack];add r11, r11, r10;ldaw r10, sp[0]; "\ - "set sp,r11;stw r10, sp[0]; krestsp 0"::"r"(nstackwords-8):"r10","r11"); \ + " .text\n" \ + "mov r10, %0; ldaw r11, dp[__" #f "_kernel_stack%=];add r11, r11, r10;ldaw r10, sp[0]; "\ + "set sp,r11;stw r10, sp[0]; krestsp 0"::"r"(nstackwords-8):"r10","r11"); \ store_args ## args(c, __VA_ARGS__) \ do_interrupt_handler(f, args) \ asm("ldap r11, __" #f "_handler; setv res[%0],r11"::"r"(c):"r11"); \ From 2de25aa4b59d54be1b200093d6c7b4ce8c385edf Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 18 Mar 2015 12:20:24 +0000 Subject: [PATCH 05/12] All inline asm in decouple now marked volatile --- module_usb_audio/usb_buffer/decouple.xc | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/module_usb_audio/usb_buffer/decouple.xc b/module_usb_audio/usb_buffer/decouple.xc index edb985e0..0b9869c8 100644 --- a/module_usb_audio/usb_buffer/decouple.xc +++ b/module_usb_audio/usb_buffer/decouple.xc @@ -176,7 +176,7 @@ __builtin_unreachable(); int mult; int h; unsigned l; - asm("ldw %0, %1[%2]":"=r"(mult):"r"(p_multIn),"r"(i)); + asm volatile("ldw %0, %1[%2]":"=r"(mult):"r"(p_multIn),"r"(i)); {h, l} = macs(mult, sample, 0, 0); sample = h << 3; @@ -207,7 +207,7 @@ __builtin_unreachable(); int mult; int h; unsigned l; - asm("ldw %0, %1[%2]":"=r"(mult):"r"(p_multIn),"r"(i)); + asm volatile("ldw %0, %1[%2]":"=r"(mult):"r"(p_multIn),"r"(i)); {h, l} = macs(mult, sample, 0, 0); sample = h << 3; #if (STREAM_FORMAT_INPUT_RESOLUTION_32BIT_USED == 1) @@ -240,7 +240,7 @@ __builtin_unreachable(); int mult; int h; unsigned l; - asm("ldw %0, %1[%2]":"=r"(mult):"r"(p_multIn),"r"(i)); + asm volatile("ldw %0, %1[%2]":"=r"(mult):"r"(p_multIn),"r"(i)); {h, l} = macs(mult, sample, 0, 0); sample = h << 3; #endif @@ -343,7 +343,7 @@ __builtin_unreachable(); sample <<= 16; #if (OUTPUT_VOLUME_CONTROL == 1) && !defined(OUT_VOLUME_IN_MIXER) - asm("ldw %0, %1[%2]":"=r"(mult):"r"(p_multOut),"r"(i)); + asm volatile("ldw %0, %1[%2]":"=r"(mult):"r"(p_multOut),"r"(i)); {h, l} = macs(mult, sample, 0, 0); /* Note, in 2 byte subslot mode - ignore lower result of macs */ h <<= 3; @@ -371,7 +371,7 @@ __builtin_unreachable(); g_aud_from_host_rdptr+=4; #if (OUTPUT_VOLUME_CONTROL == 1) && !defined(OUT_VOLUME_IN_MIXER) - asm("ldw %0, %1[%2]":"=r"(mult):"r"(p_multOut),"r"(i)); + asm volatile("ldw %0, %1[%2]":"=r"(mult):"r"(p_multOut),"r"(i)); {h, l} = macs(mult, sample, 0, 0); h <<= 3; #if (STREAM_FORMAT_OUTPUT_RESOLUTION_32BIT_USED == 1) @@ -426,7 +426,7 @@ __builtin_unreachable(); unpackState++; #if (OUTPUT_VOLUME_CONTROL == 1) && !defined(OUT_VOLUME_IN_MIXER) - asm("ldw %0, %1[%2]":"=r"(mult):"r"(p_multOut),"r"(i)); + asm volatile("ldw %0, %1[%2]":"=r"(mult):"r"(p_multOut),"r"(i)); {h, l} = macs(mult, sample, 0, 0); h <<= 3; outuint(c_mix_out, h); @@ -476,7 +476,7 @@ __builtin_unreachable(); } /* Get feedback val - ideally this would be syncronised */ - asm("ldw %0, dp[g_speed]" : "=r" (speed) :); + asm volatile("ldw %0, dp[g_speed]" : "=r" (speed) :); /* Calc packet size to send back based on our fb */ speedRem += speed; @@ -587,7 +587,7 @@ static inline void SetupZerosSendBuffer(XUD_ep aud_to_host_usb_ep, unsigned samp mid *= g_numUsbChan_In * slotSize; - asm("stw %0, %1[0]"::"r"(mid),"r"(g_aud_to_host_zeros)); + asm volatile("stw %0, %1[0]"::"r"(mid),"r"(g_aud_to_host_zeros)); /* Mark EP ready with the zero buffer. Note this will simply update the packet size * if it is already ready */ @@ -648,14 +648,14 @@ void decouple(chanend c_mix_out #ifndef OUT_VOLUME_IN_MIXER for (int i = 0; i < NUM_USB_CHAN_OUT + 1; i++) { - asm("stw %0, %1[%2]"::"r"(MAX_VOL),"r"(p_multOut),"r"(i)); + asm volatile("stw %0, %1[%2]"::"r"(MAX_VOL),"r"(p_multOut),"r"(i)); } #endif #ifndef IN_VOLUME_IN_MIXER for (int i = 0; i < NUM_USB_CHAN_IN + 1; i++) { - asm("stw %0, %1[%2]"::"r"(MAX_VOL),"r"(p_multIn),"r"(i)); + asm volatile("stw %0, %1[%2]"::"r"(MAX_VOL),"r"(p_multIn),"r"(i)); } #endif @@ -751,7 +751,7 @@ void decouple(chanend c_mix_out chkct(c_mix_out, XS1_CT_END); SET_SHARED_GLOBAL(g_freqChange, 0); - asm("outct res[%0],%1"::"r"(buffer_aud_ctl_chan),"r"(XS1_CT_END)); + asm volatile("outct res[%0],%1"::"r"(buffer_aud_ctl_chan),"r"(XS1_CT_END)); ENABLE_INTERRUPTS(); @@ -795,7 +795,7 @@ void decouple(chanend c_mix_out } SET_SHARED_GLOBAL(g_freqChange, 0); - asm("outct res[%0],%1"::"r"(buffer_aud_ctl_chan),"r"(XS1_CT_END)); + asm volatile("outct res[%0],%1"::"r"(buffer_aud_ctl_chan),"r"(XS1_CT_END)); ENABLE_INTERRUPTS(); } @@ -840,7 +840,7 @@ void decouple(chanend c_mix_out /* Wait for handshake back */ chkct(c_mix_out, XS1_CT_END); - asm("outct res[%0],%1"::"r"(buffer_aud_ctl_chan),"r"(XS1_CT_END)); + asm volatile("outct res[%0],%1"::"r"(buffer_aud_ctl_chan),"r"(XS1_CT_END)); SET_SHARED_GLOBAL(g_freqChange, 0); ENABLE_INTERRUPTS(); @@ -1000,7 +1000,7 @@ void decouple(chanend c_mix_out { int p, len; GET_SHARED_GLOBAL(p, g_aud_to_host_buffer); - asm("ldw %0, %1[0]":"=r"(len):"r"(p)); + asm volatile("ldw %0, %1[0]":"=r"(len):"r"(p)); XUD_SetReady_InPtr(aud_to_host_usb_ep, p+4, len); } continue; From f8c703621f0a6f0a2990e0b9313701c90ae56fe5 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 19 Mar 2015 15:36:11 +0000 Subject: [PATCH 06/12] Now uses module_adat_rx from sc_adat (local module_usb_audio_adat removed) --- CHANGELOG.rst | 1 + module_usb_audio/main.xc | 2 +- module_usb_audio_adat/.cproject | 497 ------------ module_usb_audio_adat/.makefile | 8 - module_usb_audio_adat/.project | 76 -- module_usb_audio_adat/.xproject | 1 - module_usb_audio_adat/README.rst | 9 - module_usb_audio_adat/module_description | 0 module_usb_audio_adat/src/adatreceiver.h | 27 - module_usb_audio_adat/src/adatreceiver.xc | 947 ---------------------- 10 files changed, 2 insertions(+), 1566 deletions(-) delete mode 100644 module_usb_audio_adat/.cproject delete mode 100644 module_usb_audio_adat/.makefile delete mode 100644 module_usb_audio_adat/.project delete mode 100644 module_usb_audio_adat/.xproject delete mode 100644 module_usb_audio_adat/README.rst delete mode 100644 module_usb_audio_adat/module_description delete mode 100644 module_usb_audio_adat/src/adatreceiver.h delete mode 100644 module_usb_audio_adat/src/adatreceiver.xc diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ec533b34..40d39bd9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,7 @@ HEAD - RESOLVED: Potential build issue due to duplicate labels in inline asm in set_interrupt_handler macro - CHANGE: HID report descriptor defines added to shared user_hid.h + - CHANGE: Now uses module_adat_rx from sc_adat (local module_usb_audio_adat removed) 6.11.1 ------ diff --git a/module_usb_audio/main.xc b/module_usb_audio/main.xc index 9991f2d8..16609a11 100755 --- a/module_usb_audio/main.xc +++ b/module_usb_audio/main.xc @@ -38,7 +38,7 @@ #endif #ifdef ADAT_RX -#include "adatreceiver.h" +#include "adat_rx.h" #endif #include "clocking.h" diff --git a/module_usb_audio_adat/.cproject b/module_usb_audio_adat/.cproject deleted file mode 100644 index 252164f5..00000000 --- a/module_usb_audio_adat/.cproject +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - - - - - - - - - - - xmake - -f .makefile - all - true - true - true - - - xmake - -f .makefile - clean - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/module_usb_audio_adat/.makefile b/module_usb_audio_adat/.makefile deleted file mode 100644 index 87b347b9..00000000 --- a/module_usb_audio_adat/.makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: - @echo "** Module only - only builds as part of application **" - - -clean: - @echo "** Module only - only builds as part of application **" - - diff --git a/module_usb_audio_adat/.project b/module_usb_audio_adat/.project deleted file mode 100644 index 155a17c6..00000000 --- a/module_usb_audio_adat/.project +++ /dev/null @@ -1,76 +0,0 @@ - - - module_usb_audio_adat - - - - - - 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_adat/.xproject b/module_usb_audio_adat/.xproject deleted file mode 100644 index d80aba33..00000000 --- a/module_usb_audio_adat/.xproject +++ /dev/null @@ -1 +0,0 @@ -sc_usb_audioXM-004720-SM \ No newline at end of file diff --git a/module_usb_audio_adat/README.rst b/module_usb_audio_adat/README.rst deleted file mode 100644 index a81d321d..00000000 --- a/module_usb_audio_adat/README.rst +++ /dev/null @@ -1,9 +0,0 @@ -ADAT Module for UAC2 MC Reference Design -======================================== - -:scope: General Use -:description: ADAT -:keywords: ADAT -:boards: XR-USB-AUDIO-20-MC - -ADAT code diff --git a/module_usb_audio_adat/module_description b/module_usb_audio_adat/module_description deleted file mode 100644 index e69de29b..00000000 diff --git a/module_usb_audio_adat/src/adatreceiver.h b/module_usb_audio_adat/src/adatreceiver.h deleted file mode 100644 index 451f9df9..00000000 --- a/module_usb_audio_adat/src/adatreceiver.h +++ /dev/null @@ -1,27 +0,0 @@ - -/** ADAT Receive Thread (48kHz sample rate). - * - * \param p ADAT port - should be 1-bit and clocked at 100MHz - * \param oChan channel on which decoded samples are output - * - * The function will return if it cannot lock onto a 44,100/48,000 Hz - * signal. Normally the 48000 function is called in a while(1) loop. If - * both 44,100 and 48,000 need to be supported, they should be called in - * sequence in a while(1) loop. Note that the functions are large, and - * that 44,100 should not be called if it does not need to be supported. - **/ -void adatReceiver48000(buffered in port:32 p, chanend oChan); - -/** ADAT Receive Thread (44.1kHz sample rate). - * - * \param p ADAT port - should be 1-bit and clocked at 100MHz - * \param oChan channel on which decoded samples are output - * - * The function will return if it cannot lock onto a 44,100/48,000 Hz - * signal. Normally the 48000 function is called in a while(1) loop. If - * both 44,100 and 48,000 need to be supported, they should be called in - * sequence in a while(1) loop. Note that the functions are large, and - * that 44,100 should not be called if it does not need to be supported. - **/ - -void adatReceiver44100(buffered in port:32 p, chanend oChan); diff --git a/module_usb_audio_adat/src/adatreceiver.xc b/module_usb_audio_adat/src/adatreceiver.xc deleted file mode 100644 index a2d19ff9..00000000 --- a/module_usb_audio_adat/src/adatreceiver.xc +++ /dev/null @@ -1,947 +0,0 @@ -// GENERATED CODE - DO NOT EDIT -// Comments are in the generator -#include -#include -#pragma unsafe arrays -void adatReceiver48000(buffered in port:32 p, chanend oChan) { - const unsigned int mask = 0x80808080; - unsigned compressed; - unsigned nibble, word = 1, fourBits, data; - int old, violation; - unsigned int lookupCrcF[16] = {8, 9, 12, 13, 7, 6, 3, 2, 10, 11, 14, 15, 5, 4, 1, 0}; - unsigned int lookupNRTZ[32] = {0, 8, 12, 4, 6, 14, 10, 2, 3, 11, 15, 7, 5, 13, 9, 1, - 1, 9, 13, 5, 7, 15, 11, 3, 2, 10, 14, 6, 4, 12, 8, 0}; - for(int i = 0; i < 32; i++) { lookupNRTZ[i] <<= 4; } - do { - old = word; p :> word; - } while (word != old || (word != 0 && word+1 != 0)); - while(1) { - violation = word; - p when pinsneq(violation) :> int _; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - outuint(oChan, nibble << 4 | 1); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = nibble << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = nibble << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = nibble << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = nibble << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - if (word != 0 && word+1 != 0) return; - } -} - -// GENERATED CODE - DO NOT EDIT -// Comments are in the generator -#include -#include -#pragma unsafe arrays -void adatReceiver44100(buffered in port:32 p, chanend oChan) { - const unsigned int mask = 0x80402010; - unsigned compressed; - unsigned nibble, word = 1, fourBits, data; - int old, violation; - unsigned int lookupCrcF[16] = {8, 12, 10, 14, 9, 13, 11, 15, 7, 3, 5, 1, 6, 2, 4, 0}; - unsigned int lookupNRTZ[32] = {0, 8, 12, 4, 6, 14, 10, 2, 3, 11, 15, 7, 5, 13, 9, 1, - 1, 9, 13, 5, 7, 15, 11, 3, 2, 10, 14, 6, 4, 12, 8, 0}; - for(int i = 0; i < 32; i++) { lookupNRTZ[i] <<= 4; } - do { - old = word; p :> word; - } while (word != old || (word != 0 && word+1 != 0)); - while(1) { - violation = word; - p when pinsneq(violation) :> int _; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - outuint(oChan, nibble << 4 | 1); - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = nibble << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = nibble << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = nibble << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - if (word != 0 && word+1 != 0) return; - } -} - From d7ad6e7a99518d434410bcee4ff927a6e48194a5 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Fri, 20 Mar 2015 09:29:25 +0000 Subject: [PATCH 07/12] Fixed clock selector string index --- module_usb_audio/endpoint0/descriptors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module_usb_audio/endpoint0/descriptors.h b/module_usb_audio/endpoint0/descriptors.h index f8202d52..6d2c8361 100644 --- a/module_usb_audio/endpoint0/descriptors.h +++ b/module_usb_audio/endpoint0/descriptors.h @@ -945,7 +945,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2= ID_CLKSRC_ADAT, /* baCSourceID */ #endif .bmControl = 0x03, - .iClockSelector = 13, /* TODO Shoudn't be hard-coded */ + .iClockSelector = offsetof(StringDescTable_t, clockSelectorStr)/sizeof(char *), }, #if (NUM_USB_CHAN_OUT > 0) From 8938dc7afc9463ad1ca215623cf684d6d6a5be00 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Fri, 20 Mar 2015 09:43:34 +0000 Subject: [PATCH 08/12] Changeling update for previous commit. Also added classification to resolved items. --- CHANGELOG.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 40d39bd9..3b07643d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,19 +3,20 @@ sc_usb_audio Change Log HEAD ---- - - RESOLVED: Enumeration issue when MAX_MIX_COUNT > 0. Introduced in mixer optimisations - in 6.11.0 - - RESOLVED: Potential build issue due to duplicate labels in inline asm in + - RESOLVED: (Major) Enumeration issue when MAX_MIX_COUNT > 0 only. Introduced in mixer + optimisations in 6.11.0. Does not effect designs without mixer enabled. + - RESOLVED: (Minor) Potential build issue due to duplicate labels in inline asm in set_interrupt_handler macro + - RESOLVED: (Minor) String descriptor for Clock Selector unit incorrectly reported - CHANGE: HID report descriptor defines added to shared user_hid.h - CHANGE: Now uses module_adat_rx from sc_adat (local module_usb_audio_adat removed) 6.11.1 ------ - ADDED: ADAT transmit functionality, including SMUX. See ADAT_TX and ADAT_TX_INDEX. - - RESOLVED: Build issue with CODEC_MASTER (xCore is I2S slave) enabled - - RESOLVED: Channel ordering issue in when TDM and CODEC_MASTER mode enabled - - RESOLVED: DFU fails when SPDIF_RX enabled due to clock block being shared between SPDIF + - RESOLVED: (Normal) Build issue with CODEC_MASTER (xCore is I2S slave) enabled + - RESOLVED: (Minor) Channel ordering issue in when TDM and CODEC_MASTER mode enabled + - RESOLVED: (Normal) DFU fails when SPDIF_RX enabled due to clock block being shared between SPDIF core and FlashLib 6.11.0 From 7cd5631e4b201f13be545dc59160c808b468917b Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Fri, 20 Mar 2015 17:23:24 +0000 Subject: [PATCH 09/12] The audio i/o core now uses "underflow" sample as it's request word (i.e. different for PCM/DSD). This gets passed all the way through mixer and on to decouple such that it can be used in the underflow state. This allows the removal of the communication of the underflow state to the audio i/o core from decouple and thus "stand-alone" mixer now works again. --- module_usb_audio/audio.xc | 127 ++++++++++-------------- module_usb_audio/mixer/mixer.xc | 42 ++++---- module_usb_audio/usb_buffer/decouple.xc | 19 +--- 3 files changed, 74 insertions(+), 114 deletions(-) diff --git a/module_usb_audio/audio.xc b/module_usb_audio/audio.xc index 296996e8..59fe9417 100755 --- a/module_usb_audio/audio.xc +++ b/module_usb_audio/audio.xc @@ -218,109 +218,85 @@ static inline void TransferAdatTxSamples(chanend c_adat_out, const unsigned samp static inline unsigned DoSampleTransfer(chanend c_out, int readBuffNo, unsigned underflowWord) { unsigned command; - unsigned underflow; - outuint(c_out, 0); + outuint(c_out, underflowWord); - /* Check for sample freq change (or other command) or new samples from mixer*/ - if(testct(c_out)) - { - unsigned command = inct(c_out); + /* Check for sample freq change (or other command) or new samples from mixer*/ + if(testct(c_out)) + { + unsigned command = inct(c_out); #ifndef CODEC_MASTER - // Set clocks low - p_lrclk <: 0; - p_bclk <: 0; + // Set clocks low + p_lrclk <: 0; + p_bclk <: 0; #if(DSD_CHANS_DAC != 0) /* DSD Clock might not be shared with lrclk or bclk... */ - p_dsd_clk <: 0; + p_dsd_clk <: 0; #endif #endif #if (DSD_CHANS_DAC > 0) - if(dsdMode == DSD_MODE_DOP) - dsdMode = DSD_MODE_OFF; + if(dsdMode == DSD_MODE_DOP) + dsdMode = DSD_MODE_OFF; #endif #pragma xta endpoint "received_command" return command; - - } - else - { - underflow = inuint(c_out); + } + else + { #ifndef MIXER // Interfaces straight to decouple() #if NUM_USB_CHAN_IN > 0 #pragma loop unroll - for(int i = 0; i < I2S_CHANS_ADC; i++) - { - if(readBuffNo) - outuint(c_out, samplesIn_1[i]); - else - outuint(c_out, samplesIn_0[i]); - } - /* Send over the digi channels - no odd buffering required */ -#pragma loop unroll - for(int i = I2S_CHANS_ADC; i < NUM_USB_CHAN_IN; i++) - { + for(int i = 0; i < I2S_CHANS_ADC; i++) + { + if(readBuffNo) + outuint(c_out, samplesIn_1[i]); + else outuint(c_out, samplesIn_0[i]); - } + } + /* Send over the digi channels - no odd buffering required */ +#pragma loop unroll + for(int i = I2S_CHANS_ADC; i < NUM_USB_CHAN_IN; i++) + { + outuint(c_out, samplesIn_0[i]); + } #endif #if NUM_USB_CHAN_OUT > 0 - if(underflow) - { #pragma loop unroll - for(int i = 0; i < NUM_USB_CHAN_OUT; i++) - { - samplesOut[i] = underflowWord; - } - } - else - { -#pragma loop unroll - for(int i = 0; i < NUM_USB_CHAN_OUT; i++) - { - samplesOut[i] = inuint(c_out); - } - } + for(int i = 0; i < NUM_USB_CHAN_OUT; i++) + { + samplesOut[i] = inuint(c_out); + } #endif #else /* ifndef MIXER */ #if NUM_USB_CHAN_OUT > 0 - if(underflow) - { - for(int i = 0; i < NUM_USB_CHAN_OUT; i++) - { - samplesOut[i] = underflowWord; - } - } - else - { #pragma loop unroll - for(int i = 0; i < NUM_USB_CHAN_OUT; i++) - { - int tmp = inuint(c_out); - samplesOut[i] = tmp; - } - } + for(int i = 0; i < NUM_USB_CHAN_OUT; i++) + { + int tmp = inuint(c_out); + samplesOut[i] = tmp; + } #endif #if NUM_USB_CHAN_IN > 0 #pragma loop unroll - for(int i = 0; i < I2S_CHANS_ADC; i++) - { - if(readBuffNo) - outuint(c_out, samplesIn_1[i]); - else - outuint(c_out, samplesIn_0[i]); - } - /* Send over the digi channels - no odd buffering required */ -#pragma loop unroll - for(int i = I2S_CHANS_ADC; i < NUM_USB_CHAN_IN; i++) - { + for(int i = 0; i < I2S_CHANS_ADC; i++) + { + if(readBuffNo) + outuint(c_out, samplesIn_1[i]); + else outuint(c_out, samplesIn_0[i]); - } -#endif -#endif } + /* Send over the digi channels - no odd buffering required */ +#pragma loop unroll + for(int i = I2S_CHANS_ADC; i < NUM_USB_CHAN_IN; i++) + { + outuint(c_out, samplesIn_0[i]); + } +#endif +#endif + } - return 0; + return 0; } @@ -453,9 +429,6 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out, #if (I2S_CHANS_ADC != 0) || defined(SPDIF) unsigned sample; -#endif - unsigned underflow = 0; -#if NUM_USB_CHAN_OUT > 0 #endif //#if NUM_USB_CHAN_IN > 0 /* Since DAC and ADC buffered ports off by one sample we buffer previous ADC frame */ diff --git a/module_usb_audio/mixer/mixer.xc b/module_usb_audio/mixer/mixer.xc index 28be3cf7..9d637344 100644 --- a/module_usb_audio/mixer/mixer.xc +++ b/module_usb_audio/mixer/mixer.xc @@ -201,9 +201,8 @@ static inline void GiveSamplesToHost(chanend c, xc_ptr ptr, xc_ptr multIn) } #pragma unsafe arrays -static inline void GetSamplesFromHost(chanend c, unsigned underflow) +static inline void GetSamplesFromHost(chanend c) { - if(!underflow) { #pragma loop unroll for (int i=0; i 0 - outuint(c_mixer2, underflow); + outuint(c_mixer2, 0); GiveSamplesToHost(c_host, samples_to_host_map, multIn); outuint(c_mixer2, 0); inuint(c_mixer2); - GetSamplesFromHost(c_host, underflow); + GetSamplesFromHost(c_host); outuint(c_mixer2, 0); inuint(c_mixer2); #ifdef FAST_MIXER @@ -603,10 +598,10 @@ static void mixer1(chanend c_host, chanend c_mix_ctl, chanend c_mixer2) } #else /* IF MAX_MIX_COUNT > 0 */ /* No mixes, this thread runs on its own doing just volume */ - GiveSamplesToDevice(c_mixer2, samples_to_device_map, multOut, underflow); + GiveSamplesToDevice(c_mixer2, samples_to_device_map, multOut); GetSamplesFromDevice(c_mixer2); GiveSamplesToHost(c_host, samples_to_host_map, multIn); - GetSamplesFromHost(c_host, underflow); + GetSamplesFromHost(c_host); #endif } } @@ -619,13 +614,16 @@ static int mixer2_mix2_flag = (DEFAULT_FREQ > 96000); static void mixer2(chanend c_mixer1, chanend c_audio) { int mixed; - unsigned underflow = 0; + unsigned request; while (1) { - outuint(c_mixer1, 0); #pragma xta endpoint "mixer2_req" - inuint(c_audio); + request = inuint(c_audio); + + /* Forward the request on */ + outuint(c_mixer1, request); + if(testct(c_mixer1)) { int sampFreq; @@ -670,8 +668,8 @@ static void mixer2(chanend c_mixer1, chanend c_audio) } else { - underflow = inuint(c_mixer1); - GiveSamplesToDevice(c_audio, samples_to_device_map, multOut, underflow); + (void) inuint(c_mixer1); + GiveSamplesToDevice(c_audio, samples_to_device_map, multOut); inuint(c_mixer1); outuint(c_mixer1, 0); GetSamplesFromDevice(c_audio); diff --git a/module_usb_audio/usb_buffer/decouple.xc b/module_usb_audio/usb_buffer/decouple.xc index 0b9869c8..8dd20c01 100644 --- a/module_usb_audio/usb_buffer/decouple.xc +++ b/module_usb_audio/usb_buffer/decouple.xc @@ -129,10 +129,9 @@ void handle_audio_request(chanend c_mix_out) int space_left; /* Input word that triggered interrupt and handshake back */ - (void) inuint(c_mix_out); - - /* Reply with underflow */ - outuint(c_mix_out, outUnderflow); + unsigned underflowSample = inuint(c_mix_out); + + outuint(c_mix_out, 0); /* If in overflow condition then receive samples and throw away */ if(inOverflow || sampsToWrite == 0) @@ -290,21 +289,11 @@ __builtin_unreachable(); if(outUnderflow) { #pragma xta endpoint "out_underflow" -#if 0 /* We're still pre-buffering, send out 0 samps */ for(int i = 0; i < NUM_USB_CHAN_OUT; i++) { - unsigned sample; - unsigned mode; - GET_SHARED_GLOBAL(sample, g_muteSample); - GET_SHARED_GLOBAL(mode, dsdMode); - - if(mode == DSD_MODE_DOP) - outuint(c_mix_out, 0xFA969600); - else - outuint(c_mix_out, sample); + outuint(c_mix_out, underflowSample); } -#endif /* Calc how many samples left in buffer */ outSamps = g_aud_from_host_wrptr - g_aud_from_host_rdptr; From 6ce5c343b162e4f5aa2b85b782b6c553763987d2 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Mon, 23 Mar 2015 11:35:58 +0000 Subject: [PATCH 10/12] Added 6.11.2 to CHANGELOG --- CHANGELOG.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3b07643d..fdd2b1e8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,10 +1,14 @@ sc_usb_audio Change Log ======================= -HEAD ----- +6.11.2 +------ - RESOLVED: (Major) Enumeration issue when MAX_MIX_COUNT > 0 only. Introduced in mixer - optimisations in 6.11.0. Does not effect designs without mixer enabled. + optimisations in 6.11.0. Only affects designs using mixer functionality. + - RESOLVED: (Normal) Audio buffering request system modified such that the mixer output is + not silent when in underflow case (i.e. host output stream not active) This issue was + introduced with the addition of DSD functionality and only affects designs using + mixer functionality. - RESOLVED: (Minor) Potential build issue due to duplicate labels in inline asm in set_interrupt_handler macro - RESOLVED: (Minor) String descriptor for Clock Selector unit incorrectly reported From f32156da38e40f05dd8602c511754935974f53c5 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Mon, 23 Mar 2015 11:56:16 +0000 Subject: [PATCH 11/12] BCD_DEVICE guarded with ifndef --- CHANGELOG.rst | 2 ++ module_usb_audio/devicedefines.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fdd2b1e8..b7f0c38b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,6 +11,8 @@ sc_usb_audio Change Log mixer functionality. - RESOLVED: (Minor) Potential build issue due to duplicate labels in inline asm in set_interrupt_handler macro + - RESOLVED: (Minor) BCD_DEVICE define in devicedefines.h now guarded by ifndef (caused issues + with DFU test build configs. - RESOLVED: (Minor) String descriptor for Clock Selector unit incorrectly reported - CHANGE: HID report descriptor defines added to shared user_hid.h - CHANGE: Now uses module_adat_rx from sc_adat (local module_usb_audio_adat removed) diff --git a/module_usb_audio/devicedefines.h b/module_usb_audio/devicedefines.h index ce3f747d..b55f56f5 100644 --- a/module_usb_audio/devicedefines.h +++ b/module_usb_audio/devicedefines.h @@ -472,8 +472,9 @@ * * Default: XMOS USB Audio Release version (e.g. 0x0651 for 6.5.1). */ +#ifndef BCD_DEVICE #define BCD_DEVICE ((BCD_DEVICE_J << 8) | ((BCD_DEVICE_M & 0xF) << 4) | (BCD_DEVICE_N & 0xF)) - +#endif /** * @brief Number of supported output stream formats. From 3ee4bdfea961b94c6320088560a166a1b440ccc7 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Mon, 23 Mar 2015 11:56:35 +0000 Subject: [PATCH 12/12] Dead code removal only. --- module_usb_audio/uac_hwresources.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/module_usb_audio/uac_hwresources.h b/module_usb_audio/uac_hwresources.h index a5f67f6e..31181e19 100644 --- a/module_usb_audio/uac_hwresources.h +++ b/module_usb_audio/uac_hwresources.h @@ -27,8 +27,6 @@ #define CLKBLK_USB_RST XS1_CLKBLK_4 /* Clock block passed into L/G series XUD */ #define CLKBLK_FLASHLIB XS1_CLKBLK_5 /* Clock block for use by flash lib */ -/* #define CLKBLK_SPDIF_TX XS1_CLKBLK_1 */ -/* #define CLKBLK_MCLK XS1_CLKBLK_2 */ #define CLKBLK_I2S_BIT XS1_CLKBLK_3 #else @@ -44,11 +42,8 @@ /* use REF for ADAT_RX on U-series */ /* #define CLKBLK_ADAT_RX XS1_CLKBLK_3 */ /* Note, U-series XUD uses clock blocks 4 and 5 - see XUD_Ports.xc */ - #define CLKBLK_FLASHLIB XS1_CLKBLK_5 /* Clock block for use by flash lib */ -/* #define CLKBLK_SPDIF_TX XS1_CLKBLK_1 */ -/* #define CLKBLK_MCLK XS1_CLKBLK_2 */ #define CLKBLK_I2S_BIT XS1_CLKBLK_3 #endif