=Norig) twidx-=Norig;
+ C_MUL(t,scratch[q] , twiddles[twidx] );
+ C_ADDTO( Fout[ k ] ,t);
+ }
+ k += m;
+ }
+ }
+ KISS_FFT_TMP_FREE(scratch);
+}
+
+static
+void kf_work(
+ kiss_fft_cpx * Fout,
+ const kiss_fft_cpx * f,
+ const size_t fstride,
+ int in_stride,
+ int * factors,
+ const kiss_fft_cfg st
+ )
+{
+ kiss_fft_cpx * Fout_beg=Fout;
+ const int p=*factors++; /* the radix */
+ const int m=*factors++; /* stage's fft length/p */
+ const kiss_fft_cpx * Fout_end = Fout + p*m;
+
+#ifdef _OPENMP
+ // use openmp extensions at the
+ // top-level (not recursive)
+ if (fstride==1 && p<=5)
+ {
+ int k;
+
+ // execute the p different work units in different threads
+# pragma omp parallel for
+ for (k=0;k floor_sqrt)
+ p = n; /* no more factors, skip to end */
+ }
+ n /= p;
+ *facbuf++ = p;
+ *facbuf++ = n;
+ } while (n > 1);
+}
+
+/*
+ *
+ * User-callable function to allocate all necessary storage space for the fft.
+ *
+ * The return value is a contiguous block of memory, allocated with malloc. As such,
+ * It can be freed with free(), rather than a kiss_fft-specific function.
+ * */
+kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem )
+{
+ kiss_fft_cfg st=NULL;
+ size_t memneeded = sizeof(struct kiss_fft_state)
+ + sizeof(kiss_fft_cpx)*(nfft-1); /* twiddle factors*/
+
+ if ( lenmem==NULL ) {
+ st = ( kiss_fft_cfg)KISS_FFT_MALLOC( memneeded );
+ }else{
+ if (mem != NULL && *lenmem >= memneeded)
+ st = (kiss_fft_cfg)mem;
+ *lenmem = memneeded;
+ }
+ if (st) {
+ int i;
+ st->nfft=nfft;
+ st->inverse = inverse_fft;
+
+ for (i=0;iinverse)
+ phase *= -1;
+ kf_cexp(st->twiddles+i, phase );
+ }
+
+ kf_factor(nfft,st->factors);
+ }
+ return st;
+}
+
+
+void kiss_fft_stride(kiss_fft_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int in_stride)
+{
+ if (fin == fout) {
+ //NOTE: this is not really an in-place FFT algorithm.
+ //It just performs an out-of-place FFT into a temp buffer
+ kiss_fft_cpx * tmpbuf = (kiss_fft_cpx*)KISS_FFT_TMP_ALLOC( sizeof(kiss_fft_cpx)*st->nfft);
+ kf_work(tmpbuf,fin,1,in_stride, st->factors,st);
+ memcpy(fout,tmpbuf,sizeof(kiss_fft_cpx)*st->nfft);
+ KISS_FFT_TMP_FREE(tmpbuf);
+ }else{
+ kf_work( fout, fin, 1,in_stride, st->factors,st );
+ }
+}
+
+void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout)
+{
+ kiss_fft_stride(cfg,fin,fout,1);
+}
+
+
+void kiss_fft_cleanup(void)
+{
+ // nothing needed any more
+}
+
+int kiss_fft_next_fast_size(int n)
+{
+ while(1) {
+ int m=n;
+ while ( (m%2) == 0 ) m/=2;
+ while ( (m%3) == 0 ) m/=3;
+ while ( (m%5) == 0 ) m/=5;
+ if (m<=1)
+ break; /* n is completely factorable by twos, threes, and fives */
+ n++;
+ }
+ return n;
+}
diff --git a/DSP_API/CODEC2_FREEDV/kiss_fft.h b/DSP_API/CODEC2_FREEDV/kiss_fft.h
new file mode 100644
index 0000000..64c50f4
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/kiss_fft.h
@@ -0,0 +1,124 @@
+#ifndef KISS_FFT_H
+#define KISS_FFT_H
+
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ ATTENTION!
+ If you would like a :
+ -- a utility that will handle the caching of fft objects
+ -- real-only (no imaginary time component ) FFT
+ -- a multi-dimensional FFT
+ -- a command-line utility to perform ffts
+ -- a command-line utility to perform fast-convolution filtering
+
+ Then see kfc.h kiss_fftr.h kiss_fftnd.h fftutil.c kiss_fastfir.c
+ in the tools/ directory.
+*/
+
+#ifdef USE_SIMD
+# include
+# define kiss_fft_scalar __m128
+#define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16)
+#define KISS_FFT_FREE _mm_free
+#else
+#define KISS_FFT_MALLOC malloc
+#define KISS_FFT_FREE free
+#endif
+
+
+#ifdef FIXED_POINT
+#include
+# if (FIXED_POINT == 32)
+# define kiss_fft_scalar int32_t
+# else
+# define kiss_fft_scalar int16_t
+# endif
+#else
+# ifndef kiss_fft_scalar
+/* default is float */
+# define kiss_fft_scalar float
+# endif
+#endif
+
+typedef struct {
+ kiss_fft_scalar r;
+ kiss_fft_scalar i;
+}kiss_fft_cpx;
+
+typedef struct kiss_fft_state* kiss_fft_cfg;
+
+/*
+ * kiss_fft_alloc
+ *
+ * Initialize a FFT (or IFFT) algorithm's cfg/state buffer.
+ *
+ * typical usage: kiss_fft_cfg mycfg=kiss_fft_alloc(1024,0,NULL,NULL);
+ *
+ * The return value from fft_alloc is a cfg buffer used internally
+ * by the fft routine or NULL.
+ *
+ * If lenmem is NULL, then kiss_fft_alloc will allocate a cfg buffer using malloc.
+ * The returned value should be free()d when done to avoid memory leaks.
+ *
+ * The state can be placed in a user supplied buffer 'mem':
+ * If lenmem is not NULL and mem is not NULL and *lenmem is large enough,
+ * then the function places the cfg in mem and the size used in *lenmem
+ * and returns mem.
+ *
+ * If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough),
+ * then the function returns NULL and places the minimum cfg
+ * buffer size in *lenmem.
+ * */
+
+kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem);
+
+/*
+ * kiss_fft(cfg,in_out_buf)
+ *
+ * Perform an FFT on a complex input buffer.
+ * for a forward FFT,
+ * fin should be f[0] , f[1] , ... ,f[nfft-1]
+ * fout will be F[0] , F[1] , ... ,F[nfft-1]
+ * Note that each element is complex and can be accessed like
+ f[k].r and f[k].i
+ * */
+void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);
+
+/*
+ A more generic version of the above function. It reads its input from every Nth sample.
+ * */
+void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride);
+
+/* If kiss_fft_alloc allocated a buffer, it is one contiguous
+ buffer and can be simply free()d when no longer needed*/
+#define kiss_fft_free free
+
+/*
+ Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up
+ your compiler output to call this before you exit.
+*/
+void kiss_fft_cleanup(void);
+
+
+/*
+ * Returns the smallest integer k, such that k>=n and k has only "fast" factors (2,3,5)
+ */
+int kiss_fft_next_fast_size(int n);
+
+/* for real ffts, we need an even size */
+#define kiss_fftr_next_fast_size_real(n) \
+ (kiss_fft_next_fast_size( ((n)+1)>>1)<<1)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/DSP_API/CODEC2_FREEDV/lpc.c b/DSP_API/CODEC2_FREEDV/lpc.c
new file mode 100644
index 0000000..4622dc3
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/lpc.c
@@ -0,0 +1,306 @@
+/*---------------------------------------------------------------------------*\
+
+ FILE........: lpc.c
+ AUTHOR......: David Rowe
+ DATE CREATED: 30 Sep 1990 (!)
+
+ Linear Prediction functions written in C.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+ Copyright (C) 2009-2012 David Rowe
+
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License version 2.1, as
+ published by the Free Software Foundation. This program is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see .
+*/
+
+#define LPC_MAX_N 512 /* maximum no. of samples in frame */
+#define PI 3.141592654 /* mathematical constant */
+
+#define ALPHA 1.0
+#define BETA 0.94
+
+#include
+#include
+#include "defines.h"
+#include "lpc.h"
+
+/*---------------------------------------------------------------------------*\
+
+ pre_emp()
+
+ Pre-emphasise (high pass filter with zero close to 0 Hz) a frame of
+ speech samples. Helps reduce dynamic range of LPC spectrum, giving
+ greater weight and hensea better match to low energy formants.
+
+ Should be balanced by de-emphasis of the output speech.
+
+\*---------------------------------------------------------------------------*/
+
+void pre_emp(
+ float Sn_pre[], /* output frame of speech samples */
+ float Sn[], /* input frame of speech samples */
+ float *mem, /* Sn[-1]single sample memory */
+ int Nsam /* number of speech samples to use */
+)
+{
+ int i;
+
+ for(i=0; i 1.0)
+ k = 0.0;
+
+ a[i][i] = k;
+
+ for(j=1; j<=i-1; j++)
+ a[i][j] = a[i-1][j] + k*a[i-1][i-j]; /* Equation 38c, Makhoul */
+
+ e *= (1-k*k); /* Equation 38d, Makhoul */
+ }
+
+ for(i=1; i<=order; i++)
+ lpcs[i] = a[order][i];
+ lpcs[0] = 1.0;
+}
+
+/*---------------------------------------------------------------------------*\
+
+ inverse_filter()
+
+ Inverse Filter, A(z). Produces an array of residual samples from an array
+ of input samples and linear prediction coefficients.
+
+ The filter memory is stored in the first order samples of the input array.
+
+\*---------------------------------------------------------------------------*/
+
+void inverse_filter(
+ float Sn[], /* Nsam input samples */
+ float a[], /* LPCs for this frame of samples */
+ int Nsam, /* number of samples */
+ float res[], /* Nsam residual samples */
+ int order /* order of LPC */
+)
+{
+ int i,j; /* loop variables */
+
+ for(i=0; i.
+*/
+
+#ifndef __LPC__
+#define __LPC__
+
+#define LPC_MAX_ORDER 20
+
+void pre_emp(float Sn_pre[], float Sn[], float *mem, int Nsam);
+void de_emp(float Sn_se[], float Sn[], float *mem, int Nsam);
+void hanning_window(float Sn[], float Wn[], int Nsam);
+void autocorrelate(float Sn[], float Rn[], int Nsam, int order);
+void levinson_durbin(float R[], float lpcs[], int order);
+void inverse_filter(float Sn[], float a[], int Nsam, float res[], int order);
+void synthesis_filter(float res[], float a[], int Nsam, int order, float Sn_[]);
+void find_aks(float Sn[], float a[], int Nsam, int order, float *E);
+void weight(float ak[], float gamma, int order, float akw[]);
+
+#endif
diff --git a/DSP_API/CODEC2_FREEDV/lsp.c b/DSP_API/CODEC2_FREEDV/lsp.c
new file mode 100644
index 0000000..61c6de1
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/lsp.c
@@ -0,0 +1,321 @@
+/*---------------------------------------------------------------------------*\
+
+ FILE........: lsp.c
+ AUTHOR......: David Rowe
+ DATE CREATED: 24/2/93
+
+
+ This file contains functions for LPC to LSP conversion and LSP to
+ LPC conversion. Note that the LSP coefficients are not in radians
+ format but in the x domain of the unit circle.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+ Copyright (C) 2009 David Rowe
+
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License version 2.1, as
+ published by the Free Software Foundation. This program is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see .
+*/
+
+#include "defines.h"
+#include "lsp.h"
+#include
+#include
+#include
+
+/*---------------------------------------------------------------------------*\
+
+ Introduction to Line Spectrum Pairs (LSPs)
+ ------------------------------------------
+
+ LSPs are used to encode the LPC filter coefficients {ak} for
+ transmission over the channel. LSPs have several properties (like
+ less sensitivity to quantisation noise) that make them superior to
+ direct quantisation of {ak}.
+
+ A(z) is a polynomial of order lpcrdr with {ak} as the coefficients.
+
+ A(z) is transformed to P(z) and Q(z) (using a substitution and some
+ algebra), to obtain something like:
+
+ A(z) = 0.5[P(z)(z+z^-1) + Q(z)(z-z^-1)] (1)
+
+ As you can imagine A(z) has complex zeros all over the z-plane. P(z)
+ and Q(z) have the very neat property of only having zeros _on_ the
+ unit circle. So to find them we take a test point z=exp(jw) and
+ evaluate P (exp(jw)) and Q(exp(jw)) using a grid of points between 0
+ and pi.
+
+ The zeros (roots) of P(z) also happen to alternate, which is why we
+ swap coefficients as we find roots. So the process of finding the
+ LSP frequencies is basically finding the roots of 5th order
+ polynomials.
+
+ The root so P(z) and Q(z) occur in symmetrical pairs at +/-w, hence
+ the name Line Spectrum Pairs (LSPs).
+
+ To convert back to ak we just evaluate (1), "clocking" an impulse
+ thru it lpcrdr times gives us the impulse response of A(z) which is
+ {ak}.
+
+\*---------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: cheb_poly_eva()
+ AUTHOR......: David Rowe
+ DATE CREATED: 24/2/93
+
+ This function evalutes a series of chebyshev polynomials
+
+ FIXME: performing memory allocation at run time is very inefficient,
+ replace with stack variables of MAX_P size.
+
+\*---------------------------------------------------------------------------*/
+
+
+static float
+cheb_poly_eva(float *coef,float x,int order)
+/* float coef[] coefficients of the polynomial to be evaluated */
+/* float x the point where polynomial is to be evaluated */
+/* int order order of the polynomial */
+{
+ int i;
+ float *t,*u,*v,sum;
+ float T[(order / 2) + 1];
+
+ /* Initialize pointers */
+
+ t = T; /* T[i-2] */
+ *t++ = 1.0;
+ u = t--; /* T[i-1] */
+ *u++ = x;
+ v = u--; /* T[i] */
+
+ /* Evaluate chebyshev series formulation using iterative approach */
+
+ for(i=2;i<=order/2;i++)
+ *v++ = (2*x)*(*u++) - *t++; /* T[i] = 2*x*T[i-1] - T[i-2] */
+
+ sum=0.0; /* initialise sum to zero */
+ t = T; /* reset pointer */
+
+ /* Evaluate polynomial and return value also free memory space */
+
+ for(i=0;i<=order/2;i++)
+ sum+=coef[(order/2)-i]**t++;
+
+ return sum;
+}
+
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: lpc_to_lsp()
+ AUTHOR......: David Rowe
+ DATE CREATED: 24/2/93
+
+ This function converts LPC coefficients to LSP coefficients.
+
+\*---------------------------------------------------------------------------*/
+
+int lpc_to_lsp (float *a, int order, float *freq, int nb, float delta)
+/* float *a lpc coefficients */
+/* int order order of LPC coefficients (10) */
+/* float *freq LSP frequencies in radians */
+/* int nb number of sub-intervals (4) */
+/* float delta grid spacing interval (0.02) */
+{
+ float psuml,psumr,psumm,temp_xr,xl,xr,xm = 0;
+ float temp_psumr;
+ int i,j,m,flag,k;
+ float *px; /* ptrs of respective P'(z) & Q'(z) */
+ float *qx;
+ float *p;
+ float *q;
+ float *pt; /* ptr used for cheb_poly_eval()
+ whether P' or Q' */
+ int roots=0; /* number of roots found */
+ float Q[order + 1];
+ float P[order + 1];
+
+ flag = 1;
+ m = order/2; /* order of P'(z) & Q'(z) polynimials */
+
+ /* Allocate memory space for polynomials */
+
+ /* determine P'(z)'s and Q'(z)'s coefficients where
+ P'(z) = P(z)/(1 + z^(-1)) and Q'(z) = Q(z)/(1-z^(-1)) */
+
+ px = P; /* initilaise ptrs */
+ qx = Q;
+ p = px;
+ q = qx;
+ *px++ = 1.0;
+ *qx++ = 1.0;
+ for(i=1;i<=m;i++){
+ *px++ = a[i]+a[order+1-i]-*p++;
+ *qx++ = a[i]-a[order+1-i]+*q++;
+ }
+ px = P;
+ qx = Q;
+ for(i=0;i= -1.0)){
+ xr = xl - delta ; /* interval spacing */
+ psumr = cheb_poly_eva(pt,xr,order);/* poly(xl-delta_x) */
+ temp_psumr = psumr;
+ temp_xr = xr;
+
+ /* if no sign change increment xr and re-evaluate
+ poly(xr). Repeat til sign change. if a sign change has
+ occurred the interval is bisected and then checked again
+ for a sign change which determines in which interval the
+ zero lies in. If there is no sign change between poly(xm)
+ and poly(xl) set interval between xm and xr else set
+ interval between xl and xr and repeat till root is located
+ within the specified limits */
+
+ if(((psumr*psuml)<0.0) || (psumr == 0.0)){
+ roots++;
+
+ psumm=psuml;
+ for(k=0;k<=nb;k++){
+ xm = (xl+xr)/2; /* bisect the interval */
+ psumm=cheb_poly_eva(pt,xm,order);
+ if(psumm*psuml>0.){
+ psuml=psumm;
+ xl=xm;
+ }
+ else{
+ psumr=psumm;
+ xr=xm;
+ }
+ }
+
+ /* once zero is found, reset initial interval to xr */
+ freq[j] = (xm);
+ xl = xm;
+ flag = 0; /* reset flag for next search */
+ }
+ else{
+ psuml=temp_psumr;
+ xl=temp_xr;
+ }
+ }
+ }
+
+ /* convert from x domain to radians */
+
+ for(i=0; i.
+*/
+
+#ifndef __LSP__
+#define __LSP__
+
+int lpc_to_lsp (float *a, int lpcrdr, float *freq, int nb, float delta);
+void lsp_to_lpc(float *freq, float *ak, int lpcrdr);
+
+#endif
diff --git a/DSP_API/CODEC2_FREEDV/machdep.h b/DSP_API/CODEC2_FREEDV/machdep.h
new file mode 100644
index 0000000..4dff9ba
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/machdep.h
@@ -0,0 +1,52 @@
+/*---------------------------------------------------------------------------*\
+
+ FILE........: machdep.h
+ AUTHOR......: David Rowe
+ DATE CREATED: May 2 2013
+
+ Machine dependant functions, e.g. profiling that requires access to a clock
+ counter register.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+ Copyright (C) 2013 David Rowe
+
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License version 2.1, as
+ published by the Free Software Foundation. This program is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see .
+*/
+
+#ifndef __MACHDEP__
+#define __MACHDEP__
+
+#ifdef PROFILE
+#define PROFILE_VAR(...) unsigned int __VA_ARGS__
+#define PROFILE_SAMPLE(timestamp) timestamp = machdep_profile_sample()
+#define PROFILE_SAMPLE_AND_LOG(timestamp, prev_timestamp, label) \
+ timestamp = machdep_profile_sample_and_log(prev_timestamp, label)
+#define PROFILE_SAMPLE_AND_LOG2(prev_timestamp, label) \
+ machdep_profile_sample_and_log(prev_timestamp, label)
+#else
+#define PROFILE_VAR(...)
+#define PROFILE_SAMPLE(timestamp)
+#define PROFILE_SAMPLE_AND_LOG(timestamp, prev_timestamp, label)
+#define PROFILE_SAMPLE_AND_LOG2(prev_timestamp, label)
+#endif
+
+void machdep_profile_init(void);
+void machdep_profile_reset(void);
+unsigned int machdep_profile_sample(void);
+unsigned int machdep_profile_sample_and_log(unsigned int start, char s[]);
+void machdep_profile_print_logged_samples(void);
+
+#endif
diff --git a/DSP_API/CODEC2_FREEDV/nlp.c b/DSP_API/CODEC2_FREEDV/nlp.c
new file mode 100644
index 0000000..9ed0561
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/nlp.c
@@ -0,0 +1,589 @@
+/*---------------------------------------------------------------------------*\
+
+ FILE........: nlp.c
+ AUTHOR......: David Rowe
+ DATE CREATED: 23/3/93
+
+ Non Linear Pitch (NLP) estimation functions.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+ Copyright (C) 2009 David Rowe
+
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License version 2.1, as
+ published by the Free Software Foundation. This program is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see .
+*/
+
+#include "defines.h"
+#include "nlp.h"
+#include "dump.h"
+#include "kiss_fft.h"
+#undef PROFILE
+#include "machdep.h"
+
+#include
+#include
+#include
+
+/*---------------------------------------------------------------------------*\
+
+ DEFINES
+
+\*---------------------------------------------------------------------------*/
+
+#define PMAX_M 600 /* maximum NLP analysis window size */
+#define COEFF 0.95 /* notch filter parameter */
+#define PE_FFT_SIZE 512 /* DFT size for pitch estimation */
+#define DEC 5 /* decimation factor */
+#define SAMPLE_RATE 8000
+#define PI 3.141592654 /* mathematical constant */
+#define T 0.1 /* threshold for local minima candidate */
+#define F0_MAX 500
+#define CNLP 0.3 /* post processor constant */
+#define NLP_NTAP 48 /* Decimation LPF order */
+
+//#undef DUMP
+
+/*---------------------------------------------------------------------------*\
+
+ GLOBALS
+
+\*---------------------------------------------------------------------------*/
+
+/* 48 tap 600Hz low pass FIR filter coefficients */
+
+const float nlp_fir[] = {
+ -1.0818124e-03,
+ -1.1008344e-03,
+ -9.2768838e-04,
+ -4.2289438e-04,
+ 5.5034190e-04,
+ 2.0029849e-03,
+ 3.7058509e-03,
+ 5.1449415e-03,
+ 5.5924666e-03,
+ 4.3036754e-03,
+ 8.0284511e-04,
+ -4.8204610e-03,
+ -1.1705810e-02,
+ -1.8199275e-02,
+ -2.2065282e-02,
+ -2.0920610e-02,
+ -1.2808831e-02,
+ 3.2204775e-03,
+ 2.6683811e-02,
+ 5.5520624e-02,
+ 8.6305944e-02,
+ 1.1480192e-01,
+ 1.3674206e-01,
+ 1.4867556e-01,
+ 1.4867556e-01,
+ 1.3674206e-01,
+ 1.1480192e-01,
+ 8.6305944e-02,
+ 5.5520624e-02,
+ 2.6683811e-02,
+ 3.2204775e-03,
+ -1.2808831e-02,
+ -2.0920610e-02,
+ -2.2065282e-02,
+ -1.8199275e-02,
+ -1.1705810e-02,
+ -4.8204610e-03,
+ 8.0284511e-04,
+ 4.3036754e-03,
+ 5.5924666e-03,
+ 5.1449415e-03,
+ 3.7058509e-03,
+ 2.0029849e-03,
+ 5.5034190e-04,
+ -4.2289438e-04,
+ -9.2768838e-04,
+ -1.1008344e-03,
+ -1.0818124e-03
+};
+
+typedef struct {
+ int m;
+ float w[PMAX_M/DEC]; /* DFT window */
+ float sq[PMAX_M]; /* squared speech samples */
+ float mem_x,mem_y; /* memory for notch filter */
+ float mem_fir[NLP_NTAP]; /* decimation FIR filter memory */
+ kiss_fft_cfg fft_cfg; /* kiss FFT config */
+} NLP;
+
+float test_candidate_mbe(COMP Sw[], COMP W[], float f0);
+float post_process_mbe(COMP Fw[], int pmin, int pmax, float gmax, COMP Sw[], COMP W[], float *prev_Wo);
+float post_process_sub_multiples(COMP Fw[],
+ int pmin, int pmax, float gmax, int gmax_bin,
+ float *prev_Wo);
+
+/*---------------------------------------------------------------------------*\
+
+ nlp_create()
+
+ Initialisation function for NLP pitch estimator.
+
+\*---------------------------------------------------------------------------*/
+
+void *nlp_create(
+int m /* analysis window size */
+)
+{
+ NLP *nlp;
+ int i;
+
+ assert(m <= PMAX_M);
+
+ nlp = (NLP*)malloc(sizeof(NLP));
+ if (nlp == NULL)
+ return NULL;
+
+ nlp->m = m;
+ for(i=0; iw[i] = 0.5 - 0.5*cosf(2*PI*i/(m/DEC-1));
+ }
+
+ for(i=0; isq[i] = 0.0;
+ nlp->mem_x = 0.0;
+ nlp->mem_y = 0.0;
+ for(i=0; imem_fir[i] = 0.0;
+
+ nlp->fft_cfg = kiss_fft_alloc (PE_FFT_SIZE, 0, NULL, NULL);
+ assert(nlp->fft_cfg != NULL);
+
+ return (void*)nlp;
+}
+
+/*---------------------------------------------------------------------------*\
+
+ nlp_destroy()
+
+ Shut down function for NLP pitch estimator.
+
+\*---------------------------------------------------------------------------*/
+
+void nlp_destroy(void *nlp_state)
+{
+ NLP *nlp;
+ assert(nlp_state != NULL);
+ nlp = (NLP*)nlp_state;
+
+ KISS_FFT_FREE(nlp->fft_cfg);
+ free(nlp_state);
+}
+
+/*---------------------------------------------------------------------------*\
+
+ nlp()
+
+ Determines the pitch in samples using the Non Linear Pitch (NLP)
+ algorithm [1]. Returns the fundamental in Hz. Note that the actual
+ pitch estimate is for the centre of the M sample Sn[] vector, not
+ the current N sample input vector. This is (I think) a delay of 2.5
+ frames with N=80 samples. You should align further analysis using
+ this pitch estimate to be centred on the middle of Sn[].
+
+ Two post processors have been tried, the MBE version (as discussed
+ in [1]), and a post processor that checks sub-multiples. Both
+ suffer occasional gross pitch errors (i.e. neither are perfect). In
+ the presence of background noise the sub-multiple algorithm tends
+ towards low F0 which leads to better sounding background noise than
+ the MBE post processor.
+
+ A good way to test and develop the NLP pitch estimator is using the
+ tnlp (codec2/unittest) and the codec2/octave/plnlp.m Octave script.
+
+ A pitch tracker searching a few frames forward and backward in time
+ would be a useful addition.
+
+ References:
+
+ [1] http://www.itr.unisa.edu.au/~steven/thesis/dgr.pdf Chapter 4
+
+\*---------------------------------------------------------------------------*/
+
+float nlp(
+ void *nlp_state,
+ float Sn[], /* input speech vector */
+ int n, /* frames shift (no. new samples in Sn[]) */
+ int pmin, /* minimum pitch value */
+ int pmax, /* maximum pitch value */
+ float *pitch, /* estimated pitch period in samples */
+ COMP Sw[], /* Freq domain version of Sn[] */
+ COMP W[], /* Freq domain window */
+ float *prev_Wo
+)
+{
+ NLP *nlp;
+ float notch; /* current notch filter output */
+ COMP fw[PE_FFT_SIZE]; /* DFT of squared signal (input) */
+ COMP Fw[PE_FFT_SIZE]; /* DFT of squared signal (output) */
+ float gmax;
+ int gmax_bin;
+ int m, i,j;
+ float best_f0;
+ PROFILE_VAR(start, tnotch, filter, peakpick, window, fft, magsq, shiftmem);
+
+ assert(nlp_state != NULL);
+ nlp = (NLP*)nlp_state;
+ m = nlp->m;
+
+ PROFILE_SAMPLE(start);
+
+ /* Square, notch filter at DC, and LP filter vector */
+
+ for(i=m-n; isq[i] = Sn[i]*Sn[i];
+
+ for(i=m-n; isq[i] - nlp->mem_x;
+ notch += COEFF*nlp->mem_y;
+ nlp->mem_x = nlp->sq[i];
+ nlp->mem_y = notch;
+ nlp->sq[i] = notch + 1.0; /* With 0 input vectors to codec,
+ kiss_fft() would take a long
+ time to execute when running in
+ real time. Problem was traced
+ to kiss_fft function call in
+ this function. Adding this small
+ constant fixed problem. Not
+ exactly sure why. */
+ }
+
+ PROFILE_SAMPLE_AND_LOG(tnotch, start, " square and notch");
+
+ for(i=m-n; imem_fir[j] = nlp->mem_fir[j+1];
+ nlp->mem_fir[NLP_NTAP-1] = nlp->sq[i];
+
+ nlp->sq[i] = 0.0;
+ for(j=0; jsq[i] += nlp->mem_fir[j]*nlp_fir[j];
+ }
+
+ PROFILE_SAMPLE_AND_LOG(filter, tnotch, " filter");
+
+ /* Decimate and DFT */
+
+ for(i=0; isq[i*DEC]*nlp->w[i];
+ }
+ PROFILE_SAMPLE_AND_LOG(window, filter, " window");
+ #ifdef DUMP
+ dump_dec(Fw);
+ #endif
+
+ kiss_fft(nlp->fft_cfg, (kiss_fft_cpx *)fw, (kiss_fft_cpx *)Fw);
+ PROFILE_SAMPLE_AND_LOG(fft, window, " fft");
+
+ for(i=0; isq);
+ dump_Fw(Fw);
+ #endif
+
+ /* find global peak */
+
+ gmax = 0.0;
+ gmax_bin = PE_FFT_SIZE*DEC/pmax;
+ for(i=PE_FFT_SIZE*DEC/pmax; i<=PE_FFT_SIZE*DEC/pmin; i++) {
+ if (Fw[i].real > gmax) {
+ gmax = Fw[i].real;
+ gmax_bin = i;
+ }
+ }
+
+ PROFILE_SAMPLE_AND_LOG(peakpick, magsq, " peak pick");
+
+ //#define POST_PROCESS_MBE
+ #ifdef POST_PROCESS_MBE
+ best_f0 = post_process_mbe(Fw, pmin, pmax, gmax, Sw, W, prev_Wo);
+ #else
+ best_f0 = post_process_sub_multiples(Fw, pmin, pmax, gmax, gmax_bin, prev_Wo);
+ #endif
+
+ PROFILE_SAMPLE_AND_LOG(shiftmem, peakpick, " post process");
+
+ /* Shift samples in buffer to make room for new samples */
+
+ for(i=0; isq[i] = nlp->sq[i+n];
+
+ /* return pitch and F0 estimate */
+
+ *pitch = (float)SAMPLE_RATE/best_f0;
+
+ PROFILE_SAMPLE_AND_LOG2(shiftmem, " shift mem");
+
+ PROFILE_SAMPLE_AND_LOG2(start, " nlp int");
+
+ return(best_f0);
+}
+
+/*---------------------------------------------------------------------------*\
+
+ post_process_sub_multiples()
+
+ Given the global maximma of Fw[] we search integer submultiples for
+ local maxima. If local maxima exist and they are above an
+ experimentally derived threshold (OK a magic number I pulled out of
+ the air) we choose the submultiple as the F0 estimate.
+
+ The rational for this is that the lowest frequency peak of Fw[]
+ should be F0, as Fw[] can be considered the autocorrelation function
+ of Sw[] (the speech spectrum). However sometimes due to phase
+ effects the lowest frequency maxima may not be the global maxima.
+
+ This works OK in practice and favours low F0 values in the presence
+ of background noise which means the sinusoidal codec does an OK job
+ of synthesising the background noise. High F0 in background noise
+ tends to sound more periodic introducing annoying artifacts.
+
+\*---------------------------------------------------------------------------*/
+
+float post_process_sub_multiples(COMP Fw[],
+ int pmin, int pmax, float gmax, int gmax_bin,
+ float *prev_Wo)
+{
+ int min_bin, cmax_bin;
+ int mult;
+ float thresh, best_f0;
+ int b, bmin, bmax, lmax_bin;
+ float lmax;
+ int prev_f0_bin;
+
+ /* post process estimate by searching submultiples */
+
+ mult = 2;
+ min_bin = PE_FFT_SIZE*DEC/pmax;
+ cmax_bin = gmax_bin;
+ prev_f0_bin = *prev_Wo*(4000.0/PI)*(PE_FFT_SIZE*DEC)/SAMPLE_RATE;
+
+ while(gmax_bin/mult >= min_bin) {
+
+ b = gmax_bin/mult; /* determine search interval */
+ bmin = 0.8*b;
+ bmax = 1.2*b;
+ if (bmin < min_bin)
+ bmin = min_bin;
+
+ /* lower threshold to favour previous frames pitch estimate,
+ this is a form of pitch tracking */
+
+ if ((prev_f0_bin > bmin) && (prev_f0_bin < bmax))
+ thresh = CNLP*0.5*gmax;
+ else
+ thresh = CNLP*gmax;
+
+ lmax = 0;
+ lmax_bin = bmin;
+ for (b=bmin; b<=bmax; b++) /* look for maximum in interval */
+ if (Fw[b].real > lmax) {
+ lmax = Fw[b].real;
+ lmax_bin = b;
+ }
+
+ if (lmax > thresh)
+ if ((lmax > Fw[lmax_bin-1].real) && (lmax > Fw[lmax_bin+1].real)) {
+ cmax_bin = lmax_bin;
+ }
+
+ mult++;
+ }
+
+ best_f0 = (float)cmax_bin*SAMPLE_RATE/(PE_FFT_SIZE*DEC);
+
+ return best_f0;
+}
+
+/*---------------------------------------------------------------------------*\
+
+ post_process_mbe()
+
+ Use the MBE pitch estimation algorithm to evaluate pitch candidates. This
+ works OK but the accuracy at low F0 is affected by NW, the analysis window
+ size used for the DFT of the input speech Sw[]. Also favours high F0 in
+ the presence of background noise which causes periodic artifacts in the
+ synthesised speech.
+
+\*---------------------------------------------------------------------------*/
+
+float post_process_mbe(COMP Fw[], int pmin, int pmax, float gmax, COMP Sw[], COMP W[], float *prev_Wo)
+{
+ float candidate_f0;
+ float f0,best_f0; /* fundamental frequency */
+ float e,e_min; /* MBE cost function */
+ int i;
+ #ifdef DUMP
+ float e_hz[F0_MAX];
+ #endif
+ #if !defined(NDEBUG) || defined(DUMP)
+ int bin;
+ #endif
+ float f0_min, f0_max;
+ float f0_start, f0_end;
+
+ f0_min = (float)SAMPLE_RATE/pmax;
+ f0_max = (float)SAMPLE_RATE/pmin;
+
+ /* Now look for local maxima. Each local maxima is a candidate
+ that we test using the MBE pitch estimation algotithm */
+
+ #ifdef DUMP
+ for(i=0; i Fw[i-1].real) && (Fw[i].real > Fw[i+1].real)) {
+
+ /* local maxima found, lets test if it's big enough */
+
+ if (Fw[i].real > T*gmax) {
+
+ /* OK, sample MBE cost function over +/- 10Hz range in 2.5Hz steps */
+
+ candidate_f0 = (float)i*SAMPLE_RATE/(PE_FFT_SIZE*DEC);
+ f0_start = candidate_f0-20;
+ f0_end = candidate_f0+20;
+ if (f0_start < f0_min) f0_start = f0_min;
+ if (f0_end > f0_max) f0_end = f0_max;
+
+ for(f0=f0_start; f0<=f0_end; f0+= 2.5) {
+ e = test_candidate_mbe(Sw, W, f0);
+ #if !defined(NDEBUG) || defined(DUMP)
+ bin = floor(f0); assert((bin > 0) && (bin < F0_MAX));
+ #endif
+ #ifdef DUMP
+ e_hz[bin] = e;
+ #endif
+ if (e < e_min) {
+ e_min = e;
+ best_f0 = f0;
+ }
+ }
+
+ }
+ }
+ }
+
+ /* finally sample MBE cost function around previous pitch estimate
+ (form of pitch tracking) */
+
+ candidate_f0 = *prev_Wo * SAMPLE_RATE/TWO_PI;
+ f0_start = candidate_f0-20;
+ f0_end = candidate_f0+20;
+ if (f0_start < f0_min) f0_start = f0_min;
+ if (f0_end > f0_max) f0_end = f0_max;
+
+ for(f0=f0_start; f0<=f0_end; f0+= 2.5) {
+ e = test_candidate_mbe(Sw, W, f0);
+ #if !defined(NDEBUG) || defined(DUMP)
+ bin = floor(f0); assert((bin > 0) && (bin < F0_MAX));
+ #endif
+ #ifdef DUMP
+ e_hz[bin] = e;
+ #endif
+ if (e < e_min) {
+ e_min = e;
+ best_f0 = f0;
+ }
+ }
+
+ #ifdef DUMP
+ dump_e(e_hz);
+ #endif
+
+ return best_f0;
+}
+
+/*---------------------------------------------------------------------------*\
+
+ test_candidate_mbe()
+
+ Returns the error of the MBE cost function for the input f0.
+
+ Note: I think a lot of the operations below can be simplified as
+ W[].imag = 0 and has been normalised such that den always equals 1.
+
+\*---------------------------------------------------------------------------*/
+
+float test_candidate_mbe(
+ COMP Sw[],
+ COMP W[],
+ float f0
+)
+{
+ COMP Sw_[FFT_ENC]; /* DFT of all voiced synthesised signal */
+ int l,al,bl,m; /* loop variables */
+ COMP Am; /* amplitude sample for this band */
+ int offset; /* centers Hw[] about current harmonic */
+ float den; /* denominator of Am expression */
+ float error; /* accumulated error between originl and synthesised */
+ float Wo; /* current "test" fundamental freq. */
+ int L;
+
+ L = floor((SAMPLE_RATE/2.0)/f0);
+ Wo = f0*(2*PI/SAMPLE_RATE);
+
+ error = 0.0;
+
+ /* Just test across the harmonics in the first 1000 Hz (L/4) */
+
+ for(l=1; l.
+*/
+
+#ifndef __NLP__
+#define __NLP__
+
+#include "comp.h"
+
+void *nlp_create(int m);
+void nlp_destroy(void *nlp_state);
+float nlp(void *nlp_state, float Sn[], int n, int pmin, int pmax,
+ float *pitch, COMP Sw[], COMP W[], float *prev_Wo);
+
+#endif
diff --git a/DSP_API/CODEC2_FREEDV/os.h b/DSP_API/CODEC2_FREEDV/os.h
new file mode 100644
index 0000000..ee25028
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/os.h
@@ -0,0 +1,53 @@
+/* Generate using fir1(47,1/2) in Octave */
+
+const float fdmdv_os_filter[]= {
+ -0.0008215855034550382,
+ -0.0007833023901802921,
+ 0.001075563790768233,
+ 0.001199092367787555,
+ -0.001765309502928316,
+ -0.002055372115328064,
+ 0.002986877604154257,
+ 0.003462567920638414,
+ -0.004856570111126334,
+ -0.005563143845031497,
+ 0.007533613299748122,
+ 0.008563932468880897,
+ -0.01126857129039911,
+ -0.01280782411693687,
+ 0.01651443896361847,
+ 0.01894875110322284,
+ -0.02421604439474981,
+ -0.02845107338464062,
+ 0.03672973563400258,
+ 0.04542046150312214,
+ -0.06189165826716491,
+ -0.08721876380763803,
+ 0.1496157094199961,
+ 0.4497962274137046,
+ 0.4497962274137046,
+ 0.1496157094199961,
+ -0.08721876380763803,
+ -0.0618916582671649,
+ 0.04542046150312216,
+ 0.03672973563400257,
+ -0.02845107338464062,
+ -0.02421604439474984,
+ 0.01894875110322284,
+ 0.01651443896361848,
+ -0.01280782411693687,
+ -0.0112685712903991,
+ 0.008563932468880899,
+ 0.007533613299748123,
+ -0.005563143845031501,
+ -0.004856570111126346,
+ 0.003462567920638419,
+ 0.002986877604154259,
+ -0.002055372115328063,
+ -0.001765309502928318,
+ 0.001199092367787557,
+ 0.001075563790768233,
+ -0.0007833023901802925,
+ -0.0008215855034550383
+};
+
diff --git a/DSP_API/CODEC2_FREEDV/pack.c b/DSP_API/CODEC2_FREEDV/pack.c
new file mode 100644
index 0000000..b062564
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/pack.c
@@ -0,0 +1,140 @@
+/*
+ Copyright (C) 2010 Perens LLC
+
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License version 2.1, as
+ published by the Free Software Foundation. This program is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see .
+*/
+
+#include "defines.h"
+#include "quantise.h"
+#include
+
+/* Compile-time constants */
+/* Size of unsigned char in bits. Assumes 8 bits-per-char. */
+static const unsigned int WordSize = 8;
+
+/* Mask to pick the bit component out of bitIndex. */
+static const unsigned int IndexMask = 0x7;
+
+/* Used to pick the word component out of bitIndex. */
+static const unsigned int ShiftRight = 3;
+
+/** Pack a bit field into a bit string, encoding the field in Gray code.
+ *
+ * The output is an array of unsigned char data. The fields are efficiently
+ * packed into the bit string. The Gray coding is a naive attempt to reduce
+ * the effect of single-bit errors, we expect to do a better job as the
+ * codec develops.
+ *
+ * This code would be simpler if it just set one bit at a time in the string,
+ * but would hit the same cache line more often. I'm not sure the complexity
+ * gains us anything here.
+ *
+ * Although field is currently of int type rather than unsigned for
+ * compatibility with the rest of the code, indices are always expected to
+ * be >= 0.
+ */
+void
+pack(
+ unsigned char * bitArray, /* The output bit string. */
+ unsigned int * bitIndex, /* Index into the string in BITS, not bytes.*/
+ int field, /* The bit field to be packed. */
+ unsigned int fieldWidth/* Width of the field in BITS, not bytes. */
+ )
+{
+ pack_natural_or_gray(bitArray, bitIndex, field, fieldWidth, 1);
+}
+
+void
+pack_natural_or_gray(
+ unsigned char * bitArray, /* The output bit string. */
+ unsigned int * bitIndex, /* Index into the string in BITS, not bytes.*/
+ int field, /* The bit field to be packed. */
+ unsigned int fieldWidth,/* Width of the field in BITS, not bytes. */
+ unsigned int gray /* non-zero for gray coding */
+ )
+{
+ if (gray) {
+ /* Convert the field to Gray code */
+ field = (field >> 1) ^ field;
+ }
+
+ do {
+ unsigned int bI = *bitIndex;
+ unsigned int bitsLeft = WordSize - (bI & IndexMask);
+ unsigned int sliceWidth =
+ bitsLeft < fieldWidth ? bitsLeft : fieldWidth;
+ unsigned int wordIndex = bI >> ShiftRight;
+
+ bitArray[wordIndex] |=
+ ((unsigned char)((field >> (fieldWidth - sliceWidth))
+ << (bitsLeft - sliceWidth)));
+
+ *bitIndex = bI + sliceWidth;
+ fieldWidth -= sliceWidth;
+ } while ( fieldWidth != 0 );
+}
+
+/** Unpack a field from a bit string, converting from Gray code to binary.
+ *
+ */
+int
+unpack(
+ const unsigned char * bitArray, /* The input bit string. */
+ unsigned int * bitIndex, /* Index into the string in BITS, not bytes.*/
+ unsigned int fieldWidth/* Width of the field in BITS, not bytes. */
+ )
+{
+ return unpack_natural_or_gray(bitArray, bitIndex, fieldWidth, 1);
+}
+
+/** Unpack a field from a bit string, to binary, optionally using
+ * natural or Gray code.
+ *
+ */
+int
+unpack_natural_or_gray(
+ const unsigned char * bitArray, /* The input bit string. */
+ unsigned int * bitIndex, /* Index into the string in BITS, not bytes.*/
+ unsigned int fieldWidth,/* Width of the field in BITS, not bytes. */
+ unsigned int gray /* non-zero for Gray coding */
+ )
+{
+ unsigned int field = 0;
+ unsigned int t;
+
+ do {
+ unsigned int bI = *bitIndex;
+ unsigned int bitsLeft = WordSize - (bI & IndexMask);
+ unsigned int sliceWidth =
+ bitsLeft < fieldWidth ? bitsLeft : fieldWidth;
+
+ field |= (((bitArray[bI >> ShiftRight] >> (bitsLeft - sliceWidth)) & ((1 << sliceWidth) - 1)) << (fieldWidth - sliceWidth));
+
+ *bitIndex = bI + sliceWidth;
+ fieldWidth -= sliceWidth;
+ } while ( fieldWidth != 0 );
+
+ if (gray) {
+ /* Convert from Gray code to binary. Works for maximum 8-bit fields. */
+ t = field ^ (field >> 8);
+ t ^= (t >> 4);
+ t ^= (t >> 2);
+ t ^= (t >> 1);
+ }
+ else {
+ t = field;
+ }
+
+ return t;
+}
diff --git a/DSP_API/CODEC2_FREEDV/phase.c b/DSP_API/CODEC2_FREEDV/phase.c
new file mode 100644
index 0000000..08a2cf4
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/phase.c
@@ -0,0 +1,199 @@
+/*---------------------------------------------------------------------------*\
+
+ FILE........: phase.c
+ AUTHOR......: David Rowe
+ DATE CREATED: 1/2/09
+
+ Functions for modelling and synthesising phase.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+ Copyright (C) 2009 David Rowe
+
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License version 2.1, as
+ published by the Free Software Foundation. This program is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not,see .
+*/
+
+#include "defines.h"
+#include "phase.h"
+#include "kiss_fft.h"
+#include "comp.h"
+#include "sine.h"
+
+#include
+#include
+#include
+#include
+#include
+
+
+/*---------------------------------------------------------------------------*\
+
+ phase_synth_zero_order()
+
+ Synthesises phases based on SNR and a rule based approach. No phase
+ parameters are required apart from the SNR (which can be reduced to a
+ 1 bit V/UV decision per frame).
+
+ The phase of each harmonic is modelled as the phase of a LPC
+ synthesis filter excited by an impulse. Unlike the first order
+ model the position of the impulse is not transmitted, so we create
+ an excitation pulse train using a rule based approach.
+
+ Consider a pulse train with a pulse starting time n=0, with pulses
+ repeated at a rate of Wo, the fundamental frequency. A pulse train
+ in the time domain is equivalent to harmonics in the frequency
+ domain. We can make an excitation pulse train using a sum of
+ sinsusoids:
+
+ for(m=1; m<=L; m++)
+ ex[n] = cos(m*Wo*n)
+
+ Note: the Octave script ../octave/phase.m is an example of this if
+ you would like to try making a pulse train.
+
+ The phase of each excitation harmonic is:
+
+ arg(E[m]) = mWo
+
+ where E[m] are the complex excitation (freq domain) samples,
+ arg(x), just returns the phase of a complex sample x.
+
+ As we don't transmit the pulse position for this model, we need to
+ synthesise it. Now the excitation pulses occur at a rate of Wo.
+ This means the phase of the first harmonic advances by N samples
+ over a synthesis frame of N samples. For example if Wo is pi/20
+ (200 Hz), then over a 10ms frame (N=80 samples), the phase of the
+ first harmonic would advance (pi/20)*80 = 4*pi or two complete
+ cycles.
+
+ We generate the excitation phase of the fundamental (first
+ harmonic):
+
+ arg[E[1]] = Wo*N;
+
+ We then relate the phase of the m-th excitation harmonic to the
+ phase of the fundamental as:
+
+ arg(E[m]) = m*arg(E[1])
+
+ This E[m] then gets passed through the LPC synthesis filter to
+ determine the final harmonic phase.
+
+ Comparing to speech synthesised using original phases:
+
+ - Through headphones speech synthesised with this model is not as
+ good. Through a loudspeaker it is very close to original phases.
+
+ - If there are voicing errors, the speech can sound clicky or
+ staticy. If V speech is mistakenly declared UV, this model tends to
+ synthesise impulses or clicks, as there is usually very little shift or
+ dispersion through the LPC filter.
+
+ - When combined with LPC amplitude modelling there is an additional
+ drop in quality. I am not sure why, theory is interformant energy
+ is raised making any phase errors more obvious.
+
+ NOTES:
+
+ 1/ This synthesis model is effectively the same as a simple LPC-10
+ vocoders, and yet sounds much better. Why? Conventional wisdom
+ (AMBE, MELP) says mixed voicing is required for high quality
+ speech.
+
+ 2/ I am pretty sure the Lincoln Lab sinusoidal coding guys (like xMBE
+ also from MIT) first described this zero phase model, I need to look
+ up the paper.
+
+ 3/ Note that this approach could cause some discontinuities in
+ the phase at the edge of synthesis frames, as no attempt is made
+ to make sure that the phase tracks are continuous (the excitation
+ phases are continuous, but not the final phases after filtering
+ by the LPC spectra). Technically this is a bad thing. However
+ this may actually be a good thing, disturbing the phase tracks a
+ bit. More research needed, e.g. test a synthesis model that adds
+ a small delta-W to make phase tracks line up for voiced
+ harmonics.
+
+\*---------------------------------------------------------------------------*/
+
+void phase_synth_zero_order(
+ kiss_fft_cfg fft_fwd_cfg,
+ MODEL *model,
+ float *ex_phase, /* excitation phase of fundamental */
+ COMP A[]
+)
+{
+ int m, b;
+ float phi_, new_phi, r;
+ COMP Ex[MAX_AMP+1]; /* excitation samples */
+ COMP A_[MAX_AMP+1]; /* synthesised harmonic samples */
+ COMP H[MAX_AMP+1]; /* LPC freq domain samples */
+
+ r = TWO_PI/(FFT_ENC);
+
+ /* Sample phase at harmonics */
+
+ for(m=1; m<=model->L; m++) {
+ b = (int)(m*model->Wo/r + 0.5);
+ phi_ = -atan2f(A[b].imag, A[b].real);
+ H[m].real = cosf(phi_);
+ H[m].imag = sinf(phi_);
+ }
+
+ /*
+ Update excitation fundamental phase track, this sets the position
+ of each pitch pulse during voiced speech. After much experiment
+ I found that using just this frame's Wo improved quality for UV
+ sounds compared to interpolating two frames Wo like this:
+
+ ex_phase[0] += (*prev_Wo+model->Wo)*N/2;
+ */
+
+ ex_phase[0] += (model->Wo)*N;
+ ex_phase[0] -= TWO_PI*floorf(ex_phase[0]/TWO_PI + 0.5);
+
+ for(m=1; m<=model->L; m++) {
+
+ /* generate excitation */
+
+ if (model->voiced) {
+
+ Ex[m].real = cosf(ex_phase[0]*m);
+ Ex[m].imag = sinf(ex_phase[0]*m);
+ }
+ else {
+
+ /* When a few samples were tested I found that LPC filter
+ phase is not needed in the unvoiced case, but no harm in
+ keeping it.
+ */
+ float phi = TWO_PI*(float)codec2_rand()/CODEC2_RAND_MAX;
+ Ex[m].real = cosf(phi);
+ Ex[m].imag = sinf(phi);
+ }
+
+ /* filter using LPC filter */
+
+ A_[m].real = H[m].real*Ex[m].real - H[m].imag*Ex[m].imag;
+ A_[m].imag = H[m].imag*Ex[m].real + H[m].real*Ex[m].imag;
+
+ /* modify sinusoidal phase */
+
+ new_phi = atan2f(A_[m].imag, A_[m].real+1E-12);
+ model->phi[m] = new_phi;
+ }
+
+}
+
diff --git a/DSP_API/CODEC2_FREEDV/phase.h b/DSP_API/CODEC2_FREEDV/phase.h
new file mode 100644
index 0000000..03e1c50
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/phase.h
@@ -0,0 +1,39 @@
+/*---------------------------------------------------------------------------*\
+
+ FILE........: phase.h
+ AUTHOR......: David Rowe
+ DATE CREATED: 1/2/09
+
+ Functions for modelling phase.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+ Copyright (C) 2009 David Rowe
+
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License version 2.1, as
+ published by the Free Software Foundation. This program is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see .
+*/
+
+#ifndef __PHASE__
+#define __PHASE__
+
+#include "kiss_fft.h"
+#include "comp.h"
+
+void phase_synth_zero_order(kiss_fft_cfg fft_dec_cfg,
+ MODEL *model,
+ float *ex_phase,
+ COMP A[]);
+
+#endif
diff --git a/DSP_API/CODEC2_FREEDV/pilot_coeff.h b/DSP_API/CODEC2_FREEDV/pilot_coeff.h
new file mode 100644
index 0000000..b284af9
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/pilot_coeff.h
@@ -0,0 +1,34 @@
+/* Generated by pilot_coeff_file() Octave function */
+
+const float pilot_coeff[]={
+ 0.00223001,
+ 0.00301037,
+ 0.00471258,
+ 0.0075934,
+ 0.0118145,
+ 0.0174153,
+ 0.0242969,
+ 0.0322204,
+ 0.0408199,
+ 0.0496286,
+ 0.0581172,
+ 0.0657392,
+ 0.0719806,
+ 0.0764066,
+ 0.0787022,
+ 0.0787022,
+ 0.0764066,
+ 0.0719806,
+ 0.0657392,
+ 0.0581172,
+ 0.0496286,
+ 0.0408199,
+ 0.0322204,
+ 0.0242969,
+ 0.0174153,
+ 0.0118145,
+ 0.0075934,
+ 0.00471258,
+ 0.00301037,
+ 0.00223001
+};
diff --git a/DSP_API/CODEC2_FREEDV/postfilter.c b/DSP_API/CODEC2_FREEDV/postfilter.c
new file mode 100644
index 0000000..f347658
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/postfilter.c
@@ -0,0 +1,142 @@
+/*---------------------------------------------------------------------------*\
+
+ FILE........: postfilter.c
+ AUTHOR......: David Rowe
+ DATE CREATED: 13/09/09
+
+ Postfilter to improve sound quality for speech with high levels of
+ background noise. Unlike mixed-excitation models requires no bits
+ to be transmitted to handle background noise.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+ Copyright (C) 2009 David Rowe
+
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License version 2.1, as
+ published by the Free Software Foundation. This program is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see .
+*/
+
+#include
+#include
+#include
+#include
+
+#include "defines.h"
+#include "comp.h"
+#include "dump.h"
+#include "sine.h"
+#include "postfilter.h"
+
+/*---------------------------------------------------------------------------*\
+
+ DEFINES
+
+\*---------------------------------------------------------------------------*/
+
+#define BG_THRESH 40.0 /* only consider low levels signals for bg_est */
+#define BG_BETA 0.1 /* averaging filter constant */
+#define BG_MARGIN 6.0 /* harmonics this far above BG noise are
+ randomised. Helped make bg noise less
+ spikey (impulsive) for mmt1, but speech was
+ perhaps a little rougher.
+ */
+
+/*---------------------------------------------------------------------------*\
+
+ postfilter()
+
+ The post filter is designed to help with speech corrupted by
+ background noise. The zero phase model tends to make speech with
+ background noise sound "clicky". With high levels of background
+ noise the low level inter-formant parts of the spectrum will contain
+ noise rather than speech harmonics, so modelling them as voiced
+ (i.e. a continuous, non-random phase track) is inaccurate.
+
+ Some codecs (like MBE) have a mixed voicing model that breaks the
+ spectrum into voiced and unvoiced regions. Several bits/frame
+ (5-12) are required to transmit the frequency selective voicing
+ information. Mixed excitation also requires accurate voicing
+ estimation (parameter estimators always break occasionally under
+ exceptional conditions).
+
+ In our case we use a post filter approach which requires no
+ additional bits to be transmitted. The decoder measures the average
+ level of the background noise during unvoiced frames. If a harmonic
+ is less than this level it is made unvoiced by randomising it's
+ phases.
+
+ This idea is rather experimental. Some potential problems that may
+ happen:
+
+ 1/ If someone says "aaaaaaaahhhhhhhhh" will background estimator track
+ up to speech level? This would be a bad thing.
+
+ 2/ If background noise suddenly dissapears from the source speech does
+ estimate drop quickly? What is noise suddenly re-appears?
+
+ 3/ Background noise with a non-flat sepctrum. Current algorithm just
+ comsiders scpetrum as a whole, but this could be broken up into
+ bands, each with their own estimator.
+
+ 4/ Males and females with the same level of background noise. Check
+ performance the same. Changing Wo affects width of each band, may
+ affect bg energy estimates.
+
+ 5/ Not sure what happens during long periods of voiced speech
+ e.g. "sshhhhhhh"
+
+\*---------------------------------------------------------------------------*/
+
+void postfilter(
+ MODEL *model,
+ float *bg_est
+)
+{
+ int m, uv;
+ float e, thresh;
+
+ /* determine average energy across spectrum */
+
+ e = 1E-12;
+ for(m=1; m<=model->L; m++)
+ e += model->A[m]*model->A[m];
+
+ assert(e > 0.0);
+ e = 10.0*log10f(e/model->L);
+
+ /* If beneath threhold, update bg estimate. The idea
+ of the threshold is to prevent updating during high level
+ speech. */
+
+ if ((e < BG_THRESH) && !model->voiced)
+ *bg_est = *bg_est*(1.0 - BG_BETA) + e*BG_BETA;
+
+ /* now mess with phases during voiced frames to make any harmonics
+ less then our background estimate unvoiced.
+ */
+
+ uv = 0;
+ thresh = powf(10.0, (*bg_est + BG_MARGIN)/20.0);
+ if (model->voiced)
+ for(m=1; m<=model->L; m++)
+ if (model->A[m] < thresh) {
+ model->phi[m] = TWO_PI*(float)codec2_rand()/CODEC2_RAND_MAX;
+ uv++;
+ }
+
+#ifdef DUMP
+ dump_bg(e, *bg_est, 100.0*uv/model->L);
+#endif
+
+}
diff --git a/DSP_API/CODEC2_FREEDV/postfilter.h b/DSP_API/CODEC2_FREEDV/postfilter.h
new file mode 100644
index 0000000..bf080b1
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/postfilter.h
@@ -0,0 +1,33 @@
+/*---------------------------------------------------------------------------*\
+
+ FILE........: postfilter.h
+ AUTHOR......: David Rowe
+ DATE CREATED: 13/09/09
+
+ Postfilter header file.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+ Copyright (C) 2009 David Rowe
+
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License version 2.1, as
+ published by the Free Software Foundation. This program is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see .
+*/
+
+#ifndef __POSTFILTER__
+#define __POSTFILTER__
+
+void postfilter(MODEL *model, float *bg_est);
+
+#endif
diff --git a/DSP_API/CODEC2_FREEDV/quantise.c b/DSP_API/CODEC2_FREEDV/quantise.c
new file mode 100644
index 0000000..23f2660
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/quantise.c
@@ -0,0 +1,1946 @@
+/*---------------------------------------------------------------------------*\
+
+ FILE........: quantise.c
+ AUTHOR......: David Rowe
+ DATE CREATED: 31/5/92
+
+ Quantisation functions for the sinusoidal coder.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License version 2.1, as
+ published by the Free Software Foundation. This program is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see .
+
+*/
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "defines.h"
+#include "dump.h"
+#include "quantise.h"
+#include "lpc.h"
+#include "lsp.h"
+#include "kiss_fft.h"
+#undef PROFILE
+#include "machdep.h"
+
+#define LSP_DELTA1 0.01 /* grid spacing for LSP root searches */
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION HEADERS
+
+\*---------------------------------------------------------------------------*/
+
+float speech_to_uq_lsps(float lsp[], float ak[], float Sn[], float w[],
+ int order);
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTIONS
+
+\*---------------------------------------------------------------------------*/
+
+int lsp_bits(int i) {
+ return lsp_cb[i].log2m;
+}
+
+int lspd_bits(int i) {
+ return lsp_cbd[i].log2m;
+}
+
+#ifdef __EXPERIMENTAL__
+int lspdt_bits(int i) {
+ return lsp_cbdt[i].log2m;
+}
+#endif
+
+int lsp_pred_vq_bits(int i) {
+ return lsp_cbjvm[i].log2m;
+}
+
+/*---------------------------------------------------------------------------*\
+
+ quantise_init
+
+ Loads the entire LSP quantiser comprised of several vector quantisers
+ (codebooks).
+
+\*---------------------------------------------------------------------------*/
+
+void quantise_init()
+{
+}
+
+/*---------------------------------------------------------------------------*\
+
+ quantise
+
+ Quantises vec by choosing the nearest vector in codebook cb, and
+ returns the vector index. The squared error of the quantised vector
+ is added to se.
+
+\*---------------------------------------------------------------------------*/
+
+long quantise(const float * cb, float vec[], float w[], int k, int m, float *se)
+/* float cb[][K]; current VQ codebook */
+/* float vec[]; vector to quantise */
+/* float w[]; weighting vector */
+/* int k; dimension of vectors */
+/* int m; size of codebook */
+/* float *se; accumulated squared error */
+{
+ float e; /* current error */
+ long besti; /* best index so far */
+ float beste; /* best error so far */
+ long j;
+ int i;
+ float diff;
+
+ besti = 0;
+ beste = 1E32;
+ for(j=0; j 0);
+ mbest = (struct MBEST *)malloc(sizeof(struct MBEST));
+ assert(mbest != NULL);
+
+ mbest->entries = entries;
+ mbest->list = (struct MBEST_LIST *)malloc(entries*sizeof(struct MBEST_LIST));
+ assert(mbest->list != NULL);
+
+ for(i=0; ientries; i++) {
+ for(j=0; jlist[i].index[j] = 0;
+ mbest->list[i].error = 1E32;
+ }
+
+ return mbest;
+}
+
+
+static void mbest_destroy(struct MBEST *mbest) {
+ assert(mbest != NULL);
+ free(mbest->list);
+ free(mbest);
+}
+
+
+/*---------------------------------------------------------------------------*\
+
+ mbest_insert
+
+ Insert the results of a vector to codebook entry comparison. The
+ list is ordered in order or error, so those entries with the
+ smallest error will be first on the list.
+
+\*---------------------------------------------------------------------------*/
+
+static void mbest_insert(struct MBEST *mbest, int index[], float error) {
+ int i, j, found;
+ struct MBEST_LIST *list = mbest->list;
+ int entries = mbest->entries;
+
+ found = 0;
+ for(i=0; ii; j--)
+ list[j] = list[j-1];
+ for(j=0; jentries; i++) {
+ for(j=0; jlist[i].index[j]);
+ printf(" %f\n", mbest->list[i].error);
+ }
+}
+
+
+/*---------------------------------------------------------------------------*\
+
+ mbest_search
+
+ Searches vec[] to a codebbook of vectors, and maintains a list of the mbest
+ closest matches.
+
+\*---------------------------------------------------------------------------*/
+
+static void mbest_search(
+ const float *cb, /* VQ codebook to search */
+ float vec[], /* target vector */
+ float w[], /* weighting vector */
+ int k, /* dimension of vector */
+ int m, /* number on entries in codebook */
+ struct MBEST *mbest, /* list of closest matches */
+ int index[] /* indexes that lead us here */
+)
+{
+ float e;
+ int i,j;
+ float diff;
+
+ for(j=0; jlist[j].index[0];
+ for(i=0; ilist[j].index[1];
+ index[1] = n2 = mbest_stage2->list[j].index[0];
+ for(i=0; ilist[j].index[2];
+ index[2] = n2 = mbest_stage3->list[j].index[1];
+ index[1] = n3 = mbest_stage3->list[j].index[0];
+ for(i=0; ilist[0].index[3];
+ n2 = mbest_stage4->list[0].index[2];
+ n3 = mbest_stage4->list[0].index[1];
+ n4 = mbest_stage4->list[0].index[0];
+ for (i=0;i max_Rw)
+ max_Rw = Rw[i];
+ if (Rw[i] < min_Rw)
+ min_Rw = Rw[i];
+
+ }
+
+ PROFILE_SAMPLE_AND_LOG(tr, tww, " R");
+
+ #ifdef DUMP
+ if (dump)
+ dump_Rw(Rw);
+ #endif
+
+ /* create post filter mag spectrum and apply ------------------*/
+
+ /* measure energy before post filtering */
+
+ e_before = 1E-4;
+ for(i=0; iL; m++) {
+ am = (int)((m - 0.5)*model->Wo/r + 0.5);
+ bm = (int)((m + 0.5)*model->Wo/r + 0.5);
+ Em = 0.0;
+
+ for(i=am; iA[m]*model->A[m];
+ noise += (model->A[m] - Am)*(model->A[m] - Am);
+
+ /* This code significantly improves perf of LPC model, in
+ particular when combined with phase0. The LPC spectrum tends
+ to track just under the peaks of the spectral envelope, and
+ just above nulls. This algorithm does the reverse to
+ compensate - raising the amplitudes of spectral peaks, while
+ attenuating the null. This enhances the formants, and
+ supresses the energy between formants. */
+
+ if (sim_pf) {
+ if (Am > model->A[m])
+ Am *= 0.7;
+ if (Am < model->A[m])
+ Am *= 1.4;
+ }
+
+ model->A[m] = Am;
+ }
+ *snr = 10.0*log10f(signal/noise);
+
+ PROFILE_SAMPLE_AND_LOG2(tpf, " rec");
+}
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: encode_Wo()
+ AUTHOR......: David Rowe
+ DATE CREATED: 22/8/2010
+
+ Encodes Wo using a WO_LEVELS quantiser.
+
+\*---------------------------------------------------------------------------*/
+
+int encode_Wo(float Wo)
+{
+ int index;
+ float Wo_min = TWO_PI/P_MAX;
+ float Wo_max = TWO_PI/P_MIN;
+ float norm;
+
+ norm = (Wo - Wo_min)/(Wo_max - Wo_min);
+ index = floorf(WO_LEVELS * norm + 0.5);
+ if (index < 0 ) index = 0;
+ if (index > (WO_LEVELS-1)) index = WO_LEVELS-1;
+
+ return index;
+}
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: decode_Wo()
+ AUTHOR......: David Rowe
+ DATE CREATED: 22/8/2010
+
+ Decodes Wo using a WO_LEVELS quantiser.
+
+\*---------------------------------------------------------------------------*/
+
+float decode_Wo(int index)
+{
+ float Wo_min = TWO_PI/P_MAX;
+ float Wo_max = TWO_PI/P_MIN;
+ float step;
+ float Wo;
+
+ step = (Wo_max - Wo_min)/WO_LEVELS;
+ Wo = Wo_min + step*(index);
+
+ return Wo;
+}
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: encode_Wo_dt()
+ AUTHOR......: David Rowe
+ DATE CREATED: 6 Nov 2011
+
+ Encodes Wo difference from last frame.
+
+\*---------------------------------------------------------------------------*/
+
+int encode_Wo_dt(float Wo, float prev_Wo)
+{
+ int index, mask, max_index, min_index;
+ float Wo_min = TWO_PI/P_MAX;
+ float Wo_max = TWO_PI/P_MIN;
+ float norm;
+
+ norm = (Wo - prev_Wo)/(Wo_max - Wo_min);
+ index = floor(WO_LEVELS * norm + 0.5);
+ //printf("ENC index: %d ", index);
+
+ /* hard limit */
+
+ max_index = (1 << (WO_DT_BITS-1)) - 1;
+ min_index = - (max_index+1);
+ if (index > max_index) index = max_index;
+ if (index < min_index) index = min_index;
+ //printf("max_index: %d min_index: %d hard index: %d ",
+ // max_index, min_index, index);
+
+ /* mask so that only LSB WO_DT_BITS remain, bit WO_DT_BITS is the sign bit */
+
+ mask = ((1 << WO_DT_BITS) - 1);
+ index &= mask;
+ //printf("mask: 0x%x index: 0x%x\n", mask, index);
+
+ return index;
+}
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: decode_Wo_dt()
+ AUTHOR......: David Rowe
+ DATE CREATED: 6 Nov 2011
+
+ Decodes Wo using WO_DT_BITS difference from last frame.
+
+\*---------------------------------------------------------------------------*/
+
+float decode_Wo_dt(int index, float prev_Wo)
+{
+ float Wo_min = TWO_PI/P_MAX;
+ float Wo_max = TWO_PI/P_MIN;
+ float step;
+ float Wo;
+ int mask;
+
+ /* sign extend index */
+
+ //printf("DEC index: %d ");
+ if (index & (1 << (WO_DT_BITS-1))) {
+ mask = ~((1 << WO_DT_BITS) - 1);
+ index |= mask;
+ }
+ //printf("DEC mask: 0x%x index: %d \n", mask, index);
+
+ step = (Wo_max - Wo_min)/WO_LEVELS;
+ Wo = prev_Wo + step*(index);
+
+ /* bit errors can make us go out of range leading to all sorts of
+ probs like seg faults */
+
+ if (Wo > Wo_max) Wo = Wo_max;
+ if (Wo < Wo_min) Wo = Wo_min;
+
+ return Wo;
+}
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: speech_to_uq_lsps()
+ AUTHOR......: David Rowe
+ DATE CREATED: 22/8/2010
+
+ Analyse a windowed frame of time domain speech to determine LPCs
+ which are the converted to LSPs for quantisation and transmission
+ over the channel.
+
+\*---------------------------------------------------------------------------*/
+
+float speech_to_uq_lsps(float lsp[],
+ float ak[],
+ float Sn[],
+ float w[],
+ int order
+)
+{
+ int i, roots;
+ float Wn[M];
+ float R[order+1];
+ float e, E;
+
+ e = 0.0;
+ for(i=0; iWo < (PI*150.0/4000)) {
+ model->A[1] *= 0.032;
+ }
+}
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: encode_energy()
+ AUTHOR......: David Rowe
+ DATE CREATED: 22/8/2010
+
+ Encodes LPC energy using an E_LEVELS quantiser.
+
+\*---------------------------------------------------------------------------*/
+
+int encode_energy(float e)
+{
+ int index;
+ float e_min = E_MIN_DB;
+ float e_max = E_MAX_DB;
+ float norm;
+
+ e = 10.0*log10f(e);
+ norm = (e - e_min)/(e_max - e_min);
+ index = floorf(E_LEVELS * norm + 0.5);
+ if (index < 0 ) index = 0;
+ if (index > (E_LEVELS-1)) index = E_LEVELS-1;
+
+ return index;
+}
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: decode_energy()
+ AUTHOR......: David Rowe
+ DATE CREATED: 22/8/2010
+
+ Decodes energy using a E_LEVELS quantiser.
+
+\*---------------------------------------------------------------------------*/
+
+float decode_energy(int index)
+{
+ float e_min = E_MIN_DB;
+ float e_max = E_MAX_DB;
+ float step;
+ float e;
+
+ step = (e_max - e_min)/E_LEVELS;
+ e = e_min + step*(index);
+ e = powf(10.0,e/10.0);
+
+ return e;
+}
+
+#ifdef NOT_USED
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: decode_amplitudes()
+ AUTHOR......: David Rowe
+ DATE CREATED: 22/8/2010
+
+ Given the amplitude quantiser indexes recovers the harmonic
+ amplitudes.
+
+\*---------------------------------------------------------------------------*/
+
+float decode_amplitudes(kiss_fft_cfg fft_fwd_cfg,
+ MODEL *model,
+ float ak[],
+ int lsp_indexes[],
+ int energy_index,
+ float lsps[],
+ float *e
+)
+{
+ float snr;
+
+ decode_lsps_scalar(lsps, lsp_indexes, LPC_ORD);
+ bw_expand_lsps(lsps, LPC_ORD);
+ lsp_to_lpc(lsps, ak, LPC_ORD);
+ *e = decode_energy(energy_index);
+ aks_to_M2(ak, LPC_ORD, model, *e, &snr, 1, 0, 0, 1);
+ apply_lpc_correction(model);
+
+ return snr;
+}
+#endif
+
+static float ge_coeff[2] = {0.8, 0.9};
+
+void compute_weights2(const float *x, const float *xp, float *w)
+{
+ w[0] = 30;
+ w[1] = 1;
+ if (x[1]<0)
+ {
+ w[0] *= .6;
+ w[1] *= .3;
+ }
+ if (x[1]<-10)
+ {
+ w[0] *= .3;
+ w[1] *= .3;
+ }
+ /* Higher weight if pitch is stable */
+ if (fabsf(x[0]-xp[0])<.2)
+ {
+ w[0] *= 2;
+ w[1] *= 1.5;
+ } else if (fabsf(x[0]-xp[0])>.5) /* Lower if not stable */
+ {
+ w[0] *= .5;
+ }
+
+ /* Lower weight for low energy */
+ if (x[1] < xp[1]-10)
+ {
+ w[1] *= .5;
+ }
+ if (x[1] < xp[1]-20)
+ {
+ w[1] *= .5;
+ }
+
+ //w[0] = 30;
+ //w[1] = 1;
+
+ /* Square the weights because it's applied on the squared error */
+ w[0] *= w[0];
+ w[1] *= w[1];
+
+}
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: quantise_WoE()
+ AUTHOR......: Jean-Marc Valin & David Rowe
+ DATE CREATED: 29 Feb 2012
+
+ Experimental joint Wo and LPC energy vector quantiser developed by
+ Jean-Marc Valin. Exploits correlations between the difference in
+ the log pitch and log energy from frame to frame. For example
+ both the pitch and energy tend to only change by small amounts
+ during voiced speech, however it is important that these changes be
+ coded carefully. During unvoiced speech they both change a lot but
+ the ear is less sensitve to errors so coarser quantisation is OK.
+
+ The ear is sensitive to log energy and loq pitch so we quantise in
+ these domains. That way the error measure used to quantise the
+ values is close to way the ear senses errors.
+
+ See http://jmspeex.livejournal.com/10446.html
+
+\*---------------------------------------------------------------------------*/
+
+void quantise_WoE(MODEL *model, float *e, float xq[])
+{
+ int i, n1;
+ float x[2];
+ float err[2];
+ float w[2];
+ const float *codebook1 = ge_cb[0].cb;
+ int nb_entries = ge_cb[0].m;
+ int ndim = ge_cb[0].k;
+ float Wo_min = TWO_PI/P_MAX;
+ float Wo_max = TWO_PI/P_MIN;
+
+ x[0] = log10f((model->Wo/PI)*4000.0/50.0)/log10f(2);
+ x[1] = 10.0*log10f(1e-4 + *e);
+
+ compute_weights2(x, xq, w);
+ for (i=0;iWo = powf(2.0, xq[0])*(PI*50.0)/4000.0;
+
+ /* bit errors can make us go out of range leading to all sorts of
+ probs like seg faults */
+
+ if (model->Wo > Wo_max) model->Wo = Wo_max;
+ if (model->Wo < Wo_min) model->Wo = Wo_min;
+
+ model->L = PI/model->Wo; /* if we quantise Wo re-compute L */
+
+ *e = powf(10.0, xq[1]/10.0);
+}
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: encode_WoE()
+ AUTHOR......: Jean-Marc Valin & David Rowe
+ DATE CREATED: 11 May 2012
+
+ Joint Wo and LPC energy vector quantiser developed my Jean-Marc
+ Valin. Returns index, and updated states xq[].
+
+\*---------------------------------------------------------------------------*/
+
+int encode_WoE(MODEL *model, float e, float xq[])
+{
+ int i, n1;
+ float x[2];
+ float err[2];
+ float w[2];
+ const float *codebook1 = ge_cb[0].cb;
+ int nb_entries = ge_cb[0].m;
+ int ndim = ge_cb[0].k;
+
+ assert((1<Wo/PI)*4000.0/50.0)/log10f(2);
+ x[1] = 10.0*log10f(1e-4 + e);
+
+ compute_weights2(x, xq, w);
+ for (i=0;iWo = powf(2.0, xq[0])*(PI*50.0)/4000.0;
+
+ /* bit errors can make us go out of range leading to all sorts of
+ probs like seg faults */
+
+ if (model->Wo > Wo_max) model->Wo = Wo_max;
+ if (model->Wo < Wo_min) model->Wo = Wo_min;
+
+ model->L = PI/model->Wo; /* if we quantise Wo re-compute L */
+
+ *e = powf(10.0, xq[1]/10.0);
+}
+
diff --git a/DSP_API/CODEC2_FREEDV/quantise.h b/DSP_API/CODEC2_FREEDV/quantise.h
new file mode 100644
index 0000000..d714106
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/quantise.h
@@ -0,0 +1,127 @@
+/*---------------------------------------------------------------------------*\
+
+ FILE........: quantise.h
+ AUTHOR......: David Rowe
+ DATE CREATED: 31/5/92
+
+ Quantisation functions for the sinusoidal coder.
+
+\*---------------------------------------------------------------------------*/
+
+/*
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License version 2.1, as
+ published by the Free Software Foundation. This program is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see .
+*/
+
+#ifndef __QUANTISE__
+#define __QUANTISE__
+
+#include "kiss_fft.h"
+#include "comp.h"
+
+#define WO_BITS 7
+#define WO_LEVELS (1<.
+*/
+
+/*---------------------------------------------------------------------------*\
+
+ INCLUDES
+
+\*---------------------------------------------------------------------------*/
+
+#include
+#include
+#include
+
+#include "defines.h"
+#include "sine.h"
+#include "kiss_fft.h"
+
+#define HPF_BETA 0.125
+
+/*---------------------------------------------------------------------------*\
+
+ HEADERS
+
+\*---------------------------------------------------------------------------*/
+
+void hs_pitch_refinement(MODEL *model, COMP Sw[], float pmin, float pmax,
+ float pstep);
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTIONS
+
+\*---------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: make_analysis_window
+ AUTHOR......: David Rowe
+ DATE CREATED: 11/5/94
+
+ Init function that generates the time domain analysis window and it's DFT.
+
+\*---------------------------------------------------------------------------*/
+
+void make_analysis_window(kiss_fft_cfg fft_fwd_cfg, float w[], COMP W[])
+{
+ float m;
+ COMP wshift[FFT_ENC];
+ COMP temp;
+ int i,j;
+
+ /*
+ Generate Hamming window centered on M-sample pitch analysis window
+
+ 0 M/2 M-1
+ |-------------|-------------|
+ |-------|-------|
+ NW samples
+
+ All our analysis/synthsis is centred on the M/2 sample.
+ */
+
+ m = 0.0;
+ for(i=0; iWo + 5;
+ pmin = TWO_PI/model->Wo - 5;
+ pstep = 1.0;
+ hs_pitch_refinement(model,Sw,pmin,pmax,pstep);
+
+ /* Fine refinement */
+
+ pmax = TWO_PI/model->Wo + 1;
+ pmin = TWO_PI/model->Wo - 1;
+ pstep = 0.25;
+ hs_pitch_refinement(model,Sw,pmin,pmax,pstep);
+
+ /* Limit range */
+
+ if (model->Wo < TWO_PI/P_MAX)
+ model->Wo = TWO_PI/P_MAX;
+ if (model->Wo > TWO_PI/P_MIN)
+ model->Wo = TWO_PI/P_MIN;
+
+ model->L = floor(PI/model->Wo);
+}
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: hs_pitch_refinement
+ AUTHOR......: David Rowe
+ DATE CREATED: 27/5/94
+
+ Harmonic sum pitch refinement function.
+
+ pmin pitch search range minimum
+ pmax pitch search range maximum
+ step pitch search step size
+ model current pitch estimate in model.Wo
+
+ model refined pitch estimate in model.Wo
+
+\*---------------------------------------------------------------------------*/
+
+void hs_pitch_refinement(MODEL *model, COMP Sw[], float pmin, float pmax, float pstep)
+{
+ int m; /* loop variable */
+ int b; /* bin for current harmonic centre */
+ float E; /* energy for current pitch*/
+ float Wo; /* current "test" fundamental freq. */
+ float Wom; /* Wo that maximises E */
+ float Em; /* mamimum energy */
+ float r, one_on_r; /* number of rads/bin */
+ float p; /* current pitch */
+
+ /* Initialisation */
+
+ model->L = PI/model->Wo; /* use initial pitch est. for L */
+ Wom = model->Wo;
+ Em = 0.0;
+ r = TWO_PI/FFT_ENC;
+ one_on_r = 1.0/r;
+
+ /* Determine harmonic sum for a range of Wo values */
+
+ for(p=pmin; p<=pmax; p+=pstep) {
+ E = 0.0;
+ Wo = TWO_PI/p;
+
+ /* Sum harmonic magnitudes */
+ for(m=1; m<=model->L; m++) {
+ b = (int)(m*Wo*one_on_r + 0.5);
+ E += Sw[b].real*Sw[b].real + Sw[b].imag*Sw[b].imag;
+ }
+ /* Compare to see if this is a maximum */
+
+ if (E > Em) {
+ Em = E;
+ Wom = Wo;
+ }
+ }
+
+ model->Wo = Wom;
+}
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: estimate_amplitudes
+ AUTHOR......: David Rowe
+ DATE CREATED: 27/5/94
+
+ Estimates the complex amplitudes of the harmonics.
+
+\*---------------------------------------------------------------------------*/
+
+void estimate_amplitudes(MODEL *model, COMP Sw[], COMP W[], int est_phase)
+{
+ int i,m; /* loop variables */
+ int am,bm; /* bounds of current harmonic */
+ int b; /* DFT bin of centre of current harmonic */
+ float den; /* denominator of amplitude expression */
+ float r, one_on_r; /* number of rads/bin */
+ int offset;
+ COMP Am;
+
+ r = TWO_PI/FFT_ENC;
+ one_on_r = 1.0/r;
+
+ for(m=1; m<=model->L; m++) {
+ den = 0.0;
+ am = (int)((m - 0.5)*model->Wo*one_on_r + 0.5);
+ bm = (int)((m + 0.5)*model->Wo*one_on_r + 0.5);
+ b = (int)(m*model->Wo/r + 0.5);
+
+ /* Estimate ampltude of harmonic */
+
+ den = 0.0;
+ Am.real = Am.imag = 0.0;
+ offset = FFT_ENC/2 - (int)(m*model->Wo*one_on_r + 0.5);
+ for(i=am; iA[m] = sqrtf(den);
+
+ if (est_phase) {
+
+ /* Estimate phase of harmonic, this is expensive in CPU for
+ embedded devicesso we make it an option */
+
+ model->phi[m] = atan2(Sw[b].imag,Sw[b].real);
+ }
+ }
+}
+
+/*---------------------------------------------------------------------------*\
+
+ est_voicing_mbe()
+
+ Returns the error of the MBE cost function for a fiven F0.
+
+ Note: I think a lot of the operations below can be simplified as
+ W[].imag = 0 and has been normalised such that den always equals 1.
+
+\*---------------------------------------------------------------------------*/
+
+float est_voicing_mbe(
+ MODEL *model,
+ COMP Sw[],
+ COMP W[],
+ COMP Sw_[], /* DFT of all voiced synthesised signal */
+ /* useful for debugging/dump file */
+ COMP Ew[]) /* DFT of error */
+{
+ int i,l,al,bl,m; /* loop variables */
+ COMP Am; /* amplitude sample for this band */
+ int offset; /* centers Hw[] about current harmonic */
+ float den; /* denominator of Am expression */
+ float error; /* accumulated error between original and synthesised */
+ float Wo;
+ float sig, snr;
+ float elow, ehigh, eratio;
+ float sixty;
+
+ sig = 1E-4;
+ for(l=1; l<=model->L/4; l++) {
+ sig += model->A[l]*model->A[l];
+ }
+ for(i=0; iWo;
+ error = 1E-4;
+
+ /* Just test across the harmonics in the first 1000 Hz (L/4) */
+
+ for(l=1; l<=model->L/4; l++) {
+ Am.real = 0.0;
+ Am.imag = 0.0;
+ den = 0.0;
+ al = ceil((l - 0.5)*Wo*FFT_ENC/TWO_PI);
+ bl = ceil((l + 0.5)*Wo*FFT_ENC/TWO_PI);
+
+ /* Estimate amplitude of harmonic assuming harmonic is totally voiced */
+
+ offset = FFT_ENC/2 - l*Wo*FFT_ENC/TWO_PI + 0.5;
+ for(m=al; m V_THRESH)
+ model->voiced = 1;
+ else
+ model->voiced = 0;
+
+ /* post processing, helps clean up some voicing errors ------------------*/
+
+ /*
+ Determine the ratio of low freqency to high frequency energy,
+ voiced speech tends to be dominated by low frequency energy,
+ unvoiced by high frequency. This measure can be used to
+ determine if we have made any gross errors.
+ */
+
+ elow = ehigh = 1E-4;
+ for(l=1; l<=model->L/2; l++) {
+ elow += model->A[l]*model->A[l];
+ }
+ for(l=model->L/2; l<=model->L; l++) {
+ ehigh += model->A[l]*model->A[l];
+ }
+ eratio = 10.0*log10f(elow/ehigh);
+
+ /* Look for Type 1 errors, strongly V speech that has been
+ accidentally declared UV */
+
+ if (model->voiced == 0)
+ if (eratio > 10.0)
+ model->voiced = 1;
+
+ /* Look for Type 2 errors, strongly UV speech that has been
+ accidentally declared V */
+
+ if (model->voiced == 1) {
+ if (eratio < -10.0)
+ model->voiced = 0;
+
+ /* A common source of Type 2 errors is the pitch estimator
+ gives a low (50Hz) estimate for UV speech, which gives a
+ good match with noise due to the close harmoonic spacing.
+ These errors are much more common than people with 50Hz3
+ pitch, so we have just a small eratio threshold. */
+
+ sixty = 60.0*TWO_PI/FS;
+ if ((eratio < -4.0) && (model->Wo <= sixty))
+ model->voiced = 0;
+ }
+ //printf(" v: %d snr: %f eratio: %3.2f %f\n",model->voiced,snr,eratio,dF0);
+
+ return snr;
+}
+
+/*---------------------------------------------------------------------------*\
+
+ FUNCTION....: make_synthesis_window
+ AUTHOR......: David Rowe
+ DATE CREATED: 11/5/94
+
+ Init function that generates the trapezoidal (Parzen) sythesis window.
+
+\*---------------------------------------------------------------------------*/
+
+void make_synthesis_window(float Pn[])
+{
+ int i;
+ float win;
+
+ /* Generate Parzen window in time domain */
+
+ win = 0.0;
+ for(i=0; i 10ms sound poor. The effect can also
+ be seen when synthesising test signals like single sine waves, some
+ sort of amplitude modulation at the frame rate.
+
+ Another possibility is using a larger FFT size (1024 or 2048).
+ */
+
+#define FFT_SYNTHESIS
+#ifdef FFT_SYNTHESIS
+ /* Now set up frequency domain synthesised speech */
+ for(l=1; l<=model->L; l++) {
+ //for(l=model->L/2; l<=model->L; l++) {
+ //for(l=1; l<=model->L/4; l++) {
+ b = (int)(l*model->Wo*FFT_DEC/TWO_PI + 0.5);
+ if (b > ((FFT_DEC/2)-1)) {
+ b = (FFT_DEC/2)-1;
+ }
+ Sw_[b].real = model->A[l]*cosf(model->phi[l]);
+ Sw_[b].imag = model->A[l]*sinf(model->phi[l]);
+ Sw_[FFT_DEC-b].real = Sw_[b].real;
+ Sw_[FFT_DEC-b].imag = -Sw_[b].imag;
+ }
+
+ /* Perform inverse DFT */
+
+ kiss_fft(fft_inv_cfg, (kiss_fft_cpx *)Sw_, (kiss_fft_cpx *)sw_);
+#else
+ /*
+ Direct time domain synthesis using the cos() function. Works
+ well at 10ms and 20ms frames rates. Note synthesis window is
+ still used to handle overlap-add between adjacent frames. This
+ could be simplified as we don't need to synthesise where Pn[]
+ is zero.
+ */
+ for(l=1; l<=model->L; l++) {
+ for(i=0,j=-N+1; iA[l]*cos(j*model->Wo*l + model->phi[l]);
+ }
+ for(i=N-1,j=0; i<2*N; i++,j++)
+ Sw_[j].real += 2.0*model->A[l]*cos(j*model->Wo*l + model->phi[l]);
+ }
+#endif
+
+ /* Overlap add to previous samples */
+
+ for(i=0; i.
+*/
+
+#ifndef __SINE__
+#define __SINE__
+
+#include "defines.h"
+#include "comp.h"
+#include "kiss_fft.h"
+
+void make_analysis_window(kiss_fft_cfg fft_fwd_cfg, float w[], COMP W[]);
+float hpf(float x, float states[]);
+void dft_speech(kiss_fft_cfg fft_fwd_cfg, COMP Sw[], float Sn[], float w[]);
+void two_stage_pitch_refinement(MODEL *model, COMP Sw[]);
+void estimate_amplitudes(MODEL *model, COMP Sw[], COMP W[], int est_phase);
+float est_voicing_mbe(MODEL *model, COMP Sw[], COMP W[], COMP Sw_[],COMP Ew[]);
+void make_synthesis_window(float Pn[]);
+void synthesise(kiss_fft_cfg fft_inv_cfg, float Sn_[], MODEL *model, float Pn[], int shift);
+
+#define CODEC2_RAND_MAX 32767
+int codec2_rand(void);
+
+#endif
diff --git a/DSP_API/CODEC2_FREEDV/test_bits.h b/DSP_API/CODEC2_FREEDV/test_bits.h
new file mode 100644
index 0000000..d1c01a0
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/test_bits.h
@@ -0,0 +1,164 @@
+/* Generated by test_bits_file() Octave function */
+
+const int test_bits[]={
+ 0,
+ 1,
+ 1,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0,
+ 1
+};
diff --git a/DSP_API/CODEC2_FREEDV/varicode.c b/DSP_API/CODEC2_FREEDV/varicode.c
new file mode 100644
index 0000000..26de09a
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/varicode.c
@@ -0,0 +1,479 @@
+//==========================================================================
+// Name: varicode.h
+// Purpose: Varicode encoded and decode functions
+// Created: Nov 24, 2012
+// Authors: David Rowe
+//
+// To test:
+// $ gcc varicode.c -o varicode -DVARICODE_UNITTEST -Wall
+// $ ./varicode
+//
+// License:
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2.1,
+// as published by the Free Software Foundation. This program is
+// distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+// License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, see .
+//
+//==========================================================================
+
+#include
+#include
+#include
+#include
+#include
+#include "varicode.h"
+#include "varicode_table.h"
+
+
+/*
+ output is an unpacked array of bits of maximum size max_out. Note
+ unpacked arrays are a more suitable form for modulator input.
+
+ Code 1 covers the entire ASCII char set.
+*/
+
+int varicode_encode1(short varicode_out[], char ascii_in[], int max_out, int n_in) {
+ int n_out, index, n_zeros, v_len;
+ unsigned short byte1, byte2, packed;
+
+ n_out = 0;
+
+ while(n_in && (n_out < max_out)) {
+
+ assert((unsigned int)(*ascii_in) < 128);
+
+ index = 2*(unsigned int)(*ascii_in);
+ byte1 = varicode_table1[index];
+ byte2 = varicode_table1[index+1];
+ packed = (byte1 << 8) + byte2;
+
+ //printf("n_in: %d ascii_in: %c index: %d packed 0x%x\n", n_in, *ascii_in, index, packed);
+ ascii_in++;
+
+ n_zeros = 0;
+ v_len = 0;
+ while ((n_zeros < 2) && (n_out < max_out) && (v_len <= VARICODE_MAX_BITS)) {
+ if (packed & 0x8000) {
+ *varicode_out = 1;
+ n_zeros = 0;
+ }
+ else {
+ *varicode_out = 0;
+ n_zeros++;
+ }
+ //printf("packed: 0x%x *varicode_out: %d n_zeros: %d v_len: %d\n", packed, *varicode_out, n_zeros,v_len );
+ packed <<= 1;
+ varicode_out++;
+ n_out++;
+ v_len++;
+ }
+ assert(v_len <= VARICODE_MAX_BITS);
+
+ n_in--;
+ }
+
+ return n_out;
+}
+
+
+/*
+ Code 2 covers a subset, but is more efficient that Code 1 (282
+ compared to 1315 bits on unittest) Unsupported characters are
+ replaced by spaces. We encode/decode two bits at a time.
+*/
+
+int varicode_encode2(short varicode_out[], char ascii_in[], int max_out, int n_in) {
+ int n_out, n_zeros, v_len, i;
+ unsigned short packed;
+
+ n_out = 0;
+
+ while(n_in && (n_out < max_out)) {
+
+ packed = varicode_table2[0]; // default to space if char not found
+
+ // see if our character exists
+ for(i=0; istate = 0;
+ dec_states->n_zeros = 0;
+ dec_states->v_len = 0;
+ dec_states->packed = 0;
+ dec_states->code_num = code_num;
+ dec_states->n_in = 0;
+ dec_states->in[0] = dec_states->in[1] = 0;
+}
+
+
+/* Code 1 decode function, accepts one bit at a time */
+
+static int decode_one_bit(struct VARICODE_DEC *s, char *single_ascii, short varicode_in, int long_code)
+{
+ int found=0, i;
+ unsigned short byte1, byte2;
+
+ //printf("decode_one_bit : state: %d varicode_in: %d packed: 0x%x n_zeros: %d\n",
+ // s->state, varicode_in, s->packed, s->n_zeros);
+
+ if (s->state == 0) {
+ if (!varicode_in)
+ return 0;
+ else
+ s->state = 1;
+ }
+
+ if (s->state == 1) {
+ if (varicode_in) {
+ s->packed |= (0x8000 >> s->v_len);
+ s->n_zeros = 0;
+ }
+ else {
+ s->n_zeros++;
+ }
+ s->v_len++;
+ found = 0;
+
+ /* end of character code */
+
+ if (s->n_zeros == 2) {
+ if (s->v_len) {
+ /* run thru table but note with bit errors we might not actually find a match */
+
+ byte1 = s->packed >> 8;
+ //printf("looking for byte1 : 0x%x ... ", byte1);
+ byte2 = s->packed & 0xff;
+
+ for(i=0; i<128; i++) {
+ if ((byte1 == varicode_table1[2*i]) && (byte2 == varicode_table1[2*i+1])) {
+ found = 1;
+ *single_ascii = i;
+ }
+ }
+ }
+ varicode_decode_init(s, s->code_num);
+ }
+
+ /* code can run too long if we have a bit error */
+
+ if (s->v_len > VARICODE_MAX_BITS)
+ varicode_decode_init(s, s->code_num);
+ }
+
+ return found;
+}
+
+
+/* Code 2 decode function, accepts two bits at a time */
+
+static int decode_two_bits(struct VARICODE_DEC *s, char *single_ascii, short varicode_in1, short varicode_in2)
+{
+ int found=0, i;
+ unsigned short byte1;
+
+ if (s->state == 0) {
+ if (!(varicode_in1 || varicode_in2))
+ return 0;
+ else
+ s->state = 1;
+ }
+
+ if (s->state == 1) {
+ if (varicode_in1)
+ s->packed |= (0x8000 >> s->v_len);
+ if (varicode_in2)
+ s->packed |= (0x4000 >> s->v_len);
+ if (varicode_in1 || varicode_in2)
+ s->n_zeros = 0;
+ else
+ s->n_zeros+=2;
+
+ s->v_len+=2;
+
+ found = 0;
+
+ /* end of character code */
+
+ if (s->n_zeros == 2) {
+ if (s->v_len) {
+ /* run thru table but note with bit errors we might not actually find a match */
+
+ byte1 = s->packed >> 8;
+ //printf("looking for byte1 : 0x%x ... ", byte1);
+ for(i=0; icode_num);
+ }
+
+ /* code can run too long if we have a bit error */
+
+ if (s->v_len > VARICODE_MAX_BITS)
+ varicode_decode_init(s, s->code_num);
+ }
+
+ return found;
+}
+
+
+int varicode_decode1(struct VARICODE_DEC *dec_states, char ascii_out[], short varicode_in[], int max_out, int n_in) {
+ int output, n_out;
+ char single_ascii = 0;
+
+ n_out = 0;
+
+ //printf("varicode_decode: n_in: %d\n", n_in);
+
+ while(n_in && (n_out < max_out)) {
+ output = decode_one_bit(dec_states, &single_ascii, varicode_in[0], 0);
+ varicode_in++;
+ n_in--;
+
+ if (output) {
+ *ascii_out++ = single_ascii;
+ n_out++;
+ }
+ }
+
+ return n_out;
+}
+
+
+int varicode_decode2(struct VARICODE_DEC *dec_states, char ascii_out[], short varicode_in[], int max_out, int n_in) {
+ int output, n_out;
+ char single_ascii = 0;
+
+ n_out = 0;
+
+ //printf("varicode_decode2: n_in: %d varicode_in[0] %d dec_states->n_in: %d\n", n_in, varicode_in[0], dec_states->n_in);
+ //printf("%d ", varicode_in[0]);
+ while(n_in && (n_out < max_out)) {
+
+ // keep two bit buffer so we can process two at a time
+
+ dec_states->in[0] = dec_states->in[1];
+ dec_states->in[1] = varicode_in[0];
+ dec_states->n_in++;
+ varicode_in++;
+ n_in--;
+
+ if (dec_states->n_in == 2) {
+ output = decode_two_bits(dec_states, &single_ascii, dec_states->in[0], dec_states->in[1]);
+
+ dec_states->n_in = 0;
+
+ if (output) {
+ //printf(" output: %d single_ascii: 0x%x %c\n", output, (int)single_ascii, single_ascii);
+ *ascii_out++ = single_ascii;
+ n_out++;
+ }
+ }
+ }
+
+ return n_out;
+}
+
+
+int varicode_decode(struct VARICODE_DEC *dec_states, char ascii_out[], short varicode_in[], int max_out, int n_in) {
+ if (dec_states->code_num == 1)
+ return varicode_decode1(dec_states, ascii_out, varicode_in, max_out, n_in);
+ else
+ return varicode_decode2(dec_states, ascii_out, varicode_in, max_out, n_in);
+}
+
+
+#ifdef VARICODE_UNITTEST
+void test_varicode(int code_num) {
+ char *ascii_in;
+ short *varicode;
+ int i, n_varicode_bits_out, n_ascii_chars_out, length, half, n_out, j, len;
+ char *ascii_out;
+ struct VARICODE_DEC dec_states;
+
+ if (code_num == 1) {
+ printf("long code:\n");
+ length = sizeof(varicode_table1)/2;
+ }
+ else {
+ printf("short code:\n");
+ length = sizeof(varicode_table2)/2;
+ }
+ //length = 10;
+ ascii_in = (char*)malloc(length);
+ varicode = (short*)malloc(VARICODE_MAX_BITS*sizeof(short)*length);
+ ascii_out = (char*)malloc(length);
+
+ // 1. test all Varicode codes -------------------------------------------------------------
+
+ if (code_num == 1) {
+ for(i=0; i.
+//
+//==========================================================================
+
+#ifndef __VARICODE__
+#define __VARICODE__
+
+#ifdef __cplusplus
+extern "C" {
+
+#endif
+
+#define VARICODE_MAX_BITS (10+2) /* max varicode bits for each ascii character */
+ /* 10 bits for code plus 2 0 bits for inter-character space */
+
+struct VARICODE_DEC {
+ int state;
+ int n_zeros;
+ int v_len;
+ unsigned short packed;
+ int code_num;
+ int n_in;
+ int in[2];
+};
+
+int varicode_encode(short varicode_out[], char ascii_in[], int max_out, int n_in, int code_num);
+void varicode_decode_init(struct VARICODE_DEC *dec_states, int code_num);
+int varicode_decode(struct VARICODE_DEC *dec_states, char ascii_out[], short varicode_in[], int max_out, int n_in);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/DSP_API/CODEC2_FREEDV/varicode_table.h b/DSP_API/CODEC2_FREEDV/varicode_table.h
new file mode 100644
index 0000000..08f38fd
--- /dev/null
+++ b/DSP_API/CODEC2_FREEDV/varicode_table.h
@@ -0,0 +1,338 @@
+//==========================================================================
+// Name: varicode_table.h
+// Purpose: Varicode look up table
+// Created: Nov 24, 2012
+// Authors: Clint Turner, KA7OEI, Peter Martinez, G3PLX
+//
+// License:
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2.1,
+// as published by the Free Software Foundation. This program is
+// distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+// License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, see .
+//
+//==========================================================================
+
+/* The following table defines the PKS31 varicode. There are 128 entries,
+corresponding to ASCII characters 0-127 with two bytes for each entry. The bits
+for the varicode are to be shifted out MSB-first for both bytes, with the first byte
+in the table being the first one to be sent.
+
+More than one zero in sequence signifies the end of the character (i.e.
+two zeroes are the intercharacter sequence, so at least two zeroes should always be
+sent before the next character is sent.
+
+This file is constructed with information from the article "PSK31 Fundamentals"
+by Peter Martinez, G3PLX by Clint Turner, KA7OEI
+*/
+unsigned char const varicode_table1[256] = {
+ 0b10101010,
+ 0b11000000, // 0 NUL
+ 0b10110110,
+ 0b11000000, // 1 SOH
+ 0b10111011,
+ 0b01000000, // 2 STX
+ 0b11011101,
+ 0b11000000, // 3 ETX
+ 0b10111010,
+ 0b11000000, // 4 EOT
+ 0b11010111,
+ 0b11000000, // 5 ENQ
+ 0b10111011,
+ 0b11000000, // 6 ACK
+ 0b10111111,
+ 0b01000000, // 7 BEL
+ 0b10111111,
+ 0b11000000, // 8 BS
+ 0b11101111,
+ 0b00000000, // 9 HT
+ 0b11101000,
+ 0b00000000, // 10 LF
+ 0b11011011,
+ 0b11000000, // 11 VT
+ 0b10110111,
+ 0b01000000, // 12 FF
+ 0b11111000,
+ 0b00000000, // 13 CR
+ 0b11011101,
+ 0b01000000, // 14 SO
+ 0b11101010,
+ 0b11000000, // 15 SI
+ 0b10111101,
+ 0b11000000, // 16 DLE
+ 0b10111101,
+ 0b01000000, // 17 DC1
+ 0b11101011,
+ 0b01000000, // 18 DC2
+ 0b11101011,
+ 0b11000000, // 19 DC3
+ 0b11010110,
+ 0b11000000, // 20 DC4
+ 0b11011010,
+ 0b11000000, // 21 NAK
+ 0b11011011,
+ 0b01000000, // 22 SYN
+ 0b11010101,
+ 0b11000000, // 23 ETB
+ 0b11011110,
+ 0b11000000, // 24 CAN
+ 0b11011111,
+ 0b01000000, // 25 EM
+ 0b11101101,
+ 0b11000000, // 26 SUB
+ 0b11010101,
+ 0b01000000, // 27 ESC
+ 0b11010111,
+ 0b01000000, // 28 FS
+ 0b11101110,
+ 0b11000000, // 29 GS
+ 0b10111110,
+ 0b11000000, // 30 RS
+ 0b11011111,
+ 0b11000000, // 31 US
+ 0b10000000,
+ 0b00000000, // 32 SP
+ 0b11111111,
+ 0b10000000, // 33 !
+ 0b10101111,
+ 0b10000000, // 34 "
+ 0b11111010,
+ 0b10000000, // 35 #
+ 0b11101101,
+ 0b10000000, // 36 $
+ 0b10110101,
+ 0b01000000, // 37 %
+ 0b10101110,
+ 0b11000000, // 38 &
+ 0b10111111,
+ 0b10000000, // 39 '
+ 0b11111011,
+ 0b00000000, // 40 (
+ 0b11110111,
+ 0b00000000, // 41 )
+ 0b10110111,
+ 0b10000000, // 42 *
+ 0b11101111,
+ 0b10000000, // 43 +
+ 0b11101010,
+ 0b00000000, // 44 ,
+ 0b11010100,
+ 0b00000000, // 45 -
+ 0b10101110,
+ 0b00000000, // 46 .
+ 0b11010111,
+ 0b10000000, // 47 /
+ 0b10110111,
+ 0b00000000, // 48 0
+ 0b10111101,
+ 0b00000000, // 49 1
+ 0b11101101,
+ 0b00000000, // 50 2
+ 0b11111111,
+ 0b00000000, // 51 3
+ 0b10111011,
+ 0b10000000, // 52 4
+ 0b10101101,
+ 0b10000000, // 53 5
+ 0b10110101,
+ 0b10000000, // 54 6
+ 0b11010110,
+ 0b10000000, // 55 7
+ 0b11010101,
+ 0b10000000, // 56 8
+ 0b11011011,
+ 0b10000000, // 57 9
+ 0b11110101,
+ 0b00000000, // 58 :
+ 0b11011110,
+ 0b10000000, // 59 ;
+ 0b11110110,
+ 0b10000000, // 60 <
+ 0b10101010,
+ 0b00000000, // 61 =
+ 0b11101011,
+ 0b10000000, // 62 >
+ 0b10101011,
+ 0b11000000, // 63 ?
+ 0b10101111,
+ 0b01000000, // 64 @
+ 0b11111010,
+ 0b00000000, // 65 A
+ 0b11101011,
+ 0b00000000, // 66 B
+ 0b10101101,
+ 0b00000000, // 67 C
+ 0b10110101,
+ 0b00000000, // 68 D
+ 0b11101110,
+ 0b00000000, // 69 E
+ 0b11011011,
+ 0b00000000, // 70 F
+ 0b11111101,
+ 0b00000000, // 71 G
+ 0b10101010,
+ 0b10000000, // 72 H
+ 0b11111110,
+ 0b00000000, // 73 I
+ 0b11111110,
+ 0b10000000, // 74 J
+ 0b10111110,
+ 0b10000000, // 75 K
+ 0b11010111,
+ 0b00000000, // 76 L
+ 0b10111011,
+ 0b00000000, // 77 M
+ 0b11011101,
+ 0b00000000, // 78 N
+ 0b10101011,
+ 0b00000000, // 79 O
+ 0b11010101,
+ 0b00000000, // 80 P
+ 0b11101110,
+ 0b10000000, // 81 Q
+ 0b10101111,
+ 0b00000000, // 82 R
+ 0b11011110,
+ 0b00000000, // 83 S
+ 0b11011010,
+ 0b00000000, // 84 T
+ 0b10101011,
+ 0b10000000, // 85 U
+ 0b11011010,
+ 0b10000000, // 86 V
+ 0b10101110,
+ 0b10000000, // 87 W
+ 0b10111010,
+ 0b10000000, // 88 X
+ 0b10111101,
+ 0b10000000, // 89 Y
+ 0b10101011,
+ 0b01000000, // 90 Z
+ 0b11111011,
+ 0b10000000, // 91 [
+ 0b11110111,
+ 0b10000000, // 92 "\"
+ 0b11111101,
+ 0b10000000, // 93 ]
+ 0b10101111,
+ 0b11000000, // 94 ^
+ 0b10110110,
+ 0b10000000, // 95 _ (underline)
+ 0b10110111,
+ 0b11000000, // 96 `
+ 0b10110000,
+ 0b00000000, // 97 a
+ 0b10111110,
+ 0b00000000, // 98 b
+ 0b10111100,
+ 0b00000000, // 99 c
+ 0b10110100,
+ 0b00000000, // 100 d
+ 0b11000000,
+ 0b00000000, // 101 e
+ 0b11110100,
+ 0b00000000, // 102 f
+ 0b10110110,
+ 0b00000000, // 103 g
+ 0b10101100,
+ 0b00000000, // 104 h
+ 0b11010000,
+ 0b00000000, // 105 i
+ 0b11110101,
+ 0b10000000, // 106 j
+ 0b10111111,
+ 0b00000000, // 107 k
+ 0b11011000,
+ 0b00000000, // 108 l
+ 0b11101100,
+ 0b00000000, // 109 m
+ 0b11110000,
+ 0b00000000, // 110 n
+ 0b11100000,
+ 0b00000000, // 111 o
+ 0b11111100,
+ 0b00000000, // 112 p
+ 0b11011111,
+ 0b10000000, // 113 q
+ 0b10101000,
+ 0b00000000, // 114 r
+ 0b10111000,
+ 0b00000000, // 115 s
+ 0b10100000,
+ 0b00000000, // 116 t
+ 0b11011100,
+ 0b00000000, // 117 u
+ 0b11110110,
+ 0b00000000, // 118 v
+ 0b11010110,
+ 0b00000000, // 119 w
+ 0b11011111,
+ 0b00000000, // 120 x
+ 0b10111010,
+ 0b00000000, // 121 y
+ 0b11101010,
+ 0b10000000, // 122 z
+ 0b10101101,
+ 0b11000000, // 123 {
+ 0b11011101,
+ 0b10000000, // 124 |
+ 0b10101101,
+ 0b01000000, // 125 }
+ 0b10110101,
+ 0b11000000, // 126 ~
+ 0b11101101,
+ 0b01000000, // 127 (del)
+};
+
+// This code was used on FDMDV version 1, and is more compact that Code 1, but only covers a subset
+// of the ASCII cahacter set
+
+char const varicode_table2[] = {
+
+ ' ' ,0b11000000,
+ 13 ,0b01000000, // CR, end of message
+ '=' ,0b10000000,
+ '1' ,0b11110000,
+ '2' ,0b01110000,
+ '3' ,0b10110000,
+ '4' ,0b11010000,
+ '5' ,0b01010000,
+ '6' ,0b10010000,
+ '7' ,0b11100000,
+ '8' ,0b01100000,
+ '9' ,0b10100000,
+ 'a' ,0b11111100,
+ 'b' ,0b01111100,
+ 'c' ,0b10111100,
+ 'd' ,0b11011100,
+ 'e' ,0b01011100,
+ 'f' ,0b10011100,
+ 'g' ,0b11101100,
+ 'h' ,0b01101100,
+ 'i' ,0b10101100,
+ 'j' ,0b11110100,
+ 'k' ,0b01110100,
+ 'l' ,0b10110100,
+ 'm' ,0b11010100,
+ 'n' ,0b01010100,
+ 'o' ,0b10010100,
+ 'p' ,0b11100100,
+ 'q' ,0b01100100,
+ 'r' ,0b10100100,
+ 's' ,0b11111000,
+ 't' ,0b01111000,
+ 'u' ,0b10111000,
+ 'v' ,0b11011000,
+ 'w' ,0b01011000,
+ 'x' ,0b10011000,
+ 'y' ,0b11101000,
+ 'z' ,0b01101000,
+ '0' ,0b10101000
+};
+
diff --git a/DSP_API/DOCS/Documentation.txt b/DSP_API/DOCS/Documentation.txt
new file mode 100644
index 0000000..fd1bdd4
--- /dev/null
+++ b/DSP_API/DOCS/Documentation.txt
@@ -0,0 +1,36 @@
+DSP_API Documentation
+
+Topic: Configuration File
+
+The DSP_API executable requires an associated ".cfg" configuration file.
+By example, the configuration file for FreeDV is FreeDV.cfg.
+
+The ".cfg" file must reside in the same folder as the executable.
+This is currently
+ /nfsroots/microburst/home/root/
+but will be changed in the future when the MODEM executables are
+moved to a protected folder.
+
+It is a text file, and can be composed with a test editor in either Unix
+or Windows format.
+
+All content prior to the '[header]' identifier will be ignored,
+so any free form text can be at the top of the file, prior to the [header].
+
+Currently, the only required [header] information is the
+"Minimum-SmartSDR-Version:" but providing all the information
+in the example is recommended.
+
+The [setup] section contains any or all commands required to
+configure the radio for use with the MODEM.
+
+Empty lines will be skipped.
+
+The end of the configuration transmissions to the radio are
+terminated by either the [end] identifier, or encountering the
+end of file (EOF).
+
+Any text after the [end] identifier will be ignored.
+
+==
+
diff --git a/DSP_API/DOCS/FreeDV.cfg b/DSP_API/DOCS/FreeDV.cfg
new file mode 100644
index 0000000..49e5bcb
--- /dev/null
+++ b/DSP_API/DOCS/FreeDV.cfg
@@ -0,0 +1,21 @@
+[header]
+Name: FreeDV
+Version: 1.0.0
+Minimum-SmartSDR-Version: 1.3.1.0
+Author: FlexRadio Systems
+Support-email: support@flexradio.com
+Support-phone: 512-535-4713
+License: GPL7.3
+
+[setup]
+waveform create name=FreeDV mode=FDV
+waveform set FreeDV tx=1
+waveform set FreeDV rx_filter low_cut=600
+waveform set FreeDV rx_filter high_cut=2400
+waveform set FreeDV rx_filter depth=256
+waveform set FreeDV tx_filter low_cut=600
+waveform set FreeDV tx_filter high_cut=2400
+waveform set FreeDV tx_filter depth=256
+waveform set FreeDV udpport=42000
+sub slice all
+[end]
diff --git a/DSP_API/Debug/CODEC2_FREEDV/codebook.d b/DSP_API/Debug/CODEC2_FREEDV/codebook.d
new file mode 100644
index 0000000..ebb086c
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/codebook.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebook.d CODEC2_FREEDV/codebook.o: \
+ ../CODEC2_FREEDV/codebook.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/codebookd.d b/DSP_API/Debug/CODEC2_FREEDV/codebookd.d
new file mode 100644
index 0000000..f67a726
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/codebookd.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookd.d CODEC2_FREEDV/codebookd.o: \
+ ../CODEC2_FREEDV/codebookd.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/codebookdt.d b/DSP_API/Debug/CODEC2_FREEDV/codebookdt.d
new file mode 100644
index 0000000..93c5b6a
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/codebookdt.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookdt.d CODEC2_FREEDV/codebookdt.o: \
+ ../CODEC2_FREEDV/codebookdt.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/codebookge.d b/DSP_API/Debug/CODEC2_FREEDV/codebookge.d
new file mode 100644
index 0000000..86746f4
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/codebookge.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookge.d CODEC2_FREEDV/codebookge.o: \
+ ../CODEC2_FREEDV/codebookge.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/codebookjnd.d b/DSP_API/Debug/CODEC2_FREEDV/codebookjnd.d
new file mode 100644
index 0000000..75502f4
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/codebookjnd.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookjnd.d CODEC2_FREEDV/codebookjnd.o: \
+ ../CODEC2_FREEDV/codebookjnd.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/codebookjvm.d b/DSP_API/Debug/CODEC2_FREEDV/codebookjvm.d
new file mode 100644
index 0000000..74e67b2
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/codebookjvm.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookjvm.d CODEC2_FREEDV/codebookjvm.o: \
+ ../CODEC2_FREEDV/codebookjvm.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/codebookvq.d b/DSP_API/Debug/CODEC2_FREEDV/codebookvq.d
new file mode 100644
index 0000000..5e5dbd6
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/codebookvq.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookvq.d CODEC2_FREEDV/codebookvq.o: \
+ ../CODEC2_FREEDV/codebookvq.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/codebookvqanssi.d b/DSP_API/Debug/CODEC2_FREEDV/codebookvqanssi.d
new file mode 100644
index 0000000..1302fba
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/codebookvqanssi.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookvqanssi.d CODEC2_FREEDV/codebookvqanssi.o: \
+ ../CODEC2_FREEDV/codebookvqanssi.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/codec2.d b/DSP_API/Debug/CODEC2_FREEDV/codec2.d
new file mode 100644
index 0000000..ab00ecc
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/codec2.d
@@ -0,0 +1,39 @@
+CODEC2_FREEDV/codec2.d CODEC2_FREEDV/codec2.o: ../CODEC2_FREEDV/codec2.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/sine.h \
+ ../CODEC2_FREEDV/comp.h ../CODEC2_FREEDV/kiss_fft.h \
+ ../CODEC2_FREEDV/nlp.h ../CODEC2_FREEDV/dump.h \
+ ../CODEC2_FREEDV/codec2_internal.h ../CODEC2_FREEDV/lpc.h \
+ ../CODEC2_FREEDV/quantise.h ../CODEC2_FREEDV/phase.h \
+ ../CODEC2_FREEDV/interp.h ../CODEC2_FREEDV/postfilter.h \
+ ../CODEC2_FREEDV/codec2.h ../CODEC2_FREEDV/lsp.h \
+ ../CODEC2_FREEDV/machdep.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/sine.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/nlp.h:
+
+../CODEC2_FREEDV/dump.h:
+
+../CODEC2_FREEDV/codec2_internal.h:
+
+../CODEC2_FREEDV/lpc.h:
+
+../CODEC2_FREEDV/quantise.h:
+
+../CODEC2_FREEDV/phase.h:
+
+../CODEC2_FREEDV/interp.h:
+
+../CODEC2_FREEDV/postfilter.h:
+
+../CODEC2_FREEDV/codec2.h:
+
+../CODEC2_FREEDV/lsp.h:
+
+../CODEC2_FREEDV/machdep.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/dump.d b/DSP_API/Debug/CODEC2_FREEDV/dump.d
new file mode 100644
index 0000000..143f68c
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/dump.d
@@ -0,0 +1,14 @@
+CODEC2_FREEDV/dump.d CODEC2_FREEDV/dump.o: ../CODEC2_FREEDV/dump.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/comp.h \
+ ../CODEC2_FREEDV/dump.h ../CODEC2_FREEDV/kiss_fft.h \
+ ../CODEC2_FREEDV/codec2_internal.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/dump.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/codec2_internal.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/fdmdv.d b/DSP_API/Debug/CODEC2_FREEDV/fdmdv.d
new file mode 100644
index 0000000..2a584f5
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/fdmdv.d
@@ -0,0 +1,29 @@
+CODEC2_FREEDV/fdmdv.d CODEC2_FREEDV/fdmdv.o: ../CODEC2_FREEDV/fdmdv.c \
+ ../CODEC2_FREEDV/fdmdv_internal.h ../CODEC2_FREEDV/comp.h \
+ ../CODEC2_FREEDV/codec2_fdmdv.h ../CODEC2_FREEDV/kiss_fft.h \
+ ../CODEC2_FREEDV/rn.h ../CODEC2_FREEDV/rxdec_coeff.h \
+ ../CODEC2_FREEDV/test_bits.h ../CODEC2_FREEDV/pilot_coeff.h \
+ ../CODEC2_FREEDV/hanning.h ../CODEC2_FREEDV/os.h \
+ ../CODEC2_FREEDV/machdep.h
+
+../CODEC2_FREEDV/fdmdv_internal.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/codec2_fdmdv.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/rn.h:
+
+../CODEC2_FREEDV/rxdec_coeff.h:
+
+../CODEC2_FREEDV/test_bits.h:
+
+../CODEC2_FREEDV/pilot_coeff.h:
+
+../CODEC2_FREEDV/hanning.h:
+
+../CODEC2_FREEDV/os.h:
+
+../CODEC2_FREEDV/machdep.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/fifo.d b/DSP_API/Debug/CODEC2_FREEDV/fifo.d
new file mode 100644
index 0000000..5abdc60
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/fifo.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/fifo.d CODEC2_FREEDV/fifo.o: ../CODEC2_FREEDV/fifo.c \
+ ../CODEC2_FREEDV/codec2_fifo.h
+
+../CODEC2_FREEDV/codec2_fifo.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/freedv_api.d b/DSP_API/Debug/CODEC2_FREEDV/freedv_api.d
new file mode 100644
index 0000000..1933c3c
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/freedv_api.d
@@ -0,0 +1,17 @@
+CODEC2_FREEDV/freedv_api.d CODEC2_FREEDV/freedv_api.o: \
+ ../CODEC2_FREEDV/freedv_api.c ../CODEC2_FREEDV/codec2.h \
+ ../CODEC2_FREEDV/codec2_fdmdv.h ../CODEC2_FREEDV/comp.h \
+ ../CODEC2_FREEDV/golay23.h ../CODEC2_FREEDV/varicode.h \
+ ../CODEC2_FREEDV/freedv_api.h
+
+../CODEC2_FREEDV/codec2.h:
+
+../CODEC2_FREEDV/codec2_fdmdv.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/golay23.h:
+
+../CODEC2_FREEDV/varicode.h:
+
+../CODEC2_FREEDV/freedv_api.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/golay23.d b/DSP_API/Debug/CODEC2_FREEDV/golay23.d
new file mode 100644
index 0000000..0059241
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/golay23.d
@@ -0,0 +1,9 @@
+CODEC2_FREEDV/golay23.d CODEC2_FREEDV/golay23.o: \
+ ../CODEC2_FREEDV/golay23.c ../CODEC2_FREEDV/golay23.h \
+ ../CODEC2_FREEDV/golayenctable.h ../CODEC2_FREEDV/golaydectable.h
+
+../CODEC2_FREEDV/golay23.h:
+
+../CODEC2_FREEDV/golayenctable.h:
+
+../CODEC2_FREEDV/golaydectable.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/interp.d b/DSP_API/Debug/CODEC2_FREEDV/interp.d
new file mode 100644
index 0000000..38d3090
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/interp.d
@@ -0,0 +1,16 @@
+CODEC2_FREEDV/interp.d CODEC2_FREEDV/interp.o: ../CODEC2_FREEDV/interp.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/interp.h \
+ ../CODEC2_FREEDV/kiss_fft.h ../CODEC2_FREEDV/lsp.h \
+ ../CODEC2_FREEDV/quantise.h ../CODEC2_FREEDV/comp.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/interp.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/lsp.h:
+
+../CODEC2_FREEDV/quantise.h:
+
+../CODEC2_FREEDV/comp.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/kiss_fft.d b/DSP_API/Debug/CODEC2_FREEDV/kiss_fft.d
new file mode 100644
index 0000000..6f8d4f7
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/kiss_fft.d
@@ -0,0 +1,7 @@
+CODEC2_FREEDV/kiss_fft.d CODEC2_FREEDV/kiss_fft.o: \
+ ../CODEC2_FREEDV/kiss_fft.c ../CODEC2_FREEDV/_kiss_fft_guts.h \
+ ../CODEC2_FREEDV/kiss_fft.h
+
+../CODEC2_FREEDV/_kiss_fft_guts.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/lpc.d b/DSP_API/Debug/CODEC2_FREEDV/lpc.d
new file mode 100644
index 0000000..0c671de
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/lpc.d
@@ -0,0 +1,6 @@
+CODEC2_FREEDV/lpc.d CODEC2_FREEDV/lpc.o: ../CODEC2_FREEDV/lpc.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/lpc.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/lpc.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/lsp.d b/DSP_API/Debug/CODEC2_FREEDV/lsp.d
new file mode 100644
index 0000000..94d5ace
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/lsp.d
@@ -0,0 +1,6 @@
+CODEC2_FREEDV/lsp.d CODEC2_FREEDV/lsp.o: ../CODEC2_FREEDV/lsp.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/lsp.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/lsp.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/nlp.d b/DSP_API/Debug/CODEC2_FREEDV/nlp.d
new file mode 100644
index 0000000..1fb9ad3
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/nlp.d
@@ -0,0 +1,19 @@
+CODEC2_FREEDV/nlp.d CODEC2_FREEDV/nlp.o: ../CODEC2_FREEDV/nlp.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/nlp.h \
+ ../CODEC2_FREEDV/comp.h ../CODEC2_FREEDV/dump.h \
+ ../CODEC2_FREEDV/kiss_fft.h ../CODEC2_FREEDV/codec2_internal.h \
+ ../CODEC2_FREEDV/machdep.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/nlp.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/dump.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/codec2_internal.h:
+
+../CODEC2_FREEDV/machdep.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/pack.d b/DSP_API/Debug/CODEC2_FREEDV/pack.d
new file mode 100644
index 0000000..cd0cdd9
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/pack.d
@@ -0,0 +1,11 @@
+CODEC2_FREEDV/pack.d CODEC2_FREEDV/pack.o: ../CODEC2_FREEDV/pack.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/quantise.h \
+ ../CODEC2_FREEDV/kiss_fft.h ../CODEC2_FREEDV/comp.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/quantise.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/comp.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/phase.d b/DSP_API/Debug/CODEC2_FREEDV/phase.d
new file mode 100644
index 0000000..12c69e1
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/phase.d
@@ -0,0 +1,14 @@
+CODEC2_FREEDV/phase.d CODEC2_FREEDV/phase.o: ../CODEC2_FREEDV/phase.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/phase.h \
+ ../CODEC2_FREEDV/kiss_fft.h ../CODEC2_FREEDV/comp.h \
+ ../CODEC2_FREEDV/sine.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/phase.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/sine.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/postfilter.d b/DSP_API/Debug/CODEC2_FREEDV/postfilter.d
new file mode 100644
index 0000000..7e57f97
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/postfilter.d
@@ -0,0 +1,19 @@
+CODEC2_FREEDV/postfilter.d CODEC2_FREEDV/postfilter.o: \
+ ../CODEC2_FREEDV/postfilter.c ../CODEC2_FREEDV/defines.h \
+ ../CODEC2_FREEDV/comp.h ../CODEC2_FREEDV/dump.h \
+ ../CODEC2_FREEDV/kiss_fft.h ../CODEC2_FREEDV/codec2_internal.h \
+ ../CODEC2_FREEDV/sine.h ../CODEC2_FREEDV/postfilter.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/dump.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/codec2_internal.h:
+
+../CODEC2_FREEDV/sine.h:
+
+../CODEC2_FREEDV/postfilter.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/quantise.d b/DSP_API/Debug/CODEC2_FREEDV/quantise.d
new file mode 100644
index 0000000..d4a81f5
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/quantise.d
@@ -0,0 +1,24 @@
+CODEC2_FREEDV/quantise.d CODEC2_FREEDV/quantise.o: \
+ ../CODEC2_FREEDV/quantise.c ../CODEC2_FREEDV/defines.h \
+ ../CODEC2_FREEDV/dump.h ../CODEC2_FREEDV/comp.h \
+ ../CODEC2_FREEDV/kiss_fft.h ../CODEC2_FREEDV/codec2_internal.h \
+ ../CODEC2_FREEDV/quantise.h ../CODEC2_FREEDV/lpc.h \
+ ../CODEC2_FREEDV/lsp.h ../CODEC2_FREEDV/machdep.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/dump.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/codec2_internal.h:
+
+../CODEC2_FREEDV/quantise.h:
+
+../CODEC2_FREEDV/lpc.h:
+
+../CODEC2_FREEDV/lsp.h:
+
+../CODEC2_FREEDV/machdep.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/sine.d b/DSP_API/Debug/CODEC2_FREEDV/sine.d
new file mode 100644
index 0000000..028cc13
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/sine.d
@@ -0,0 +1,11 @@
+CODEC2_FREEDV/sine.d CODEC2_FREEDV/sine.o: ../CODEC2_FREEDV/sine.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/sine.h \
+ ../CODEC2_FREEDV/comp.h ../CODEC2_FREEDV/kiss_fft.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/sine.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
diff --git a/DSP_API/Debug/CODEC2_FREEDV/subdir.mk b/DSP_API/Debug/CODEC2_FREEDV/subdir.mk
new file mode 100644
index 0000000..5510669
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/subdir.mk
@@ -0,0 +1,96 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+C_SRCS += \
+../CODEC2_FREEDV/codebook.c \
+../CODEC2_FREEDV/codebookd.c \
+../CODEC2_FREEDV/codebookdt.c \
+../CODEC2_FREEDV/codebookge.c \
+../CODEC2_FREEDV/codebookjnd.c \
+../CODEC2_FREEDV/codebookjvm.c \
+../CODEC2_FREEDV/codebookvq.c \
+../CODEC2_FREEDV/codebookvqanssi.c \
+../CODEC2_FREEDV/codec2.c \
+../CODEC2_FREEDV/dump.c \
+../CODEC2_FREEDV/fdmdv.c \
+../CODEC2_FREEDV/fifo.c \
+../CODEC2_FREEDV/freedv_api.c \
+../CODEC2_FREEDV/golay23.c \
+../CODEC2_FREEDV/interp.c \
+../CODEC2_FREEDV/kiss_fft.c \
+../CODEC2_FREEDV/lpc.c \
+../CODEC2_FREEDV/lsp.c \
+../CODEC2_FREEDV/nlp.c \
+../CODEC2_FREEDV/pack.c \
+../CODEC2_FREEDV/phase.c \
+../CODEC2_FREEDV/postfilter.c \
+../CODEC2_FREEDV/quantise.c \
+../CODEC2_FREEDV/sine.c \
+../CODEC2_FREEDV/varicode.c
+
+OBJS += \
+./CODEC2_FREEDV/codebook.o \
+./CODEC2_FREEDV/codebookd.o \
+./CODEC2_FREEDV/codebookdt.o \
+./CODEC2_FREEDV/codebookge.o \
+./CODEC2_FREEDV/codebookjnd.o \
+./CODEC2_FREEDV/codebookjvm.o \
+./CODEC2_FREEDV/codebookvq.o \
+./CODEC2_FREEDV/codebookvqanssi.o \
+./CODEC2_FREEDV/codec2.o \
+./CODEC2_FREEDV/dump.o \
+./CODEC2_FREEDV/fdmdv.o \
+./CODEC2_FREEDV/fifo.o \
+./CODEC2_FREEDV/freedv_api.o \
+./CODEC2_FREEDV/golay23.o \
+./CODEC2_FREEDV/interp.o \
+./CODEC2_FREEDV/kiss_fft.o \
+./CODEC2_FREEDV/lpc.o \
+./CODEC2_FREEDV/lsp.o \
+./CODEC2_FREEDV/nlp.o \
+./CODEC2_FREEDV/pack.o \
+./CODEC2_FREEDV/phase.o \
+./CODEC2_FREEDV/postfilter.o \
+./CODEC2_FREEDV/quantise.o \
+./CODEC2_FREEDV/sine.o \
+./CODEC2_FREEDV/varicode.o
+
+C_DEPS += \
+./CODEC2_FREEDV/codebook.d \
+./CODEC2_FREEDV/codebookd.d \
+./CODEC2_FREEDV/codebookdt.d \
+./CODEC2_FREEDV/codebookge.d \
+./CODEC2_FREEDV/codebookjnd.d \
+./CODEC2_FREEDV/codebookjvm.d \
+./CODEC2_FREEDV/codebookvq.d \
+./CODEC2_FREEDV/codebookvqanssi.d \
+./CODEC2_FREEDV/codec2.d \
+./CODEC2_FREEDV/dump.d \
+./CODEC2_FREEDV/fdmdv.d \
+./CODEC2_FREEDV/fifo.d \
+./CODEC2_FREEDV/freedv_api.d \
+./CODEC2_FREEDV/golay23.d \
+./CODEC2_FREEDV/interp.d \
+./CODEC2_FREEDV/kiss_fft.d \
+./CODEC2_FREEDV/lpc.d \
+./CODEC2_FREEDV/lsp.d \
+./CODEC2_FREEDV/nlp.d \
+./CODEC2_FREEDV/pack.d \
+./CODEC2_FREEDV/phase.d \
+./CODEC2_FREEDV/postfilter.d \
+./CODEC2_FREEDV/quantise.d \
+./CODEC2_FREEDV/sine.d \
+./CODEC2_FREEDV/varicode.d
+
+
+# Each subdirectory must supply rules for building sources it contributes
+CODEC2_FREEDV/%.o: ../CODEC2_FREEDV/%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+ arm-angstrom-linux-gnueabi-gcc -DDEBUG -I"/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV" -I"/src/flex/smartsdr-dsp/DSP_API" -I"/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface" -O0 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -g3 -ggdb -g3 -fstack-protector-all -funwind-tables -Wall -c -fmessage-length=0 -lpthread -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+
diff --git a/DSP_API/Debug/CODEC2_FREEDV/varicode.d b/DSP_API/Debug/CODEC2_FREEDV/varicode.d
new file mode 100644
index 0000000..8a86c3a
--- /dev/null
+++ b/DSP_API/Debug/CODEC2_FREEDV/varicode.d
@@ -0,0 +1,7 @@
+CODEC2_FREEDV/varicode.d CODEC2_FREEDV/varicode.o: \
+ ../CODEC2_FREEDV/varicode.c ../CODEC2_FREEDV/varicode.h \
+ ../CODEC2_FREEDV/varicode_table.h
+
+../CODEC2_FREEDV/varicode.h:
+
+../CODEC2_FREEDV/varicode_table.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/cmd_basics.d b/DSP_API/Debug/SmartSDR_Interface/cmd_basics.d
new file mode 100644
index 0000000..58ec73b
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/cmd_basics.d
@@ -0,0 +1,55 @@
+SmartSDR_Interface/cmd_basics.d SmartSDR_Interface/cmd_basics.o: \
+ ../SmartSDR_Interface/cmd_basics.c \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h ../SmartSDR_Interface/cmd.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+../SmartSDR_Interface/cmd.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/cmd_engine.d b/DSP_API/Debug/SmartSDR_Interface/cmd_engine.d
new file mode 100644
index 0000000..9608aa9
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/cmd_engine.d
@@ -0,0 +1,60 @@
+SmartSDR_Interface/cmd_engine.d SmartSDR_Interface/cmd_engine.o: \
+ ../SmartSDR_Interface/cmd_engine.c ../SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ ../SmartSDR_Interface/../main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/datatypes.h ../SmartSDR_Interface/cmd.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h
+
+../SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+../SmartSDR_Interface/../main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/datatypes.h:
+
+../SmartSDR_Interface/cmd.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/discovery_client.d b/DSP_API/Debug/SmartSDR_Interface/discovery_client.d
new file mode 100644
index 0000000..4bb7515
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/discovery_client.d
@@ -0,0 +1,59 @@
+SmartSDR_Interface/discovery_client.d \
+ SmartSDR_Interface/discovery_client.o: \
+ ../SmartSDR_Interface/discovery_client.c \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/discovery_client.h ../SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/io_utils.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/discovery_client.h:
+
+../SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/io_utils.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/hal_buffer.d b/DSP_API/Debug/SmartSDR_Interface/hal_buffer.d
new file mode 100644
index 0000000..236a440
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/hal_buffer.d
@@ -0,0 +1,53 @@
+SmartSDR_Interface/hal_buffer.d SmartSDR_Interface/hal_buffer.o: \
+ ../SmartSDR_Interface/hal_buffer.c \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/hal_buffer.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/hal_buffer.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/hal_listener.d b/DSP_API/Debug/SmartSDR_Interface/hal_listener.d
new file mode 100644
index 0000000..6253e3c
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/hal_listener.d
@@ -0,0 +1,70 @@
+SmartSDR_Interface/hal_listener.d SmartSDR_Interface/hal_listener.o: \
+ ../SmartSDR_Interface/hal_listener.c ../SmartSDR_Interface/vita.h \
+ ../SmartSDR_Interface/datatypes.h ../SmartSDR_Interface/hal_vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/stream.h ../SmartSDR_Interface/../common.h \
+ ../SmartSDR_Interface/vita_output.h ../SmartSDR_Interface/hal_buffer.h \
+ ../SmartSDR_Interface/sched_waveform.h
+
+../SmartSDR_Interface/vita.h:
+
+../SmartSDR_Interface/datatypes.h:
+
+../SmartSDR_Interface/hal_vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/stream.h:
+
+../SmartSDR_Interface/../common.h:
+
+../SmartSDR_Interface/vita_output.h:
+
+../SmartSDR_Interface/hal_buffer.h:
+
+../SmartSDR_Interface/sched_waveform.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/hal_vita.d b/DSP_API/Debug/SmartSDR_Interface/hal_vita.d
new file mode 100644
index 0000000..702e3f2
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/hal_vita.d
@@ -0,0 +1,57 @@
+SmartSDR_Interface/hal_vita.d SmartSDR_Interface/hal_vita.o: \
+ ../SmartSDR_Interface/hal_vita.c /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/hal_vita.h ../SmartSDR_Interface/datatypes.h \
+ ../SmartSDR_Interface/vita.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/hal_vita.h:
+
+../SmartSDR_Interface/datatypes.h:
+
+../SmartSDR_Interface/vita.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/io_utils.d b/DSP_API/Debug/SmartSDR_Interface/io_utils.d
new file mode 100644
index 0000000..2b64026
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/io_utils.d
@@ -0,0 +1,49 @@
+SmartSDR_Interface/io_utils.d SmartSDR_Interface/io_utils.o: \
+ ../SmartSDR_Interface/io_utils.c /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/sched_waveform.d b/DSP_API/Debug/SmartSDR_Interface/sched_waveform.d
new file mode 100644
index 0000000..92b17c5
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/sched_waveform.d
@@ -0,0 +1,79 @@
+SmartSDR_Interface/sched_waveform.d SmartSDR_Interface/sched_waveform.o: \
+ ../SmartSDR_Interface/sched_waveform.c \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/datatypes.h ../SmartSDR_Interface/hal_buffer.h \
+ ../SmartSDR_Interface/sched_waveform.h \
+ ../SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/freedv_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/varicode.h \
+ /src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/codec2_fdmdv.h \
+ /src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/comp.h \
+ /src/flex/smartsdr-dsp/DSP_API/circular_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/resampler.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/datatypes.h:
+
+../SmartSDR_Interface/hal_buffer.h:
+
+../SmartSDR_Interface/sched_waveform.h:
+
+../SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/freedv_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/varicode.h:
+
+/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/codec2_fdmdv.h:
+
+/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/comp.h:
+
+/src/flex/smartsdr-dsp/DSP_API/circular_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/resampler.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/smartsdr_dsp_api.d b/DSP_API/Debug/SmartSDR_Interface/smartsdr_dsp_api.d
new file mode 100644
index 0000000..738b42e
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/smartsdr_dsp_api.d
@@ -0,0 +1,63 @@
+SmartSDR_Interface/smartsdr_dsp_api.d \
+ SmartSDR_Interface/smartsdr_dsp_api.o: \
+ ../SmartSDR_Interface/smartsdr_dsp_api.c \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/traffic_cop.h \
+ ../SmartSDR_Interface/discovery_client.h \
+ ../SmartSDR_Interface/sched_waveform.h \
+ ../SmartSDR_Interface/hal_buffer.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/traffic_cop.h:
+
+../SmartSDR_Interface/discovery_client.h:
+
+../SmartSDR_Interface/sched_waveform.h:
+
+../SmartSDR_Interface/hal_buffer.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/status_processor.d b/DSP_API/Debug/SmartSDR_Interface/status_processor.d
new file mode 100644
index 0000000..3c1b567
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/status_processor.d
@@ -0,0 +1,54 @@
+SmartSDR_Interface/status_processor.d \
+ SmartSDR_Interface/status_processor.o: \
+ ../SmartSDR_Interface/status_processor.c \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/traffic_cop.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/traffic_cop.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/subdir.mk b/DSP_API/Debug/SmartSDR_Interface/subdir.mk
new file mode 100644
index 0000000..030e117
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/subdir.mk
@@ -0,0 +1,60 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+C_SRCS += \
+../SmartSDR_Interface/cmd_basics.c \
+../SmartSDR_Interface/cmd_engine.c \
+../SmartSDR_Interface/discovery_client.c \
+../SmartSDR_Interface/hal_buffer.c \
+../SmartSDR_Interface/hal_listener.c \
+../SmartSDR_Interface/hal_vita.c \
+../SmartSDR_Interface/io_utils.c \
+../SmartSDR_Interface/sched_waveform.c \
+../SmartSDR_Interface/smartsdr_dsp_api.c \
+../SmartSDR_Interface/status_processor.c \
+../SmartSDR_Interface/traffic_cop.c \
+../SmartSDR_Interface/utils.c \
+../SmartSDR_Interface/vita_output.c
+
+OBJS += \
+./SmartSDR_Interface/cmd_basics.o \
+./SmartSDR_Interface/cmd_engine.o \
+./SmartSDR_Interface/discovery_client.o \
+./SmartSDR_Interface/hal_buffer.o \
+./SmartSDR_Interface/hal_listener.o \
+./SmartSDR_Interface/hal_vita.o \
+./SmartSDR_Interface/io_utils.o \
+./SmartSDR_Interface/sched_waveform.o \
+./SmartSDR_Interface/smartsdr_dsp_api.o \
+./SmartSDR_Interface/status_processor.o \
+./SmartSDR_Interface/traffic_cop.o \
+./SmartSDR_Interface/utils.o \
+./SmartSDR_Interface/vita_output.o
+
+C_DEPS += \
+./SmartSDR_Interface/cmd_basics.d \
+./SmartSDR_Interface/cmd_engine.d \
+./SmartSDR_Interface/discovery_client.d \
+./SmartSDR_Interface/hal_buffer.d \
+./SmartSDR_Interface/hal_listener.d \
+./SmartSDR_Interface/hal_vita.d \
+./SmartSDR_Interface/io_utils.d \
+./SmartSDR_Interface/sched_waveform.d \
+./SmartSDR_Interface/smartsdr_dsp_api.d \
+./SmartSDR_Interface/status_processor.d \
+./SmartSDR_Interface/traffic_cop.d \
+./SmartSDR_Interface/utils.d \
+./SmartSDR_Interface/vita_output.d
+
+
+# Each subdirectory must supply rules for building sources it contributes
+SmartSDR_Interface/%.o: ../SmartSDR_Interface/%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+ arm-angstrom-linux-gnueabi-gcc -DDEBUG -I"/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV" -I"/src/flex/smartsdr-dsp/DSP_API" -I"/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface" -O0 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -g3 -ggdb -g3 -fstack-protector-all -funwind-tables -Wall -c -fmessage-length=0 -lpthread -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+
diff --git a/DSP_API/Debug/SmartSDR_Interface/traffic_cop.d b/DSP_API/Debug/SmartSDR_Interface/traffic_cop.d
new file mode 100644
index 0000000..3d8e076
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/traffic_cop.d
@@ -0,0 +1,56 @@
+SmartSDR_Interface/traffic_cop.d SmartSDR_Interface/traffic_cop.o: \
+ ../SmartSDR_Interface/traffic_cop.c \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/traffic_cop.h \
+ ../SmartSDR_Interface/status_processor.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/traffic_cop.h:
+
+../SmartSDR_Interface/status_processor.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/utils.d b/DSP_API/Debug/SmartSDR_Interface/utils.d
new file mode 100644
index 0000000..1c6e540
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/utils.d
@@ -0,0 +1,49 @@
+SmartSDR_Interface/utils.d SmartSDR_Interface/utils.o: \
+ ../SmartSDR_Interface/utils.c /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
diff --git a/DSP_API/Debug/SmartSDR_Interface/vita_output.d b/DSP_API/Debug/SmartSDR_Interface/vita_output.d
new file mode 100644
index 0000000..63bdb3c
--- /dev/null
+++ b/DSP_API/Debug/SmartSDR_Interface/vita_output.d
@@ -0,0 +1,56 @@
+SmartSDR_Interface/vita_output.d SmartSDR_Interface/vita_output.o: \
+ ../SmartSDR_Interface/vita_output.c ../SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/complex.h ../SmartSDR_Interface/datatypes.h \
+ ../SmartSDR_Interface/hal_buffer.h ../SmartSDR_Interface/hal_listener.h
+
+../SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/complex.h:
+
+../SmartSDR_Interface/datatypes.h:
+
+../SmartSDR_Interface/hal_buffer.h:
+
+../SmartSDR_Interface/hal_listener.h:
diff --git a/DSP_API/Debug/circular_buffer.d b/DSP_API/Debug/circular_buffer.d
new file mode 100644
index 0000000..f781000
--- /dev/null
+++ b/DSP_API/Debug/circular_buffer.d
@@ -0,0 +1,4 @@
+circular_buffer.d circular_buffer.o: ../circular_buffer.c \
+ ../circular_buffer.h
+
+../circular_buffer.h:
diff --git a/DSP_API/Debug/freedv b/DSP_API/Debug/freedv
new file mode 100755
index 0000000..029fb5e
Binary files /dev/null and b/DSP_API/Debug/freedv differ
diff --git a/DSP_API/Debug/main.d b/DSP_API/Debug/main.d
new file mode 100644
index 0000000..20aa287
--- /dev/null
+++ b/DSP_API/Debug/main.d
@@ -0,0 +1,52 @@
+main.d main.o: ../main.c \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h \
+ ../common.h
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_buffer.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/traffic_cop.h:
+
+../common.h:
diff --git a/DSP_API/Debug/makefile b/DSP_API/Debug/makefile
new file mode 100644
index 0000000..bb85305
--- /dev/null
+++ b/DSP_API/Debug/makefile
@@ -0,0 +1,65 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+-include ../makefile.init
+
+RM := rm -rf
+
+# All of the sources participating in the build are defined here
+-include sources.mk
+-include SmartSDR_Interface/subdir.mk
+-include CODEC2_FREEDV/subdir.mk
+-include subdir.mk
+-include objects.mk
+
+ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(strip $(C++_DEPS)),)
+-include $(C++_DEPS)
+endif
+ifneq ($(strip $(C_DEPS)),)
+-include $(C_DEPS)
+endif
+ifneq ($(strip $(CC_DEPS)),)
+-include $(CC_DEPS)
+endif
+ifneq ($(strip $(CPP_DEPS)),)
+-include $(CPP_DEPS)
+endif
+ifneq ($(strip $(CXX_DEPS)),)
+-include $(CXX_DEPS)
+endif
+ifneq ($(strip $(C_UPPER_DEPS)),)
+-include $(C_UPPER_DEPS)
+endif
+endif
+
+-include ../makefile.defs
+
+# Add inputs and outputs from these tool invocations to the build variables
+
+# All Target
+all: freedv
+
+# Tool invocations
+freedv: $(OBJS) $(USER_OBJS)
+ @echo 'Building target: $@'
+ @echo 'Invoking: GCC C++ Linker'
+ arm-angstrom-linux-gnueabi-gcc -rdynamic -o "freedv" $(OBJS) $(USER_OBJS) $(LIBS)
+ @echo 'Finished building target: $@'
+ @echo ' '
+ $(MAKE) --no-print-directory post-build
+
+# Other Targets
+clean:
+ -$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) freedv
+ -@echo ' '
+
+post-build:
+ -cp freedv /nfsroots/microburst/home/root/
+ -@echo ' '
+
+.PHONY: all clean dependents
+.SECONDARY: post-build
+
+-include ../makefile.targets
diff --git a/DSP_API/Debug/objects.mk b/DSP_API/Debug/objects.mk
new file mode 100644
index 0000000..1d9c7be
--- /dev/null
+++ b/DSP_API/Debug/objects.mk
@@ -0,0 +1,8 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+USER_OBJS :=
+
+LIBS := -lpthread -lrt -lm
+
diff --git a/DSP_API/Debug/resampler.d b/DSP_API/Debug/resampler.d
new file mode 100644
index 0000000..f0ec40b
--- /dev/null
+++ b/DSP_API/Debug/resampler.d
@@ -0,0 +1,3 @@
+resampler.d resampler.o: ../resampler.c ../resampler.h
+
+../resampler.h:
diff --git a/DSP_API/Debug/sources.mk b/DSP_API/Debug/sources.mk
new file mode 100644
index 0000000..6f3a47e
--- /dev/null
+++ b/DSP_API/Debug/sources.mk
@@ -0,0 +1,29 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+O_SRCS :=
+CPP_SRCS :=
+C_UPPER_SRCS :=
+C_SRCS :=
+S_UPPER_SRCS :=
+OBJ_SRCS :=
+ASM_SRCS :=
+CXX_SRCS :=
+C++_SRCS :=
+CC_SRCS :=
+OBJS :=
+C++_DEPS :=
+C_DEPS :=
+CC_DEPS :=
+CPP_DEPS :=
+EXECUTABLES :=
+CXX_DEPS :=
+C_UPPER_DEPS :=
+
+# Every subdirectory with source files must be described here
+SUBDIRS := \
+. \
+SmartSDR_Interface \
+CODEC2_FREEDV \
+
diff --git a/DSP_API/Debug/subdir.mk b/DSP_API/Debug/subdir.mk
new file mode 100644
index 0000000..6b306df
--- /dev/null
+++ b/DSP_API/Debug/subdir.mk
@@ -0,0 +1,30 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+C_SRCS += \
+../circular_buffer.c \
+../main.c \
+../resampler.c
+
+OBJS += \
+./circular_buffer.o \
+./main.o \
+./resampler.o
+
+C_DEPS += \
+./circular_buffer.d \
+./main.d \
+./resampler.d
+
+
+# Each subdirectory must supply rules for building sources it contributes
+%.o: ../%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+ arm-angstrom-linux-gnueabi-gcc -DDEBUG -I"/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV" -I"/src/flex/smartsdr-dsp/DSP_API" -I"/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface" -O0 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -g3 -ggdb -g3 -fstack-protector-all -funwind-tables -Wall -c -fmessage-length=0 -lpthread -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+
diff --git a/DSP_API/Release/CODEC2_FREEDV/codebook.d b/DSP_API/Release/CODEC2_FREEDV/codebook.d
new file mode 100644
index 0000000..ebb086c
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/codebook.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebook.d CODEC2_FREEDV/codebook.o: \
+ ../CODEC2_FREEDV/codebook.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/codebookd.d b/DSP_API/Release/CODEC2_FREEDV/codebookd.d
new file mode 100644
index 0000000..f67a726
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/codebookd.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookd.d CODEC2_FREEDV/codebookd.o: \
+ ../CODEC2_FREEDV/codebookd.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/codebookdt.d b/DSP_API/Release/CODEC2_FREEDV/codebookdt.d
new file mode 100644
index 0000000..93c5b6a
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/codebookdt.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookdt.d CODEC2_FREEDV/codebookdt.o: \
+ ../CODEC2_FREEDV/codebookdt.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/codebookge.d b/DSP_API/Release/CODEC2_FREEDV/codebookge.d
new file mode 100644
index 0000000..86746f4
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/codebookge.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookge.d CODEC2_FREEDV/codebookge.o: \
+ ../CODEC2_FREEDV/codebookge.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/codebookjnd.d b/DSP_API/Release/CODEC2_FREEDV/codebookjnd.d
new file mode 100644
index 0000000..75502f4
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/codebookjnd.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookjnd.d CODEC2_FREEDV/codebookjnd.o: \
+ ../CODEC2_FREEDV/codebookjnd.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/codebookjvm.d b/DSP_API/Release/CODEC2_FREEDV/codebookjvm.d
new file mode 100644
index 0000000..74e67b2
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/codebookjvm.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookjvm.d CODEC2_FREEDV/codebookjvm.o: \
+ ../CODEC2_FREEDV/codebookjvm.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/codebookvq.d b/DSP_API/Release/CODEC2_FREEDV/codebookvq.d
new file mode 100644
index 0000000..5e5dbd6
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/codebookvq.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookvq.d CODEC2_FREEDV/codebookvq.o: \
+ ../CODEC2_FREEDV/codebookvq.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/codebookvqanssi.d b/DSP_API/Release/CODEC2_FREEDV/codebookvqanssi.d
new file mode 100644
index 0000000..1302fba
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/codebookvqanssi.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/codebookvqanssi.d CODEC2_FREEDV/codebookvqanssi.o: \
+ ../CODEC2_FREEDV/codebookvqanssi.c ../CODEC2_FREEDV/defines.h
+
+../CODEC2_FREEDV/defines.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/codec2.d b/DSP_API/Release/CODEC2_FREEDV/codec2.d
new file mode 100644
index 0000000..ab00ecc
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/codec2.d
@@ -0,0 +1,39 @@
+CODEC2_FREEDV/codec2.d CODEC2_FREEDV/codec2.o: ../CODEC2_FREEDV/codec2.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/sine.h \
+ ../CODEC2_FREEDV/comp.h ../CODEC2_FREEDV/kiss_fft.h \
+ ../CODEC2_FREEDV/nlp.h ../CODEC2_FREEDV/dump.h \
+ ../CODEC2_FREEDV/codec2_internal.h ../CODEC2_FREEDV/lpc.h \
+ ../CODEC2_FREEDV/quantise.h ../CODEC2_FREEDV/phase.h \
+ ../CODEC2_FREEDV/interp.h ../CODEC2_FREEDV/postfilter.h \
+ ../CODEC2_FREEDV/codec2.h ../CODEC2_FREEDV/lsp.h \
+ ../CODEC2_FREEDV/machdep.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/sine.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/nlp.h:
+
+../CODEC2_FREEDV/dump.h:
+
+../CODEC2_FREEDV/codec2_internal.h:
+
+../CODEC2_FREEDV/lpc.h:
+
+../CODEC2_FREEDV/quantise.h:
+
+../CODEC2_FREEDV/phase.h:
+
+../CODEC2_FREEDV/interp.h:
+
+../CODEC2_FREEDV/postfilter.h:
+
+../CODEC2_FREEDV/codec2.h:
+
+../CODEC2_FREEDV/lsp.h:
+
+../CODEC2_FREEDV/machdep.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/dump.d b/DSP_API/Release/CODEC2_FREEDV/dump.d
new file mode 100644
index 0000000..143f68c
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/dump.d
@@ -0,0 +1,14 @@
+CODEC2_FREEDV/dump.d CODEC2_FREEDV/dump.o: ../CODEC2_FREEDV/dump.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/comp.h \
+ ../CODEC2_FREEDV/dump.h ../CODEC2_FREEDV/kiss_fft.h \
+ ../CODEC2_FREEDV/codec2_internal.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/dump.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/codec2_internal.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/fdmdv.d b/DSP_API/Release/CODEC2_FREEDV/fdmdv.d
new file mode 100644
index 0000000..2a584f5
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/fdmdv.d
@@ -0,0 +1,29 @@
+CODEC2_FREEDV/fdmdv.d CODEC2_FREEDV/fdmdv.o: ../CODEC2_FREEDV/fdmdv.c \
+ ../CODEC2_FREEDV/fdmdv_internal.h ../CODEC2_FREEDV/comp.h \
+ ../CODEC2_FREEDV/codec2_fdmdv.h ../CODEC2_FREEDV/kiss_fft.h \
+ ../CODEC2_FREEDV/rn.h ../CODEC2_FREEDV/rxdec_coeff.h \
+ ../CODEC2_FREEDV/test_bits.h ../CODEC2_FREEDV/pilot_coeff.h \
+ ../CODEC2_FREEDV/hanning.h ../CODEC2_FREEDV/os.h \
+ ../CODEC2_FREEDV/machdep.h
+
+../CODEC2_FREEDV/fdmdv_internal.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/codec2_fdmdv.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/rn.h:
+
+../CODEC2_FREEDV/rxdec_coeff.h:
+
+../CODEC2_FREEDV/test_bits.h:
+
+../CODEC2_FREEDV/pilot_coeff.h:
+
+../CODEC2_FREEDV/hanning.h:
+
+../CODEC2_FREEDV/os.h:
+
+../CODEC2_FREEDV/machdep.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/fifo.d b/DSP_API/Release/CODEC2_FREEDV/fifo.d
new file mode 100644
index 0000000..5abdc60
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/fifo.d
@@ -0,0 +1,4 @@
+CODEC2_FREEDV/fifo.d CODEC2_FREEDV/fifo.o: ../CODEC2_FREEDV/fifo.c \
+ ../CODEC2_FREEDV/codec2_fifo.h
+
+../CODEC2_FREEDV/codec2_fifo.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/freedv_api.d b/DSP_API/Release/CODEC2_FREEDV/freedv_api.d
new file mode 100644
index 0000000..1933c3c
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/freedv_api.d
@@ -0,0 +1,17 @@
+CODEC2_FREEDV/freedv_api.d CODEC2_FREEDV/freedv_api.o: \
+ ../CODEC2_FREEDV/freedv_api.c ../CODEC2_FREEDV/codec2.h \
+ ../CODEC2_FREEDV/codec2_fdmdv.h ../CODEC2_FREEDV/comp.h \
+ ../CODEC2_FREEDV/golay23.h ../CODEC2_FREEDV/varicode.h \
+ ../CODEC2_FREEDV/freedv_api.h
+
+../CODEC2_FREEDV/codec2.h:
+
+../CODEC2_FREEDV/codec2_fdmdv.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/golay23.h:
+
+../CODEC2_FREEDV/varicode.h:
+
+../CODEC2_FREEDV/freedv_api.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/golay23.d b/DSP_API/Release/CODEC2_FREEDV/golay23.d
new file mode 100644
index 0000000..0059241
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/golay23.d
@@ -0,0 +1,9 @@
+CODEC2_FREEDV/golay23.d CODEC2_FREEDV/golay23.o: \
+ ../CODEC2_FREEDV/golay23.c ../CODEC2_FREEDV/golay23.h \
+ ../CODEC2_FREEDV/golayenctable.h ../CODEC2_FREEDV/golaydectable.h
+
+../CODEC2_FREEDV/golay23.h:
+
+../CODEC2_FREEDV/golayenctable.h:
+
+../CODEC2_FREEDV/golaydectable.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/interp.d b/DSP_API/Release/CODEC2_FREEDV/interp.d
new file mode 100644
index 0000000..38d3090
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/interp.d
@@ -0,0 +1,16 @@
+CODEC2_FREEDV/interp.d CODEC2_FREEDV/interp.o: ../CODEC2_FREEDV/interp.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/interp.h \
+ ../CODEC2_FREEDV/kiss_fft.h ../CODEC2_FREEDV/lsp.h \
+ ../CODEC2_FREEDV/quantise.h ../CODEC2_FREEDV/comp.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/interp.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/lsp.h:
+
+../CODEC2_FREEDV/quantise.h:
+
+../CODEC2_FREEDV/comp.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/kiss_fft.d b/DSP_API/Release/CODEC2_FREEDV/kiss_fft.d
new file mode 100644
index 0000000..6f8d4f7
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/kiss_fft.d
@@ -0,0 +1,7 @@
+CODEC2_FREEDV/kiss_fft.d CODEC2_FREEDV/kiss_fft.o: \
+ ../CODEC2_FREEDV/kiss_fft.c ../CODEC2_FREEDV/_kiss_fft_guts.h \
+ ../CODEC2_FREEDV/kiss_fft.h
+
+../CODEC2_FREEDV/_kiss_fft_guts.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/lpc.d b/DSP_API/Release/CODEC2_FREEDV/lpc.d
new file mode 100644
index 0000000..0c671de
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/lpc.d
@@ -0,0 +1,6 @@
+CODEC2_FREEDV/lpc.d CODEC2_FREEDV/lpc.o: ../CODEC2_FREEDV/lpc.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/lpc.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/lpc.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/lsp.d b/DSP_API/Release/CODEC2_FREEDV/lsp.d
new file mode 100644
index 0000000..94d5ace
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/lsp.d
@@ -0,0 +1,6 @@
+CODEC2_FREEDV/lsp.d CODEC2_FREEDV/lsp.o: ../CODEC2_FREEDV/lsp.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/lsp.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/lsp.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/nlp.d b/DSP_API/Release/CODEC2_FREEDV/nlp.d
new file mode 100644
index 0000000..1fb9ad3
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/nlp.d
@@ -0,0 +1,19 @@
+CODEC2_FREEDV/nlp.d CODEC2_FREEDV/nlp.o: ../CODEC2_FREEDV/nlp.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/nlp.h \
+ ../CODEC2_FREEDV/comp.h ../CODEC2_FREEDV/dump.h \
+ ../CODEC2_FREEDV/kiss_fft.h ../CODEC2_FREEDV/codec2_internal.h \
+ ../CODEC2_FREEDV/machdep.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/nlp.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/dump.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/codec2_internal.h:
+
+../CODEC2_FREEDV/machdep.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/pack.d b/DSP_API/Release/CODEC2_FREEDV/pack.d
new file mode 100644
index 0000000..cd0cdd9
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/pack.d
@@ -0,0 +1,11 @@
+CODEC2_FREEDV/pack.d CODEC2_FREEDV/pack.o: ../CODEC2_FREEDV/pack.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/quantise.h \
+ ../CODEC2_FREEDV/kiss_fft.h ../CODEC2_FREEDV/comp.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/quantise.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/comp.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/phase.d b/DSP_API/Release/CODEC2_FREEDV/phase.d
new file mode 100644
index 0000000..12c69e1
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/phase.d
@@ -0,0 +1,14 @@
+CODEC2_FREEDV/phase.d CODEC2_FREEDV/phase.o: ../CODEC2_FREEDV/phase.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/phase.h \
+ ../CODEC2_FREEDV/kiss_fft.h ../CODEC2_FREEDV/comp.h \
+ ../CODEC2_FREEDV/sine.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/phase.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/sine.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/postfilter.d b/DSP_API/Release/CODEC2_FREEDV/postfilter.d
new file mode 100644
index 0000000..7e57f97
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/postfilter.d
@@ -0,0 +1,19 @@
+CODEC2_FREEDV/postfilter.d CODEC2_FREEDV/postfilter.o: \
+ ../CODEC2_FREEDV/postfilter.c ../CODEC2_FREEDV/defines.h \
+ ../CODEC2_FREEDV/comp.h ../CODEC2_FREEDV/dump.h \
+ ../CODEC2_FREEDV/kiss_fft.h ../CODEC2_FREEDV/codec2_internal.h \
+ ../CODEC2_FREEDV/sine.h ../CODEC2_FREEDV/postfilter.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/dump.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/codec2_internal.h:
+
+../CODEC2_FREEDV/sine.h:
+
+../CODEC2_FREEDV/postfilter.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/quantise.d b/DSP_API/Release/CODEC2_FREEDV/quantise.d
new file mode 100644
index 0000000..d4a81f5
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/quantise.d
@@ -0,0 +1,24 @@
+CODEC2_FREEDV/quantise.d CODEC2_FREEDV/quantise.o: \
+ ../CODEC2_FREEDV/quantise.c ../CODEC2_FREEDV/defines.h \
+ ../CODEC2_FREEDV/dump.h ../CODEC2_FREEDV/comp.h \
+ ../CODEC2_FREEDV/kiss_fft.h ../CODEC2_FREEDV/codec2_internal.h \
+ ../CODEC2_FREEDV/quantise.h ../CODEC2_FREEDV/lpc.h \
+ ../CODEC2_FREEDV/lsp.h ../CODEC2_FREEDV/machdep.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/dump.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
+
+../CODEC2_FREEDV/codec2_internal.h:
+
+../CODEC2_FREEDV/quantise.h:
+
+../CODEC2_FREEDV/lpc.h:
+
+../CODEC2_FREEDV/lsp.h:
+
+../CODEC2_FREEDV/machdep.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/sine.d b/DSP_API/Release/CODEC2_FREEDV/sine.d
new file mode 100644
index 0000000..028cc13
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/sine.d
@@ -0,0 +1,11 @@
+CODEC2_FREEDV/sine.d CODEC2_FREEDV/sine.o: ../CODEC2_FREEDV/sine.c \
+ ../CODEC2_FREEDV/defines.h ../CODEC2_FREEDV/sine.h \
+ ../CODEC2_FREEDV/comp.h ../CODEC2_FREEDV/kiss_fft.h
+
+../CODEC2_FREEDV/defines.h:
+
+../CODEC2_FREEDV/sine.h:
+
+../CODEC2_FREEDV/comp.h:
+
+../CODEC2_FREEDV/kiss_fft.h:
diff --git a/DSP_API/Release/CODEC2_FREEDV/subdir.mk b/DSP_API/Release/CODEC2_FREEDV/subdir.mk
new file mode 100644
index 0000000..1152b14
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/subdir.mk
@@ -0,0 +1,96 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+C_SRCS += \
+../CODEC2_FREEDV/codebook.c \
+../CODEC2_FREEDV/codebookd.c \
+../CODEC2_FREEDV/codebookdt.c \
+../CODEC2_FREEDV/codebookge.c \
+../CODEC2_FREEDV/codebookjnd.c \
+../CODEC2_FREEDV/codebookjvm.c \
+../CODEC2_FREEDV/codebookvq.c \
+../CODEC2_FREEDV/codebookvqanssi.c \
+../CODEC2_FREEDV/codec2.c \
+../CODEC2_FREEDV/dump.c \
+../CODEC2_FREEDV/fdmdv.c \
+../CODEC2_FREEDV/fifo.c \
+../CODEC2_FREEDV/freedv_api.c \
+../CODEC2_FREEDV/golay23.c \
+../CODEC2_FREEDV/interp.c \
+../CODEC2_FREEDV/kiss_fft.c \
+../CODEC2_FREEDV/lpc.c \
+../CODEC2_FREEDV/lsp.c \
+../CODEC2_FREEDV/nlp.c \
+../CODEC2_FREEDV/pack.c \
+../CODEC2_FREEDV/phase.c \
+../CODEC2_FREEDV/postfilter.c \
+../CODEC2_FREEDV/quantise.c \
+../CODEC2_FREEDV/sine.c \
+../CODEC2_FREEDV/varicode.c
+
+OBJS += \
+./CODEC2_FREEDV/codebook.o \
+./CODEC2_FREEDV/codebookd.o \
+./CODEC2_FREEDV/codebookdt.o \
+./CODEC2_FREEDV/codebookge.o \
+./CODEC2_FREEDV/codebookjnd.o \
+./CODEC2_FREEDV/codebookjvm.o \
+./CODEC2_FREEDV/codebookvq.o \
+./CODEC2_FREEDV/codebookvqanssi.o \
+./CODEC2_FREEDV/codec2.o \
+./CODEC2_FREEDV/dump.o \
+./CODEC2_FREEDV/fdmdv.o \
+./CODEC2_FREEDV/fifo.o \
+./CODEC2_FREEDV/freedv_api.o \
+./CODEC2_FREEDV/golay23.o \
+./CODEC2_FREEDV/interp.o \
+./CODEC2_FREEDV/kiss_fft.o \
+./CODEC2_FREEDV/lpc.o \
+./CODEC2_FREEDV/lsp.o \
+./CODEC2_FREEDV/nlp.o \
+./CODEC2_FREEDV/pack.o \
+./CODEC2_FREEDV/phase.o \
+./CODEC2_FREEDV/postfilter.o \
+./CODEC2_FREEDV/quantise.o \
+./CODEC2_FREEDV/sine.o \
+./CODEC2_FREEDV/varicode.o
+
+C_DEPS += \
+./CODEC2_FREEDV/codebook.d \
+./CODEC2_FREEDV/codebookd.d \
+./CODEC2_FREEDV/codebookdt.d \
+./CODEC2_FREEDV/codebookge.d \
+./CODEC2_FREEDV/codebookjnd.d \
+./CODEC2_FREEDV/codebookjvm.d \
+./CODEC2_FREEDV/codebookvq.d \
+./CODEC2_FREEDV/codebookvqanssi.d \
+./CODEC2_FREEDV/codec2.d \
+./CODEC2_FREEDV/dump.d \
+./CODEC2_FREEDV/fdmdv.d \
+./CODEC2_FREEDV/fifo.d \
+./CODEC2_FREEDV/freedv_api.d \
+./CODEC2_FREEDV/golay23.d \
+./CODEC2_FREEDV/interp.d \
+./CODEC2_FREEDV/kiss_fft.d \
+./CODEC2_FREEDV/lpc.d \
+./CODEC2_FREEDV/lsp.d \
+./CODEC2_FREEDV/nlp.d \
+./CODEC2_FREEDV/pack.d \
+./CODEC2_FREEDV/phase.d \
+./CODEC2_FREEDV/postfilter.d \
+./CODEC2_FREEDV/quantise.d \
+./CODEC2_FREEDV/sine.d \
+./CODEC2_FREEDV/varicode.d
+
+
+# Each subdirectory must supply rules for building sources it contributes
+CODEC2_FREEDV/%.o: ../CODEC2_FREEDV/%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+ arm-angstrom-linux-gnueabi-gcc -I"/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV" -I"/src/flex/smartsdr-dsp/DSP_API" -I"/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface" -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -Wall -c -fmessage-length=0 -lpthread -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+
diff --git a/DSP_API/Release/CODEC2_FREEDV/varicode.d b/DSP_API/Release/CODEC2_FREEDV/varicode.d
new file mode 100644
index 0000000..8a86c3a
--- /dev/null
+++ b/DSP_API/Release/CODEC2_FREEDV/varicode.d
@@ -0,0 +1,7 @@
+CODEC2_FREEDV/varicode.d CODEC2_FREEDV/varicode.o: \
+ ../CODEC2_FREEDV/varicode.c ../CODEC2_FREEDV/varicode.h \
+ ../CODEC2_FREEDV/varicode_table.h
+
+../CODEC2_FREEDV/varicode.h:
+
+../CODEC2_FREEDV/varicode_table.h:
diff --git a/DSP_API/Release/SmartSDR_Interface/cmd_basics.d b/DSP_API/Release/SmartSDR_Interface/cmd_basics.d
new file mode 100644
index 0000000..f3fe20c
--- /dev/null
+++ b/DSP_API/Release/SmartSDR_Interface/cmd_basics.d
@@ -0,0 +1,63 @@
+SmartSDR_Interface/cmd_basics.d SmartSDR_Interface/cmd_basics.o: \
+ ../SmartSDR_Interface/cmd_basics.c ../SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ ../SmartSDR_Interface/../main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/../main.h ../SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/messages.h
+
+../SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+../SmartSDR_Interface/../main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/../main.h:
+
+../SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/messages.h:
diff --git a/DSP_API/Release/SmartSDR_Interface/cmd_engine.d b/DSP_API/Release/SmartSDR_Interface/cmd_engine.d
new file mode 100644
index 0000000..aa9134e
--- /dev/null
+++ b/DSP_API/Release/SmartSDR_Interface/cmd_engine.d
@@ -0,0 +1,63 @@
+SmartSDR_Interface/cmd_engine.d SmartSDR_Interface/cmd_engine.o: \
+ ../SmartSDR_Interface/cmd_engine.c ../SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ ../SmartSDR_Interface/../main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/datatypes.h ../SmartSDR_Interface/tcp_cmd_server.h \
+ ../SmartSDR_Interface/cmd.h
+
+../SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+../SmartSDR_Interface/../main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/datatypes.h:
+
+../SmartSDR_Interface/tcp_cmd_server.h:
+
+../SmartSDR_Interface/cmd.h:
diff --git a/DSP_API/Release/SmartSDR_Interface/hal_buffer.d b/DSP_API/Release/SmartSDR_Interface/hal_buffer.d
new file mode 100644
index 0000000..402387f
--- /dev/null
+++ b/DSP_API/Release/SmartSDR_Interface/hal_buffer.d
@@ -0,0 +1,60 @@
+SmartSDR_Interface/hal_buffer.d SmartSDR_Interface/hal_buffer.o: \
+ ../SmartSDR_Interface/hal_buffer.c ../SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ ../SmartSDR_Interface/../main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/hal_buffer.h ../SmartSDR_Interface/datatypes.h
+
+../SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+../SmartSDR_Interface/../main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/hal_buffer.h:
+
+../SmartSDR_Interface/datatypes.h:
diff --git a/DSP_API/Release/SmartSDR_Interface/hal_listener.d b/DSP_API/Release/SmartSDR_Interface/hal_listener.d
new file mode 100644
index 0000000..2fcda3d
--- /dev/null
+++ b/DSP_API/Release/SmartSDR_Interface/hal_listener.d
@@ -0,0 +1,2 @@
+SmartSDR_Interface/hal_listener.d SmartSDR_Interface/hal_listener.o: \
+ ../SmartSDR_Interface/hal_listener.c
diff --git a/DSP_API/Release/SmartSDR_Interface/hal_vita.d b/DSP_API/Release/SmartSDR_Interface/hal_vita.d
new file mode 100644
index 0000000..ae05f87
--- /dev/null
+++ b/DSP_API/Release/SmartSDR_Interface/hal_vita.d
@@ -0,0 +1,63 @@
+SmartSDR_Interface/hal_vita.d SmartSDR_Interface/hal_vita.o: \
+ ../SmartSDR_Interface/hal_vita.c ../SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ ../SmartSDR_Interface/../main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/hal_vita.h ../SmartSDR_Interface/datatypes.h \
+ ../SmartSDR_Interface/vita.h
+
+../SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+../SmartSDR_Interface/../main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/hal_vita.h:
+
+../SmartSDR_Interface/datatypes.h:
+
+../SmartSDR_Interface/vita.h:
diff --git a/DSP_API/Release/SmartSDR_Interface/io_utils.d b/DSP_API/Release/SmartSDR_Interface/io_utils.d
new file mode 100644
index 0000000..111e314
--- /dev/null
+++ b/DSP_API/Release/SmartSDR_Interface/io_utils.d
@@ -0,0 +1,55 @@
+SmartSDR_Interface/io_utils.d SmartSDR_Interface/io_utils.o: \
+ ../SmartSDR_Interface/io_utils.c ../SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ ../SmartSDR_Interface/../main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h
+
+../SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+../SmartSDR_Interface/../main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
diff --git a/DSP_API/Release/SmartSDR_Interface/smartsdr_dsp_api.d b/DSP_API/Release/SmartSDR_Interface/smartsdr_dsp_api.d
new file mode 100644
index 0000000..da32dd1
--- /dev/null
+++ b/DSP_API/Release/SmartSDR_Interface/smartsdr_dsp_api.d
@@ -0,0 +1,57 @@
+SmartSDR_Interface/smartsdr_dsp_api.d \
+ SmartSDR_Interface/smartsdr_dsp_api.o: \
+ ../SmartSDR_Interface/smartsdr_dsp_api.c \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/traffic_cop.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/traffic_cop.h:
diff --git a/DSP_API/Release/SmartSDR_Interface/status_processor.d b/DSP_API/Release/SmartSDR_Interface/status_processor.d
new file mode 100644
index 0000000..7c3b5c1
--- /dev/null
+++ b/DSP_API/Release/SmartSDR_Interface/status_processor.d
@@ -0,0 +1,54 @@
+SmartSDR_Interface/status_processor.d \
+ SmartSDR_Interface/status_processor.o: \
+ ../SmartSDR_Interface/status_processor.c \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
diff --git a/DSP_API/Release/SmartSDR_Interface/subdir.mk b/DSP_API/Release/SmartSDR_Interface/subdir.mk
new file mode 100644
index 0000000..1503cd3
--- /dev/null
+++ b/DSP_API/Release/SmartSDR_Interface/subdir.mk
@@ -0,0 +1,54 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+C_SRCS += \
+../SmartSDR_Interface/cmd_basics.c \
+../SmartSDR_Interface/cmd_engine.c \
+../SmartSDR_Interface/hal_buffer.c \
+../SmartSDR_Interface/hal_listener.c \
+../SmartSDR_Interface/hal_vita.c \
+../SmartSDR_Interface/io_utils.c \
+../SmartSDR_Interface/smartsdr_dsp_api.c \
+../SmartSDR_Interface/status_processor.c \
+../SmartSDR_Interface/traffic_cop.c \
+../SmartSDR_Interface/utils.c \
+../SmartSDR_Interface/vita_output.c
+
+OBJS += \
+./SmartSDR_Interface/cmd_basics.o \
+./SmartSDR_Interface/cmd_engine.o \
+./SmartSDR_Interface/hal_buffer.o \
+./SmartSDR_Interface/hal_listener.o \
+./SmartSDR_Interface/hal_vita.o \
+./SmartSDR_Interface/io_utils.o \
+./SmartSDR_Interface/smartsdr_dsp_api.o \
+./SmartSDR_Interface/status_processor.o \
+./SmartSDR_Interface/traffic_cop.o \
+./SmartSDR_Interface/utils.o \
+./SmartSDR_Interface/vita_output.o
+
+C_DEPS += \
+./SmartSDR_Interface/cmd_basics.d \
+./SmartSDR_Interface/cmd_engine.d \
+./SmartSDR_Interface/hal_buffer.d \
+./SmartSDR_Interface/hal_listener.d \
+./SmartSDR_Interface/hal_vita.d \
+./SmartSDR_Interface/io_utils.d \
+./SmartSDR_Interface/smartsdr_dsp_api.d \
+./SmartSDR_Interface/status_processor.d \
+./SmartSDR_Interface/traffic_cop.d \
+./SmartSDR_Interface/utils.d \
+./SmartSDR_Interface/vita_output.d
+
+
+# Each subdirectory must supply rules for building sources it contributes
+SmartSDR_Interface/%.o: ../SmartSDR_Interface/%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+ arm-angstrom-linux-gnueabi-gcc -I"/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV" -I"/src/flex/smartsdr-dsp/DSP_API" -I"/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface" -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -Wall -c -fmessage-length=0 -lpthread -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+
diff --git a/DSP_API/Release/SmartSDR_Interface/traffic_cop.d b/DSP_API/Release/SmartSDR_Interface/traffic_cop.d
new file mode 100644
index 0000000..b9b4950
--- /dev/null
+++ b/DSP_API/Release/SmartSDR_Interface/traffic_cop.d
@@ -0,0 +1,59 @@
+SmartSDR_Interface/traffic_cop.d SmartSDR_Interface/traffic_cop.o: \
+ ../SmartSDR_Interface/traffic_cop.c \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h \
+ ../SmartSDR_Interface/traffic_cop.h \
+ ../SmartSDR_Interface/status_processor.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
+
+../SmartSDR_Interface/traffic_cop.h:
+
+../SmartSDR_Interface/status_processor.h:
diff --git a/DSP_API/Release/SmartSDR_Interface/utils.d b/DSP_API/Release/SmartSDR_Interface/utils.d
new file mode 100644
index 0000000..29e4dfa
--- /dev/null
+++ b/DSP_API/Release/SmartSDR_Interface/utils.d
@@ -0,0 +1,52 @@
+SmartSDR_Interface/utils.d SmartSDR_Interface/utils.o: \
+ ../SmartSDR_Interface/utils.c /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
diff --git a/DSP_API/Release/SmartSDR_Interface/vita_output.d b/DSP_API/Release/SmartSDR_Interface/vita_output.d
new file mode 100644
index 0000000..6443bcd
--- /dev/null
+++ b/DSP_API/Release/SmartSDR_Interface/vita_output.d
@@ -0,0 +1,2 @@
+SmartSDR_Interface/vita_output.d SmartSDR_Interface/vita_output.o: \
+ ../SmartSDR_Interface/vita_output.c
diff --git a/DSP_API/Release/circular_buffer.d b/DSP_API/Release/circular_buffer.d
new file mode 100644
index 0000000..f781000
--- /dev/null
+++ b/DSP_API/Release/circular_buffer.d
@@ -0,0 +1,4 @@
+circular_buffer.d circular_buffer.o: ../circular_buffer.c \
+ ../circular_buffer.h
+
+../circular_buffer.h:
diff --git a/DSP_API/Release/freedv b/DSP_API/Release/freedv
new file mode 100755
index 0000000..5ed15c1
Binary files /dev/null and b/DSP_API/Release/freedv differ
diff --git a/DSP_API/Release/main.d b/DSP_API/Release/main.d
new file mode 100644
index 0000000..8609b21
--- /dev/null
+++ b/DSP_API/Release/main.d
@@ -0,0 +1,69 @@
+main.d main.o: ../main.c \
+ /src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/freedv_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/varicode.h \
+ /src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/codec2_fdmdv.h \
+ /src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/comp.h ../circular_buffer.h \
+ ../resampler.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h \
+ /src/flex/smartsdr-dsp/DSP_API/common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h \
+ /src/flex/smartsdr-dsp/DSP_API/main.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h \
+ /src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h
+
+/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/freedv_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/varicode.h:
+
+/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/codec2_fdmdv.h:
+
+/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV/comp.h:
+
+../circular_buffer.h:
+
+../resampler.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/smartsdr_dsp_api.h:
+
+/src/flex/smartsdr-dsp/DSP_API/common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/discovery.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/hal_listener.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/datatypes.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/io_utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/tcp_cmd_server.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita_output.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/complex.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita49_context.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/../common.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/utils.h:
+
+/src/flex/smartsdr-dsp/DSP_API/main.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/vita.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/messages.h:
+
+/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface/cmd.h:
diff --git a/DSP_API/Release/makefile b/DSP_API/Release/makefile
new file mode 100644
index 0000000..bb85305
--- /dev/null
+++ b/DSP_API/Release/makefile
@@ -0,0 +1,65 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+-include ../makefile.init
+
+RM := rm -rf
+
+# All of the sources participating in the build are defined here
+-include sources.mk
+-include SmartSDR_Interface/subdir.mk
+-include CODEC2_FREEDV/subdir.mk
+-include subdir.mk
+-include objects.mk
+
+ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(strip $(C++_DEPS)),)
+-include $(C++_DEPS)
+endif
+ifneq ($(strip $(C_DEPS)),)
+-include $(C_DEPS)
+endif
+ifneq ($(strip $(CC_DEPS)),)
+-include $(CC_DEPS)
+endif
+ifneq ($(strip $(CPP_DEPS)),)
+-include $(CPP_DEPS)
+endif
+ifneq ($(strip $(CXX_DEPS)),)
+-include $(CXX_DEPS)
+endif
+ifneq ($(strip $(C_UPPER_DEPS)),)
+-include $(C_UPPER_DEPS)
+endif
+endif
+
+-include ../makefile.defs
+
+# Add inputs and outputs from these tool invocations to the build variables
+
+# All Target
+all: freedv
+
+# Tool invocations
+freedv: $(OBJS) $(USER_OBJS)
+ @echo 'Building target: $@'
+ @echo 'Invoking: GCC C++ Linker'
+ arm-angstrom-linux-gnueabi-gcc -rdynamic -o "freedv" $(OBJS) $(USER_OBJS) $(LIBS)
+ @echo 'Finished building target: $@'
+ @echo ' '
+ $(MAKE) --no-print-directory post-build
+
+# Other Targets
+clean:
+ -$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) freedv
+ -@echo ' '
+
+post-build:
+ -cp freedv /nfsroots/microburst/home/root/
+ -@echo ' '
+
+.PHONY: all clean dependents
+.SECONDARY: post-build
+
+-include ../makefile.targets
diff --git a/DSP_API/Release/objects.mk b/DSP_API/Release/objects.mk
new file mode 100644
index 0000000..1d9c7be
--- /dev/null
+++ b/DSP_API/Release/objects.mk
@@ -0,0 +1,8 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+USER_OBJS :=
+
+LIBS := -lpthread -lrt -lm
+
diff --git a/DSP_API/Release/resampler.d b/DSP_API/Release/resampler.d
new file mode 100644
index 0000000..f0ec40b
--- /dev/null
+++ b/DSP_API/Release/resampler.d
@@ -0,0 +1,3 @@
+resampler.d resampler.o: ../resampler.c ../resampler.h
+
+../resampler.h:
diff --git a/DSP_API/Release/sources.mk b/DSP_API/Release/sources.mk
new file mode 100644
index 0000000..6f3a47e
--- /dev/null
+++ b/DSP_API/Release/sources.mk
@@ -0,0 +1,29 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+O_SRCS :=
+CPP_SRCS :=
+C_UPPER_SRCS :=
+C_SRCS :=
+S_UPPER_SRCS :=
+OBJ_SRCS :=
+ASM_SRCS :=
+CXX_SRCS :=
+C++_SRCS :=
+CC_SRCS :=
+OBJS :=
+C++_DEPS :=
+C_DEPS :=
+CC_DEPS :=
+CPP_DEPS :=
+EXECUTABLES :=
+CXX_DEPS :=
+C_UPPER_DEPS :=
+
+# Every subdirectory with source files must be described here
+SUBDIRS := \
+. \
+SmartSDR_Interface \
+CODEC2_FREEDV \
+
diff --git a/DSP_API/Release/subdir.mk b/DSP_API/Release/subdir.mk
new file mode 100644
index 0000000..dbb7c71
--- /dev/null
+++ b/DSP_API/Release/subdir.mk
@@ -0,0 +1,30 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+C_SRCS += \
+../circular_buffer.c \
+../main.c \
+../resampler.c
+
+OBJS += \
+./circular_buffer.o \
+./main.o \
+./resampler.o
+
+C_DEPS += \
+./circular_buffer.d \
+./main.d \
+./resampler.d
+
+
+# Each subdirectory must supply rules for building sources it contributes
+%.o: ../%.c
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C Compiler'
+ arm-angstrom-linux-gnueabi-gcc -I"/src/flex/smartsdr-dsp/DSP_API/CODEC2_FREEDV" -I"/src/flex/smartsdr-dsp/DSP_API" -I"/src/flex/smartsdr-dsp/DSP_API/SmartSDR_Interface" -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -Wall -c -fmessage-length=0 -lpthread -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
+
diff --git a/DSP_API/SmartSDR_Interface/cmd.h b/DSP_API/SmartSDR_Interface/cmd.h
new file mode 100644
index 0000000..6d6d573
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/cmd.h
@@ -0,0 +1,81 @@
+/* *****************************************************************************
+ * cmd.h 2014 AUG 31
+ *
+ * Header file for cmd_engine.c and cmd_basics.c
+ *
+ * date March 30, 2012
+ * author Stephen Hicks, N5AC
+ *
+ * *****************************************************************************
+ *
+ * Copyright (C) 2012-2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+
+#ifndef CMD_H_
+#define CMD_H_
+
+#include "datatypes.h"
+
+
+#define ACCESS_GUEST 0x0
+#define ACCESS_SERIAL 0x1
+#define ACCESS_TCP 0x2
+#define ACCESS_SERIAL_TCP 0x3
+#define SVC_SER 1
+#define SVC_TCP 2
+#define SVC_BOT 3
+
+#define MAX_ARGC 16
+#define MAX_ARGC_STATUS 100
+
+// #define PROMPT "\033[92mSmartSDR> \033[m"
+
+extern char* CMD_UNRECOGNIZED;
+extern char* EEPROM_BAD_BYTE;
+extern char* EEPROM_TOO_LARGE;
+extern char* EEPROM_USAGE;
+
+
+/* ------------------------------------------------------------------------ *
+ * Prototypes *
+ * ------------------------------------------------------------------------ */
+
+unsigned int command (void);
+void tokenize (char *line, int *pargc, char **argv, int max_arguments);
+//void process_command (int fd, char line[]);
+uint32 process_command(char* command_txt);
+
+uint32 cmd_banner();
+uint32 cmd_cls(int requester_fd, int argc,char **argv);
+uint32 cmd_date(int requester_fd, int argc,char **argv);
+uint32 cmd_exit(int requester_fd, int argc,char **argv);
+uint32 cmd_help(int requester_fd, int argc, char **argv);
+uint32 cmd_slice(int requester_fd, int argc,char **argv);
+uint32 cmd_time(int requester_fd, int argc,char **argv);
+// uint32 cmd_register(int requester_fd, int argc,char **argv);
+uint32 cmd_undefined(int requester_fd, int argc,char **argv);
+
+void get_line(char* line, int maxlen);
+
+char getch(void); // Read 1 character
+char getche(void); // Read 1 character with echo
+
+
+#endif /* CMD_H_ */
diff --git a/DSP_API/SmartSDR_Interface/cmd_basics.c b/DSP_API/SmartSDR_Interface/cmd_basics.c
new file mode 100644
index 0000000..7329fe8
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/cmd_basics.c
@@ -0,0 +1,282 @@
+/* *****************************************************************************
+ * cmd_basics.c 2014 AUG 30
+ *
+ * Uses header file cmd.h
+ *
+ * Basic commands for the command_engine
+ * Display the sign-on banner
+ * Clear Screen
+ * Process Exit
+ * Display time
+ * Display date
+ * Display help
+ * Display "undefined"
+ *
+ *
+ * \author Terry Gerdes, AB5K
+ * \author Stephen Hicks, N5AC
+ * \author Graham / KE9H
+ *
+ *******************************************************************************
+ *
+ * Copyright (C) 2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "common.h"
+#include "main.h"
+#include "cmd.h"
+
+#include "main.h"
+
+
+/* *****************************************************************************
+ * uint32 cmd_banner(void)
+ *
+ * Print a banner
+ *
+ */
+
+uint32 cmd_banner()
+{
+ char *build_date = __DATE__;
+ char *build_time = __TIME__;
+ uint32 ip = net_get_ip();
+
+ output(ANSI_GREEN "*\n");
+ output("* This program is free software: you can redistribute it and/or modify\n");
+ output("* it under the terms of the GNU General Public License as published by\n");
+ output("* the Free Software Foundation, either version 3 of the License, or\n");
+ output("* (at your option) any later version.\n");
+ output("* This program is distributed in the hope that it will be useful,\n");
+ output("* but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
+ output("* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n");
+ output("* GNU General Public License for more details.\n");
+ output("* You should have received a copy of the GNU General Public License\n");
+ output("* along with this program. If not, see .\n*\n");
+ output("* Contact Information:\n");
+ output("* email: gplflexradiosystems.com\n");
+ output("* Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728\n*\n");
+
+ output("\033[92m");
+ output("**************************************************************************\r\n");
+ output("* \r\n");
+ output("* * * * * * * ****** ****** **** ***** ** ** \r\n");
+ output("* * * * * * * * * * * * * * * * * * \r\n");
+ output("* * * * ***** * * ***** **** * * **** * * * \r\n");
+ output("* ** ** * * * * * * * * * * * * \r\n");
+ output("* * * * * * ****** * **** * * * * \r\n");
+ output("*\r\n");
+ output("* FlexRadio Systems\r\n");
+ output("* Copyright (C) 2014 FlexRadio Systems. All Rights Reserved.\r\n");
+ output("* www.flexradio.com\r\n");
+ output("**************************************************************************\r\n");
+
+ //output("\033[32mSoftware version : \033[m%s\r\n", software_version);
+ output("\033[32mBuild Date & Time: \033[m%s %s\r\n",build_date, build_time);
+ output("\033[32mIP Address : \033[m%d.%d.%d.%d\r\n", ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, ip >> 24);
+ output("\033[32mType for options\r\n\n\033[m");
+
+ return SUCCESS;
+}
+
+
+/* *****************************************************************************
+ * uint32 cmd_cls(int requester_fd, int argc,char **argv)
+ *
+ * HANDLE: command_cls
+ * ANSI escape sequence to go to home position in screen
+ * and clear remainder of screen
+ */
+
+uint32 cmd_cls(int requester_fd, int argc,char **argv)
+{
+ static char *CLS = "\033[H\033[2J";
+ write(requester_fd, CLS, strlen(CLS));
+ return SUCCESS;
+}
+
+
+/* *****************************************************************************
+ * uint32 cmd_exit(int requester_fd, int argc,char **argv)
+ *
+ * Exit the application
+ */
+
+uint32 cmd_exit(int requester_fd, int argc,char **argv)
+{
+ const char string1[] = "\n\033[92m73 de WaveForm !!!\033[m\n";
+
+ write(requester_fd, string1, strlen(string1));
+
+// if(argc > 1 && tolower(*argv[1]) == 'r')
+// end_firmware(power_reboot);
+// else
+// end_firmware(power_leaveon);
+
+ _exit(0);
+ return SUCCESS;
+}
+
+
+/* *****************************************************************************
+ * uint32 cmd_time(int requester_fd, int argc,char **argv)
+ *
+ * Display the time
+ */
+
+uint32 cmd_time(int requester_fd, int argc,char **argv)
+{
+ time_t t = time(NULL);
+ struct tm time = *localtime(&t);
+
+// client_response(SUCCESS,"%02d:%02d:%02dZ",time.tm_hour,time.tm_min,time.tm_sec);
+ output("%02d:%02d:%02dZ \n",time.tm_hour,time.tm_min,time.tm_sec);
+// char *time_string = 0;
+//
+// time_string = drv_Bq32000AsciiTime();
+// strcat(time_string,"\n");
+//
+// write(requester_fd, time_string, strlen(time_string));
+ return SUCCESS;
+}
+
+
+/* *****************************************************************************
+ * uint32 cmd_date(int requester_fd, int argc,char **argv)
+ *
+ * Display the date
+ */
+
+uint32 cmd_date(int requester_fd, int argc,char **argv)
+{
+ time_t t = time(NULL);
+ struct tm time = *localtime(&t);
+
+// client_response(SUCCESS,"%d-%d-%d",time.tm_year+1900,time.tm_mon+1,time.tm_mday);
+ output("%d-%d-%d \n",time.tm_year+1900,time.tm_mon+1,time.tm_mday);
+// char *time_string = 0;
+//
+// time_string = drv_Bq32000AsciiDatetime();
+// strcat(time_string,"\n");
+//
+// write(requester_fd, time_string, strlen(time_string));
+ return SUCCESS;
+}
+
+//
+// Command Description displayed from HELP menu.
+//
+
+const char* commandDescriptionBasic[] =
+{
+ 0,
+ "b Display banner",
+ "banner Display the WaveForm banner",
+ "cls Clear screen",
+ "date Display the Date",
+ "exit Exit the process",
+ "quit Exit the process",
+ "time Display the Time",
+ "help|? View this menu",
+ 0
+};
+
+
+/* *****************************************************************************
+ * uint32 cmd_help(int requester_fd, int argc, char **argv)
+ *
+ * HANDLE: help
+ */
+
+uint32 cmd_help(int requester_fd, int argc, char **argv)
+{
+ int i;
+
+ i=1;
+
+ output("==========================================================\n\r");
+ while(commandDescriptionBasic[i] != 0)
+ {
+ write(requester_fd, commandDescriptionBasic[i], strlen(
+ commandDescriptionBasic[i]));
+ output(" %s\n\r", commandDescriptionBasic[i++]);
+ }
+
+ return SUCCESS;
+}
+
+
+/* *****************************************************************************
+ * uint32 cmd_undefined(int requester_fd, int argc, char **argv)
+ *
+ * Undefined
+ */
+
+uint32 cmd_undefined(int requester_fd, int argc, char **argv)
+{
+ //debug(LOG_CERROR, TRUE, SL_R_UNKNOWN_COMMAND);
+ //client_response(SL_UNKNOWN_COMMAND, NULL);
+ output("I have no idea what you are talking about !!!\n");
+ return SL_UNKNOWN_COMMAND;
+}
+
+uint32 cmd_slice(int requester_fd, int argc, char **argv)
+{
+ uint32 slc = INVALID_SLICE_RX;
+
+ if (strcmp(argv[0], "slice") == 0)
+ {
+ if(argc < 3)
+ {
+ return SL_BAD_COMMAND;
+ }
+
+ // get the slice number
+ errno = 0;
+ slc = strtoul(argv[1], NULL, 0);
+ if(errno)
+ {
+ output(ANSI_RED "Unable to parse slice number (%s)\n", argv[1]);
+ return SL_BAD_COMMAND;
+ }
+
+ if(strncmp(argv[2], "string", strlen("string")) == 0)
+ {
+ char* new_string = argv[2]+strlen("string")+1;
+ freedv_set_string(slc, new_string);
+ return SUCCESS;
+ }
+ }
+
+ return SUCCESS;
+}
+
+
+
diff --git a/DSP_API/SmartSDR_Interface/cmd_engine.c b/DSP_API/SmartSDR_Interface/cmd_engine.c
new file mode 100644
index 0000000..ff0ba2d
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/cmd_engine.c
@@ -0,0 +1,347 @@
+/* *****************************************************************************
+ * cmd_engine.c
+ *
+ * \brief Command Engine - Command processing
+ *
+ *
+ * \author Terry, AB5K
+ * \author Stephen Hicks, N5AC
+ * \date 23-AUG-2011
+ *
+ * Instructions for adding a new command:
+ * 1. Add a reference in the "command_defs commands[]" array below
+ * 2. If help is needed, add a reference to lpszCommandDescriptionBasic[] in the cmd_basics.c file.
+ *
+ *******************************************************************************
+ *
+ * Copyright (C) 2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "../common.h"
+#include "datatypes.h"
+
+#include "cmd.h"
+#include "main.h"
+
+static struct termios old, new; // For Terminal IO
+
+//#include "drv_bq32000.h"
+//#include "messages.h"
+//#include "client_manager.h"
+//#include "radio.h"
+
+char *CMD_UNRECOGNIZED = "Unrecognized command \"%s\".\r\n";
+
+// Command Function Pointer called by the interpreter.
+typedef uint32 handler(int, int, char**);
+
+static char PrevLine[80];
+
+typedef struct _command_def
+{
+ const char* commandName;
+ handler *pFunction;
+} command_def;
+
+
+static command_def commands[] =
+{
+ { 0, cmd_undefined }, // Space Holder
+ { "b", cmd_banner }, // Display Banner
+ { "banner", cmd_banner }, // Display Banner
+ { "cls", cmd_cls }, // Clear Screen
+ { "date", cmd_date }, // Print the date/time
+ { "exit", cmd_exit }, // Exit the program
+ { "help", cmd_help }, // Help Menu
+ { "quit", cmd_exit }, // Exit the program
+ { "slice", cmd_slice }, // Handle slice changes
+ { "time", cmd_time }, // Print the time
+ { "?", cmd_help }, // Display Help
+ { 0, cmd_undefined }, // Undefined - must be last in the list
+
+};
+
+//long execute_command(int requester_fd, int cmd_num, int argc, char *argv);
+
+// #################################################################
+// ##
+// ## Command Interpreter
+// ##
+// #################################################################
+unsigned int command(void)
+{
+ char line[80];
+ char *pLine = line;
+ get_line(pLine, sizeof(line));
+
+ process_command(line);
+
+ return (1);
+}
+
+uint32 process_command(char* command_txt)
+{
+ uint32 cmd_ret = SUCCESS;
+ int cmd_num;
+ int argc;
+ char *argv[MAX_ARGC + 1]; //Add one extra so we can null terminate the array
+
+
+ tokenize(command_txt, &argc, argv, MAX_ARGC);
+
+ if (argc > 0)
+ {
+ cmd_num = 1;
+
+ while (cmd_num > 0)
+ {
+ if ((commands[cmd_num].commandName == 0) || (strcmp(argv[0], commands[cmd_num].commandName) == 0))
+ {
+ //Execute the requested command
+ cmd_ret = commands[cmd_num].pFunction(1, argc, argv);
+ cmd_num = 0;
+ }
+ else
+ {
+ cmd_num++;
+ }
+ }
+ }
+ return cmd_ret;
+}
+
+
+// #################################################################
+// ##
+// ## void tokenize(char*, int*, char**, max_arguments);
+// ##
+// ## Breaks a single character string into an array of tokens.
+// #################################################################
+
+void tokenize(
+ char* line, // Input String
+ int* pargc, // Number of arguments
+ char** argv, // Array of strings holding tokens
+ int max_arguments // Maximum Tokens allowed
+)
+{
+ BOOL inside_string = FALSE;
+ BOOL inside_token = FALSE;
+ char* readp;
+
+ *pargc = 0;
+
+ // Read through the entire string searching for tokens
+ for (readp = line; *readp; readp++)
+ {
+ // Search for start of token
+ if (!inside_token)
+ {
+ // Ignore white spaces
+ if ((*readp == ' ') || (*readp == '\t'))
+ {
+ ;
+ }
+ // Start of a new token
+ else
+ {
+ if (*readp == '\"')
+ {
+ inside_string = TRUE;
+ }
+ else
+ {
+ inside_token = TRUE;
+ argv[*pargc] = readp;
+ (*pargc)++;
+
+ if(*pargc > max_arguments)
+ break;
+ }
+ }
+ }
+
+ // We are inside the token
+ else
+ { // inside token
+
+ // Found the end of the token
+ if ( (!inside_string && ((*readp == ' ') || (*readp == '\t'))) |
+ (inside_string && (*readp == '\"'))
+ )
+ {
+ inside_string = FALSE;
+ inside_token = FALSE;
+ *readp = 0;
+ }
+ }
+ }
+
+ // End of input line terminates a token
+ if (inside_token)
+ {
+ *readp = 0;
+ readp++;
+ }
+
+ argv[*pargc] = 0; // Null-terminate just to be nice
+}
+
+
+
+// #################################################################
+// ##
+// ## void command_get_line(char *, int)
+// ##
+// #################################################################
+void get_line(char * line, int maxlen)
+{
+ char *pLine = line;
+ char *pPrevLine = PrevLine;
+ char c = 0;
+
+ *pLine = 0;
+ for (;;) {
+ c = getch();
+
+ // Escape Sequences
+ if (c == '\033') {
+ while (pLine > line) {
+
+ printf("\b \b");
+ pLine--;
+ *pLine = 0;
+ }
+ c = getch();
+
+ if (c == '[') {
+ c = getch();
+
+ if (c == 'A') {
+ // Restore previous command
+ pLine = line;
+ pPrevLine = PrevLine;
+ while(*pPrevLine) {
+
+ *pLine = *pPrevLine;
+ pLine++;
+ pPrevLine++;
+ }
+ *pLine = 0;
+ printf("%s",line);
+ }
+ }
+ }
+
+ else if ((c == '\n') || (c == '\r')) {
+ printf("\r\n");
+ break;
+ }
+
+ // Check for backspace or delete key.
+ else if ((c == '\b') || (c == 0x7F)) {
+ if (pLine > line) {
+ printf("\b \b");
+ pLine--;
+ *pLine = 0;
+ }
+ }
+
+ // Check for escape key or control-U.
+ else if (c == 0x15) {
+ while (pLine > line) {
+ printf("\b \b");
+ pLine--;
+ *pLine = 0;
+ }
+ }
+
+ else if (c > 0) {
+ printf("%c",c);
+ *pLine = c;
+ pLine++;
+ *pLine = 0;
+ }
+ }
+
+ *pLine = 0;
+
+ pLine = line;
+ pPrevLine = PrevLine;
+ while(*pLine) {
+ *pPrevLine = *pLine;
+ pLine++;
+ pPrevLine++;
+ }
+ *pPrevLine = 0;
+}
+
+
+/* *****************************************************************************
+ * getch() and getche() functionality for UNIX,
+ * based on termios (terminal handling functions)
+ *
+ * This code snippet was written by Wesley Stessens (wesley@ubuntu.com)
+ * It is released in the Public Domain.
+ */
+
+/* Initialize new terminal i/o settings */
+void initTermios(int echo) {
+ int n = tcgetattr(0, &old); /* grab old terminal i/o settings */
+ if (n == -1) return;
+
+ new = old; /* make new settings same as old settings */
+ new.c_lflag &= ~ICANON; /* disable buffered i/o */
+ new.c_lflag &= echo ? ECHO : ~ECHO; /* set echo mode */
+ tcsetattr(0, TCSANOW, &new); /* use these new terminal i/o settings now */
+}
+
+/* Restore old terminal i/o settings */
+void resetTermios(void) {
+ tcsetattr(0, TCSANOW, &old);
+}
+
+/* Read 1 character - echo defines echo mode */
+char getch_(int echo) {
+ char ch;
+ initTermios(echo);
+ ch = (char)getchar();
+ resetTermios();
+ return ch;
+}
+
+/* Read 1 character without echo */
+char getch(void) {
+ return getch_(0);
+}
+
+/* Read 1 character with echo */
+char getche(void) {
+ return getch_(1);
+}
+
+
diff --git a/DSP_API/SmartSDR_Interface/complex.h b/DSP_API/SmartSDR_Interface/complex.h
new file mode 100644
index 0000000..a1ff2c7
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/complex.h
@@ -0,0 +1,61 @@
+/* *****************************************************************************
+ * complex.h
+ *
+ * \date Mar 31, 2012
+ * \author Bob / N4HY
+ *
+ * *****************************************************************************
+ *
+ * Copyright (C) 2012-2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+#ifndef COMPLEX_H_
+#define COMPLEX_H_
+
+#include
+
+#include "datatypes.h"
+
+typedef struct _complex {
+ float real; // left
+ float imag; // right
+} Complex;
+
+#define CReal(x) ((x.real))
+#define CImag(x) ((x.imag))
+
+extern Complex Cplx(float x, float y);
+
+extern Complex ComplexAdd(Complex x, Complex y);
+
+extern Complex ComplexSub(Complex x, Complex y);
+
+extern Complex ComplexMul(Complex x, Complex y);
+
+extern Complex ComplexDiv(Complex x, Complex y);
+
+extern Complex ComplexScl(Complex x, float scl);
+
+extern Complex ComplexCjg(Complex x);
+
+extern float ComplexPwr(Complex x);
+
+extern float ComplexMag(Complex x);
+
+#endif /* COMPLEX_H_ */
diff --git a/DSP_API/SmartSDR_Interface/datatypes.h b/DSP_API/SmartSDR_Interface/datatypes.h
new file mode 100644
index 0000000..6c283d8
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/datatypes.h
@@ -0,0 +1,65 @@
+/* *****************************************************************************
+ * datatypes.h
+ *
+ * datatypes definition file
+ *
+ *
+ * \date Sep 15, 2011
+ * \author Eric
+ *
+ * *****************************************************************************
+ *
+ * Copyright (C) 2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+
+#ifndef _DATATYPES_H
+#define _DATATYPES_H
+
+
+typedef unsigned char uint8;
+typedef unsigned short uint16;
+typedef unsigned int uint32;
+typedef unsigned long long uint64;
+
+typedef signed char int8;
+typedef signed short int16;
+typedef signed int int32;
+typedef signed long long int64;
+
+typedef uint8 BOOL;
+
+/// VITA-49 format frequency data
+typedef int64 VITAfrequency;
+typedef int16 VITAfrequency_trunc;
+typedef int32 VITAdb;
+typedef int16 VITAdb_trunc;
+typedef uint32 packedVITAcalPoint;
+typedef int32 VITAtemp;
+typedef int16 VITAtemp_trunc;
+
+
+typedef uint32 ant_port_id_type;
+
+#define TRUE (uint32)1
+#define FALSE (uint32)0
+
+#define INVALID -1
+
+#endif // _DATATYPES_H
diff --git a/DSP_API/SmartSDR_Interface/discovery_client.c b/DSP_API/SmartSDR_Interface/discovery_client.c
new file mode 100644
index 0000000..53a07aa
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/discovery_client.c
@@ -0,0 +1,320 @@
+/* *****************************************************************************
+ * discovery_client.c
+ *
+ * \brief Discovery Client - Receives and parses discovery packets
+ *
+ *
+ * \author Eric Wachsmann, KE5DTO
+ * \date 2014-09-01
+ *
+ *******************************************************************************
+ *
+ * Copyright (C) 2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ***************************************************************************/
+
+#include
+#include // for malloc
+#include // for memset
+#include
+#include // for htonl, htons, IPPROTO_UDP
+#include
+#include // for errno
+#include
+
+#include "common.h"
+#include "discovery_client.h"
+#include "cmd.h" // for tokenize
+#include "io_utils.h"
+
+
+static int _dc_sock;
+static pthread_t _dc_thread;
+static BOOL _dc_abort = FALSE;
+
+
+void printRadio(Radio radio)
+{
+ output("discovery_protocol_version=%s model=%s serial=%s version=%s nickname=%s callsign=%s ip=%s port=%s status=%s\n",
+ radio->discovery_protocol_version,
+ radio->model,
+ radio->serial,
+ radio->version,
+ radio->nickname,
+ radio->callsign,
+ radio->ip,
+ radio->port,
+ radio->status);
+}
+
+ char* protocol_version;
+ char* model;
+ char* serial;
+ char* version;
+ char* nickname;
+ char* callsign;
+ char* ip;
+ char* port;
+ char* status;
+
+static void _dc_RadioFound(Radio radio)
+{
+
+ if(getIP(radio->ip) == ntohl(net_get_ip()))
+ {
+ output("Radio found");
+ // yes -- connect and stop looking for more radios
+ // TODO: connect
+ // start a keepalive to keep the channel open and know when it dies
+ uint32 result = register_mode();
+ // quick and dirty fail for now
+ if (result != SUCCESS) exit(1);
+ tc_startKeepalive();
+ usleep(250000);
+ hal_Listener_Init();
+
+ dc_Exit();
+ }
+
+ // print the content of the object
+ //printRadio(radio);
+
+ // because the radio object is malloc'ed, we need to recover the memory
+ safe_free(radio);
+ radio = 0;
+}
+
+static void _dc_ListenerParsePacket(uint8* packet, int32 length, struct sockaddr_in* sender)
+{
+ //output("_dc_ListenerParsePacket\n");
+
+ // is this packet long enough to inspect for VITA header info?
+ if(length < 16)
+ {
+ // no -- discard the packet
+ //output("_dc_ListenerParsePacket: packet too short\n");
+ return;
+ }
+
+ // cast the incoming packet as a VITA packet
+ VitaIFData p = (VitaIFData)packet;
+
+ // does this packet have our OUI?
+ if(htonl(p->class_id_h) != 0x00001C2D)
+ {
+ // no -- discard this packet
+ //output("_dc_ListenerParsePacket: wrong OUI (0x%08X)\n", htonl(p->class_id_h));
+ return;
+ }
+
+ // is this packet an extended data packet?
+ if((p->header & VITA_HEADER_PACKET_TYPE_MASK) != VITA_PACKET_TYPE_EXT_DATA_WITH_STREAM_ID)
+ {
+ // no -- discard this packet
+ //output("_dc_ListenerParsePacket: wrong packet type (0x%08X)\n", p->header & VITA_HEADER_PACKET_TYPE_MASK);
+ return;
+ }
+
+ // is this packet marked as a SL_VITA_DISCOVERY_CLASS?
+ if((htonl(p->class_id_l) & VITA_CLASS_ID_PACKET_CLASS_MASK) != 0xFFFF)
+ {
+ // no -- discard this packet
+ //output("_dc_ListenerParsePacket: wrong packet class (0x%04X)\n", p->class_id_l & VITA_CLASS_ID_PACKET_CLASS_MASK);
+ return;
+ }
+
+ // if we made it this far, then we can safely assume this is a
+ // discovery packet and we will attempt to split the payload up
+ // similar to a command on spaces and parse the data
+
+ int argc, i;
+ char *argv[MAX_ARGC + 1]; //Add one extra so we can null terminate the array
+
+ // split the payload string up
+ tokenize((char*)p->payload, &argc, argv, MAX_ARGC);
+
+ //output("_dc_ListenerParsePacket: payload: %s\n", p->payload);
+ //output("_dc_ListenerParsePacket: tokenize argc=%u\n", argc);
+
+ Radio radio = (Radio)safe_malloc(sizeof(radioType));
+ if(!radio)
+ {
+ output("_dc_ListenerParsePacket: Out of memory!\n");
+ return;
+ }
+
+ // clear the newly allocated memory
+ memset(radio, 0, sizeof(radioType));
+
+ // for each token, process the string
+ for(i=0; idiscovery_protocol_version = argv[i]+strlen("discovery_protocol_version=");
+ else if(strncmp(argv[i], "model", strlen("model")) == 0)
+ radio->model = argv[i]+strlen("model=");
+ else if(strncmp(argv[i], "serial", strlen("serial")) == 0)
+ radio->serial = argv[i]+strlen("serial=");
+ else if(strncmp(argv[i], "version", strlen("version")) == 0)
+ radio->version = argv[i]+strlen("version=");
+ else if(strncmp(argv[i], "nickname", strlen("nickname")) == 0)
+ radio->nickname = argv[i]+strlen("nickname=");
+ else if(strncmp(argv[i], "callsign", strlen("callsign")) == 0)
+ radio->callsign = argv[i]+strlen("callsign=");
+ else if(strncmp(argv[i], "ip", strlen("ip")) == 0)
+ radio->ip = argv[i]+strlen("ip=");
+ else if(strncmp(argv[i], "port", strlen("port")) == 0)
+ radio->port = argv[i]+strlen("port=");
+ else if(strncmp(argv[i], "status", strlen("status")) == 0)
+ radio->status = argv[i]+strlen("status=");
+ }
+
+ // did we get at least an IP, port, and version?
+ if(radio->ip != 0 && radio->port != 0 && radio->version != 0)
+ {
+ // yes -- report the radio as found
+ _dc_RadioFound(radio);
+ }
+}
+
+static struct timeval timeout;
+//! Allocates a buffer and receives one packet.
+//! /param buffer Buffer to be allocated and populated with packet data
+//! /returns Number of bytes read if successful, otherwise an error (recvfrom)
+static BOOL _dc_ListenerRecv(uint8* buffer, int32* len, struct sockaddr_in* sender_addr)
+{
+ //output("_dc_ListenerRecv\n");
+
+ uint32 addr_len = sizeof(struct sockaddr_in);
+
+ // we will wait up to 1 second for data in case someone is trying to abort us
+
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+ fd_set socks;
+ FD_ZERO(&socks);
+ FD_SET(_dc_sock, &socks);
+
+ // see if there is data in the socket (but timeout if none)
+ select(_dc_sock + 1, &socks, NULL, NULL, &timeout);
+ if (FD_ISSET(_dc_sock, &socks))
+ {
+ // yes there is data -- get it
+ *len = recvfrom(_dc_sock, buffer, ETH_FRAME_LEN, 0, (struct sockaddr*)sender_addr, &addr_len);
+ //precisionTimerLap("HAL Listener Recv");
+ if(*len < 0)
+ output("_dc_ListenerRecv: recvfrom returned -1 errno=%08X\n", errno);
+ //else
+ //output("_hal_ListenerRecv: Error len=%d sender=%s:%u\n", len, inet_ntoa(sender_addr.sin_addr), htons(sender_addr.sin_port));
+
+ // TODO: May need to filter here to handle security (packet injection)
+ return TRUE;
+ }
+
+ *len = 0;
+ return FALSE;
+}
+
+static void* _dc_ListenerLoop(void* param)
+{
+ //printf("_dc_ListenerLoop\n");
+
+ struct sockaddr_in sender;
+ uint8 buf[ETH_FRAME_LEN];
+
+ while(!_dc_abort)
+ {
+ // get some data
+ int32 length = 0;
+ BOOL success = FALSE;
+
+ while (!success && !_dc_abort)
+ {
+ memset(&sender,0,sizeof(struct sockaddr_in));
+ memset(&buf,0,ETH_FRAME_LEN);
+ success = _dc_ListenerRecv(buf, &length, &sender);
+ }
+
+ if (!_dc_abort)
+ {
+ if(length == 0) // socket has been closed
+ {
+ output("_dc_ListenerLoop error: socket closed\n");
+ break;
+ }
+
+ if(length < 0)
+ {
+ output("_dc_ListenerLoop error: loop stopped\n");
+ break;
+ }
+
+ // length was reasonable -- lets try to parse the packet
+ //precisionTimerLap("HAL Listener Parse Packet");
+ _dc_ListenerParsePacket(buf, length, &sender);
+ }
+ }
+
+ return NULL;
+}
+
+void dc_Init(void)
+{
+ output("Discovery Client Init: Opening socket");
+ int true = TRUE;
+ if((_dc_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
+ {
+ output("...failed! (socket call returned -1)\n");
+ return;
+ }
+
+ // set up destination address
+ struct sockaddr_in addr;
+
+ memset(&addr,0,sizeof(addr));
+ addr.sin_family = AF_INET;
+ addr.sin_addr.s_addr = htonl(INADDR_ANY); // this is where we could limit to one IP
+ addr.sin_port=htons(DISCOVERY_PORT);
+
+ /* If you're running on the same box as the smartsdr firmware this is necessary so
+ * that both processes can bind to the same VITA port
+ */
+ /*int32 ret_val =*/ setsockopt(_dc_sock, SOL_SOCKET, SO_REUSEADDR, &true, sizeof(true));
+ if (errno)
+ {
+ output("error with reuse option: errno=%d",errno);
+ }
+
+ // bind the socket to the port and/or IP
+ output("...binding");
+ errno = 0;
+ if(bind(_dc_sock, (struct sockaddr *)&addr, sizeof(addr)) == -1)
+ {
+ output("...failed! (bind call returned -1: errno:%d)\n", errno);
+ return;
+ }
+ output("\n");
+
+ // start the listener thread
+ pthread_create(&_dc_thread, NULL, &_dc_ListenerLoop, NULL);
+}
+
+void dc_Exit(void)
+{
+ _dc_abort = TRUE;
+}
diff --git a/DSP_API/SmartSDR_Interface/discovery_client.h b/DSP_API/SmartSDR_Interface/discovery_client.h
new file mode 100644
index 0000000..c574e56
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/discovery_client.h
@@ -0,0 +1,54 @@
+/* *****************************************************************************
+ * discovery_client.h
+ *
+ * \brief Discovery Client - Receives and parses discovery packets
+ *
+ *
+ * \author Eric Wachsmann, KE5DTO
+ * \date 2014-09-01
+ *
+ *******************************************************************************
+ *
+ * Copyright (C) 2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+#ifndef DISCOVERY_CLIENT_H_
+#define DISCOVERY_CLIENT_H_
+
+typedef struct _radio
+{
+ char* discovery_protocol_version;
+ char* model;
+ char* serial;
+ char* version;
+ char* nickname;
+ char* callsign;
+ char* ip;
+ char* port;
+ char* status;
+
+} radioType, *Radio;
+
+void dc_Init(void);
+void dc_Exit(void);
+
+void printRadio(Radio radio);
+
+
+#endif // DISCOVERY_CLIENT_H_
diff --git a/DSP_API/SmartSDR_Interface/hal_buffer.c b/DSP_API/SmartSDR_Interface/hal_buffer.c
new file mode 100644
index 0000000..fb41a2e
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/hal_buffer.c
@@ -0,0 +1,133 @@
+/* *****************************************************************************
+ * hal_buffer.c
+ *
+ * Buffer structures to support getting samples from the right stream to
+ * the DSP.
+ *
+ *
+ * \date 29-MAR-2012
+ * \author Eric & Steve
+ *
+ * *****************************************************************************
+ *
+ * Copyright (C) 2012-2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+#include
+#include
+#include // for memset
+#include
+
+#include "common.h"
+//#include "platform.h"
+#include "hal_buffer.h"
+
+BufferDescriptor hal_BufferRequest(uint32 num_samples, uint32 sample_size)
+{
+ // allocate memory for the new object
+// BufferDescriptor buf = (BufferDescriptor)safe_malloc(sizeof(buffer_descriptor));
+ BufferDescriptor buf = (BufferDescriptor)safe_malloc(sizeof(buffer_descriptor)); // substitute non-thread-safe malloc
+// debug(LOG_DEV, TRUE, "\033[32m+ buf_desc alloc: %08X %04X\033[m", (uint32)buf, sizeof(buffer_descriptor));
+ if(!buf)
+ {
+// debug(LOG_DEV, TRUE, "Error allocating buffer descriptor (size=%u)", sizeof(buffer_descriptor));
+ return 0;
+ }
+
+ // clear memory of new descriptor object
+ memset(buf, 0, sizeof(buffer_descriptor));
+
+ // initialize size and allocate buffer
+ buf->num_samples = num_samples;
+ buf->sample_size = sample_size;
+// buf->buf_ptr = safe_malloc(num_samples * sample_size);
+ buf->buf_ptr = safe_malloc(num_samples * sample_size); // substitute non-thread-safe malloc
+// debug(LOG_DEV, TRUE, "\033[35m+ buf alloc: %08X, %04X\033[m", (uint32)buf->buf_ptr, num_samples * sample_size);
+ if(!buf->buf_ptr)
+ {
+// debug(LOG_DEV, TRUE, "Error allocating buffer descriptor (size=%u)", num_samples * sample_size);
+// safe_free(buf); // prevent memory leak
+ free(buf); // un-thread-safe free
+ buf = NULL;
+ return NULL;
+ }
+
+ // clear memory of new buffer object
+ memset(buf->buf_ptr, 0, num_samples * sample_size);
+
+ return buf;
+}
+
+void hal_BufferRelease(BufferDescriptor *buf_desc)
+{
+ if(*buf_desc)
+ {
+ if((*buf_desc)->buf_ptr != NULL)
+ {
+// debug(LOG_DEV, TRUE, "\033[35m- releasing buf: %08X\033[m", (uint32)(*buf_desc)->buf_ptr);
+// safe_free((*buf_desc)->buf_ptr);
+ free((*buf_desc)->buf_ptr); // un-thread-safe free
+ (*buf_desc)->buf_ptr = NULL;
+ }
+
+// debug(LOG_DEV, TRUE, "\033[32m- releasing buf_desc: %08X\033[m", (uint32)*buf_desc);
+// safe_free(*buf_desc);
+ free(*buf_desc); // un-thread-safe free
+ *buf_desc = NULL;
+ }
+}
+
+BufferDescriptor hal_BufferClone(BufferDescriptor buf)
+{
+ BufferDescriptor new_buf = hal_BufferRequest(buf->num_samples, buf->sample_size);
+ if(!new_buf)
+ {
+// debug(LOG_DEV, TRUE, "Error allocating new buffer");
+ return 0;
+ }
+
+ // copy member variables
+ new_buf->stream_id = buf->stream_id;
+ new_buf->timestamp_int = buf->timestamp_int;
+ new_buf->timestamp_frac_h = buf->timestamp_frac_h;
+ new_buf->timestamp_frac_l = buf->timestamp_frac_l;
+
+ // copy the actual buffer
+ memcpy(new_buf->buf_ptr, buf->buf_ptr, buf->num_samples*buf->sample_size);
+
+ return new_buf;
+}
+
+void hal_BufferPrint(BufferDescriptor buf_desc)
+{
+ int i;
+ for(i=0; i<16; i++)
+ printf("%.2f ", ((float*)buf_desc->buf_ptr)[i]);
+}
+
+float hal_BufferMag(BufferDescriptor buf_desc)
+{
+ int i;
+ float sum = 0.0f;
+
+ for(i=0; inum_samples*2; i++)
+ sum += fabs(((float*)buf_desc->buf_ptr)[i]);
+
+ return sum;
+}
diff --git a/DSP_API/SmartSDR_Interface/hal_buffer.h b/DSP_API/SmartSDR_Interface/hal_buffer.h
new file mode 100644
index 0000000..415839e
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/hal_buffer.h
@@ -0,0 +1,83 @@
+/* *****************************************************************************
+ * hal_buffer.h
+ *
+ * Buffer structures to support getting samples from the right stream to
+ * the DSP.
+ *
+ * \date Mar 29, 2012
+ * \author Eric & Steve
+ *
+ * *****************************************************************************
+ *
+ * Copyright (C) 2012-2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+#ifndef _BUFFER_H
+#define _BUFFER_H
+
+#include
+
+#include "datatypes.h"
+
+#pragma pack(4)
+
+///@{
+//! buffer_descriptor
+//! \brief describes a VITA-49 buffer received for processing and decomposed
+typedef struct _buffer_descriptor
+{
+ //! stream id showing where this buffer came from
+ uint32 stream_id;
+ //! number of samples stored in the buffer
+ uint32 num_samples; // in frames
+ //! size in bytes of the sample
+ uint32 sample_size;
+ //! pointer to the buffer containing the samples
+ void* buf_ptr; // pointer to the actual buffer
+ //! integer timestamp for the first sample in the buffer (see VITA-49 spec)
+ uint32 timestamp_int;
+ //! high 32-bits of fractional portion of the timestamp
+ uint32 timestamp_frac_h;
+ //! low 32-bits of the fractional portion of the timestamp
+ uint32 timestamp_frac_l;
+ //! pointer to next buffer descriptor
+ struct _buffer_descriptor* next;
+ //! pointer to previous buffer descriptor
+ struct _buffer_descriptor* prev;
+} buffer_descriptor, *BufferDescriptor;
+///@}
+
+#pragma pack()
+
+//! Requests a Buffer to be used in the DSP
+//! \param size Number of frames to allocate
+BufferDescriptor hal_BufferRequest(uint32 size, uint32 sample_size);
+
+//! To be called once finished with the buffer (cleanup)
+//! \param buf Buffer that is no longer in use
+void hal_BufferRelease(BufferDescriptor *buf);
+
+//! Does a deep copy of the buffer descriptor including the buffer
+//! \param buf The buffer descriptor to copy
+BufferDescriptor hal_BufferClone(BufferDescriptor buf);
+
+void hal_BufferPrint(BufferDescriptor buf_desc);
+float hal_BufferMag(BufferDescriptor buf_desc);
+
+#endif // _BUFFER_H
diff --git a/DSP_API/SmartSDR_Interface/hal_listener.c b/DSP_API/SmartSDR_Interface/hal_listener.c
new file mode 100644
index 0000000..034eb35
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/hal_listener.c
@@ -0,0 +1,568 @@
+///*! \file hal_listener.c
+// * \brief Listener for VITA-49 packets
+// *
+// * \copyright Copyright 2012-2013 FlexRadio Systems. All Rights Reserved.
+// * Unauthorized use, duplication or distribution of this software is
+// * strictly prohibited by law.
+// *
+// * \date 28-MAR-2012
+// * \author Eric & Steve
+// */
+
+/* *****************************************************************************
+ *
+ * Copyright (C) 2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+#include
+#include // for memset
+#include
+#include
+#include
+#include // for htonl, htons
+#include
+#include
+#include // for errno
+#include // for usleep
+#include
+
+// #define LOG_MODULE LOG_MODULE_HAL_LISTENER
+
+#include "vita.h"
+#include "hal_vita.h"
+#include "common.h"
+
+#include "stream.h"
+#include "vita_output.h"
+#include "hal_buffer.h"
+#include "sched_waveform.h"
+
+extern int errno;
+
+// static local variables
+static int fpga_sock;
+static BOOL hal_listen_abort;
+
+static pthread_t _hal_listen_thread;
+//static Thread _hal_counter_thread;
+
+// prototypes
+static void _hal_ListenerParsePacket(uint8* packet, int32 length, struct sockaddr_in* sender);
+static void _hal_ListenerProcessWaveformPacket(VitaIFData p, uint32 stream_id, int32 length, struct sockaddr_in* sender);
+
+#define MAX_COUNTED_STREAMS 100
+#define COUNTER_INTERVAL_MS 1000
+//static stream_count_type current_counters[MAX_COUNTED_STREAMS];
+//static stream_count_type report_counters[MAX_COUNTED_STREAMS];
+//static uint32 _end_count, _report_count;
+
+//void HAL_update_count(uint32 stream_id, uint32 class_id_h, uint32 class_id_l, uint32 size, uint32 status, StreamDirection direction, ShortStreamType strm_type, uint32 ip, uint16 port)
+//{
+// acquireLocalLock(_counter_lock, LOCAL_LOCK_WRITE);
+// int i;
+// for (i = 0; i < _end_count; i++)
+// {
+// if (stream_id == current_counters[i].stream_id &&
+// class_id_h == current_counters[i].class_id_h &&
+// class_id_l == current_counters[i].class_id_l &&
+// direction == current_counters[i].direction &&
+// strm_type == current_counters[i].stream_type &&
+// ip == current_counters[i].ip &&
+// port == current_counters[i].port)
+// {
+// current_counters[i].count++;
+// current_counters[i].size += size;
+// goto end;
+// }
+// }
+// if (_end_count == MAX_COUNTED_STREAMS) return;
+// current_counters[_end_count].direction = direction;
+// current_counters[_end_count].stream_type = strm_type;
+// current_counters[_end_count].class_id_h = class_id_h;
+// current_counters[_end_count].class_id_l = class_id_l;
+// current_counters[_end_count].count = 1;
+// current_counters[_end_count].size = size;
+// current_counters[_end_count].stream_id = stream_id;
+// current_counters[_end_count].status = status;
+// current_counters[_end_count].ip = ip;
+// current_counters[_end_count].port = port;
+// _end_count++;
+//
+//end:
+// releaseLocalLock(_counter_lock);
+//}
+
+//static void _hal_reset_count(void)
+//{
+// int i;
+//
+//// acquireLocalLock(_print_lock, LOCAL_LOCK_WRITE);
+//// acquireLocalLock(_counter_lock, LOCAL_LOCK_WRITE);
+// // make a backup copy of the counters for reporting
+// memcpy(report_counters, current_counters, sizeof(stream_count_type)*_end_count);
+// _report_count = _end_count;
+//
+// for (i = 0; i < _report_count; i++)
+// {
+// report_counters[i].speed = (float)report_counters[i].size / COUNTER_INTERVAL_MS * 0.008;
+// report_counters[i].count = (int)(report_counters[i].count * 1000 / COUNTER_INTERVAL_MS);
+// report_counters[i].printed = FALSE;
+// }
+// // clear out the current current_counters
+// memset(current_counters, 0, sizeof(stream_count_type)*_end_count);
+// _end_count = 0;
+// releaseLocalLock(_counter_lock);
+// releaseLocalLock(_print_lock);
+//}
+
+//static void* _hal_counter_loop(void* param)
+//{
+// // show that we are running
+// thread_setRunning(_hal_counter_thread);
+//
+// while (!hal_listen_abort)
+// {
+// // sleep for the designated time
+// usleep (COUNTER_INTERVAL_MS * 1000);
+// _hal_reset_count();
+// }
+//
+// destroyLocalLock(&_counter_lock);
+// thread_done(_hal_counter_thread);
+// return NULL;
+//}
+
+char* _hal_getStreamType(ShortStreamType strm_type)
+{
+ switch (strm_type)
+ {
+ case FFT: return "FFT";
+ case MMX: return "MMX";
+ case AUD: return "AUD";
+ case MET: return "MET";
+ case DSC: return "DSC";
+ case IQD: return "IQD";
+ case TXD: return "TXD";
+ case PAN: return "PAN";
+ case WFL: return "WFL";
+ case WFM: return "WFM";
+ case XXX: return "---";
+ }
+ return "---";
+}
+//
+//void _hal_showStreamLine(uint32 i)
+//{
+// char* status;
+// switch(report_counters[i].status)
+// {
+// case HAL_STATUS_PROCESSED: status = "\033[32mProcessing \033[m"; break;
+// case HAL_STATUS_INVALID_OUI: status = "\033[91mInvalid OUI \033[m"; break;
+// case HAL_STATUS_NO_DESC: status = "\033[33mNo Descriptor \033[m"; break;
+// case HAL_STATUS_UNSUPPORTED_SAMP: status = "\033[31mUnsupported MMX Rate\033[m"; break;
+// case HAL_STATUS_UNSUPPORTED_FFT: status = "\033[31mUnsupported FFT Rate\033[m"; break;
+// case HAL_STATUS_BAD_TYPE: status = "\033[33mBad Type \033[m"; break;
+// case HAL_STATUS_OUTPUT_OK: status = "\033[32mPacket Sent OK \033[m"; break;
+// case HAL_STATUS_TX_SKIP: status = "\033[32mSkipping, in TX \033[m"; break;
+// case HAL_STATUS_TX_ZERO: status = "\033[32mSending Zero, in TX \033[m"; break;
+// case HAL_STATUS_WFM_SIZE_WRONG: status = "\033[91mWFM packet size bad \033[m"; break;
+// case HAL_STATUS_WFM_NO_STREAM: status = "\033[33mNo WFM stream \033[m"; break;
+// case HAL_STATUS_UNK_STREAM: status = "\033[33mUnknown Stream ID \033[m"; break;
+// default: status = "\033[35mUnknown \033[m"; break;
+// }
+//
+//// if (report_counters[i].direction == INPUT)
+//// {
+//// output("%s %s 0x%08X 0x%08X %08X %5u %s %6.3f Mbps\n",
+//// (report_counters[i].direction == INPUT) ? " IN" : "OUT",
+//// _hal_getStreamType(report_counters[i].stream_type),
+//// report_counters[i].stream_id,
+//// report_counters[i].class_id_h,
+//// report_counters[i].class_id_l,
+//// report_counters[i].count,
+//// status,
+//// report_counters[i].speed);
+//// }
+//// else
+// {
+// uint32 ip = htonl(report_counters[i].ip);
+// uint16 port = htons(report_counters[i].port);
+// if (ip == 0xAC1E0102)
+// {
+// output("%s %s 0x%08X 0x%08X %08X %5u %s %6.3f Mbps \033[33mFPGA\033[m\n",
+// (report_counters[i].direction == INPUT) ? " IN" : "OUT",
+// _hal_getStreamType(report_counters[i].stream_type),
+// report_counters[i].stream_id,
+// report_counters[i].class_id_h,
+// report_counters[i].class_id_l,
+// report_counters[i].count,
+// status,
+// report_counters[i].speed);
+// }
+// else
+// {
+// output("%s %s 0x%08X 0x%08X %08X %5u %s %6.3f Mbps %u.%u.%u.%u:%u ",
+// (report_counters[i].direction == INPUT) ? " IN" : "OUT",
+// _hal_getStreamType(report_counters[i].stream_type),
+// report_counters[i].stream_id,
+// report_counters[i].class_id_h,
+// report_counters[i].class_id_l,
+// report_counters[i].count,
+// status,
+// report_counters[i].speed,
+// ip>>24, (ip>>16)&0xFF, (ip>>8)&0xFF, ip&0xFF, port);
+//
+// //output("(%s)",getHost(ip));
+// //char* program = client_getClientProgram(htonl(report_counters[i].ip), htons(report_counters[i].port));
+// //if (program != NULL) output(" %s",program);
+// output ("\n");
+// }
+// }
+//}
+//
+//void hal_showStreamReport(void)
+//{
+// int i;
+// float input_total = 0, output_total = 0;
+// uint32 input_packet_rate = 0, output_packet_rate = 0;
+//
+//// acquireLocalLock(_print_lock, LOCAL_LOCK_WRITE);
+//
+// output("\033[96mDIR TYP Stream ID Class ID Count Status Rate (includes VITA o/h)\033[m\n");
+//
+// // output sorted list of input streams
+// uint32 min_stream_id;
+// do
+// {
+// min_stream_id = 0xFFFFFFFF;
+// for (i = 0; i < _report_count; i++)
+// {
+// if (report_counters[i].direction == INPUT &&
+// !report_counters[i].printed &&
+// report_counters[i].stream_id < min_stream_id)
+// {
+// min_stream_id = report_counters[i].stream_id;
+// }
+// }
+// for (i = 0; i < _report_count; i++)
+// {
+// if ((report_counters[i].stream_id == min_stream_id) && !report_counters[i].printed)
+// {
+// _hal_showStreamLine(i);
+// input_total += report_counters[i].speed;
+// input_packet_rate += report_counters[i].count;
+// report_counters[i].printed = TRUE;
+// }
+// }
+// }
+// while (min_stream_id != 0xFFFFFFFF);
+//
+//
+// uint32 percent = (uint32)(input_total + 0.5);
+// output("\033[32mAggregate input rate: \033[m%u packets/s, %.3f Mbps (%u%%)\n\n",input_packet_rate,input_total,percent);
+//
+//
+// do
+// {
+// min_stream_id = 0xFFFFFFFF;
+// for (i = 0; i < _report_count; i++)
+// {
+// if (report_counters[i].direction == OUTPUT &&
+// !report_counters[i].printed &&
+// report_counters[i].stream_id < min_stream_id)
+// {
+// min_stream_id = report_counters[i].stream_id;
+// }
+// }
+// for (i = 0; i < _report_count; i++)
+// {
+// if (report_counters[i].stream_id == min_stream_id && !report_counters[i].printed)
+// {
+// _hal_showStreamLine(i);
+// output_total += report_counters[i].speed;
+// output_packet_rate += report_counters[i].count;
+// report_counters[i].printed = TRUE;
+// }
+// }
+// }
+// while (min_stream_id != 0xFFFFFFFF);
+//
+// // clear the print flags
+// for (i = 0; i < _report_count; i++)
+// {
+// report_counters[i].printed = FALSE;
+// }
+//
+//// releaseLocalLock(_print_lock);
+//
+// output("\033[32mAggregate output rate: \033[m%u packets/s, %.3f Mbps\n",output_packet_rate,output_total);
+//}
+//
+//float hal_getStreamRate(uint32 stream_id)
+//{
+// int i;
+// for (i = 0; i < _report_count; i++)
+// {
+// if (report_counters[i].stream_id == stream_id)
+// {
+// return report_counters[i].speed;
+// }
+// }
+// return 0.0f;
+//
+//}
+
+
+static void _hal_ListenerProcessWaveformPacket(VitaIFData p, uint32 stream_id, int32 length, struct sockaddr_in* sender)
+{
+ /*TODO: Make the buffer size a define*/
+
+ BufferDescriptor buf_desc;
+ buf_desc = hal_BufferRequest(HAL_RX_BUFFER_SIZE, sizeof(Complex));
+
+// BufferDescriptor buf_desc = s->buf_desc_ptr;
+//
+// if(buf_desc == NULL) {
+// output( "buf_desc was null. race?)");
+// return;
+// }
+// /* set timestamp for start of buffer if necessary */
+ if(!buf_desc->timestamp_int)
+ {
+ buf_desc->timestamp_int = htonl(p->timestamp_int);
+ buf_desc->timestamp_frac_h = htonl(p->timestamp_frac_h);
+ buf_desc->timestamp_frac_l = htonl(p->timestamp_frac_l);
+ }
+
+
+ // calculate number of samples in the buffer
+ uint32 packet_frames = hal_VitaIFPacketPayloadSize(p)/buf_desc->sample_size;
+
+ // verify the frames fit in the actual packet size
+ if(packet_frames * 8 > length - 28)
+ {
+ output( "\033[91mIncoming packet size (%d) smaller than vita header claims\033[m\n", length);
+ //HAL_update_count(htonl(p->stream_id), htonl(p->class_id_h), htonl(p->class_id_l),length,HAL_STATUS_WFM_SIZE_WRONG, INPUT, AUD, sender->sin_addr.s_addr, sender->sin_port);
+ hal_BufferRelease(&buf_desc);
+ return;
+ }
+
+ //output("Packet frames = %d\n", packet_frames);
+
+ //HAL_update_count(buf_desc->stream_id, htonl(p->class_id_h), htonl(p->class_id_l), length,HAL_STATUS_PROCESSED, INPUT, AUD, sender->sin_addr.s_addr, sender->sin_port);
+
+ // figure out how many frames it would take to fill the buffer
+ //uint32 buf_frames_left = buf_desc->num_samples - s->sample_count;
+ // figure out how many frames to copy to the buffer
+ uint32 frames_to_copy = packet_frames;
+
+ //output("Buffer mag before memcpy %.6g\n", hal_BufferMag(buf_desc));
+ // copy the frames from the packet into the buffer
+ memcpy(buf_desc->buf_ptr, // dest
+ p->payload, // src
+ frames_to_copy * buf_desc->sample_size); // number of bytes to copy
+
+ //output("Buffer mag after memcpy %.6g\n", hal_BufferMag(buf_desc));
+ /* We now require a full frame to arrive in each packet so we don't handle segmentation of data across packets */
+ buf_desc->stream_id = ntohl(p->stream_id);
+ // send off the buffer to processor that handles giving it to the correct waveform
+ sched_waveform_Schedule(buf_desc);
+
+}
+
+
+static struct timeval timeout;
+//! Allocates a buffer and receives one packet.
+//! /param buffer Buffer to be allocated and populated with packet data
+//! /returns Number of bytes read if successful, otherwise an error (recvfrom)
+static BOOL _hal_ListenerRecv(uint8* buffer, int32* len, struct sockaddr_in* sender_addr)
+{
+ uint32 addr_len = sizeof(struct sockaddr_in);
+
+ // we will wait up to 1 second for data in case someone is trying to abort us
+
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+ fd_set socks;
+ FD_ZERO(&socks);
+ FD_SET(fpga_sock, &socks);
+
+ // see if there is data in the socket (but timeout if none)
+ select(fpga_sock + 1, &socks, NULL, NULL, &timeout);
+ if (FD_ISSET(fpga_sock, &socks))
+ {
+ // yes there is data -- get it
+ *len = recvfrom(fpga_sock, buffer, ETH_FRAME_LEN, 0, (struct sockaddr*)sender_addr, &addr_len);
+ //precisionTimerLap("HAL Listener Recv");
+ if(*len < 0)
+ output("_hal_ListenerRecv: recvfrom returned -1 errno=%08X\n", errno);
+ //else
+ //output("_hal_ListenerRecv: Error len=%d sender=%s:%u\n", len, inet_ntoa(sender_addr.sin_addr), htons(sender_addr.sin_port));
+
+ // TODO: May need to filter here to handle security (packet injection)
+ return TRUE;
+ }
+
+ *len = 0;
+ return FALSE;
+}
+
+static void* _hal_ListenerLoop(void* param)
+{
+ // show that we are running
+// thread_setRunning(_hal_listen_thread);
+
+ struct sockaddr_in sender;
+ uint8 buf[ETH_FRAME_LEN];
+
+ while(!hal_listen_abort)
+ {
+ // get some data
+ int32 length = 0;
+ BOOL success = FALSE;
+
+ while (!success && !hal_listen_abort)
+ {
+ memset(&sender,0,sizeof(struct sockaddr_in));
+ memset(&buf,0,ETH_FRAME_LEN);
+ success = _hal_ListenerRecv(buf, &length, &sender);
+ }
+
+ if (!hal_listen_abort)
+ {
+ if(length == 0) // socket has been closed
+ {
+ output("_hal_ListenerLoop error: socket closed\n");
+ break;
+ }
+
+ if(length < 0)
+ {
+ output("_hal_ListenerLoop error: loop stopped\n");
+ break;
+ }
+
+ // length was reasonable -- lets try to parse the packet
+ //precisionTimerLap("HAL Listener Parse Packet");
+ _hal_ListenerParsePacket(buf, length, &sender);
+ }
+ }
+
+ //thread_done(_hal_listen_thread);
+ return NULL;
+}
+
+static void _hal_ListenerParsePacket(uint8* packet, int32 length, struct sockaddr_in* sender)
+{
+ //Stream s;
+
+ // make sure packet is long enough to inspect for VITA header info
+ if(length < 28)
+ return;
+
+ VitaIFData p = (VitaIFData) packet;
+
+ // does this packet have our OUI?
+ if(htonl(p->class_id_h) != 0x00001C2D)
+ {
+ //HAL_update_count(htonl(p->stream_id), htonl(p->class_id_h), htonl(p->class_id_l),length,HAL_STATUS_INVALID_OUI, INPUT, XXX, sender->sin_addr.s_addr, sender->sin_port);
+ return;
+ }
+
+ // verify the length of the packet matches the VITA header
+ //uint32 vita_length = (htonl(p->header) & VITA_HEADER_PACKET_SIZE_MASK) * 4;
+ /*
+ if(vita_length != length - vitaPacketOffset)
+ {
+ output("_hal_ListenerParsePacket: Vita packet size (%u*4=%u) and packet length (%u) do not match\n",
+ vita_length/4, vita_length, length - vitaPacketOffset);
+ return;
+ }
+ */
+
+ // what kind of Vita Packet is this?
+
+ //if(!(htonl(p->header) & VITA_HEADER_PACKET_TYPE_MASK) == VITA_PACKET_TYPE_IF_DATA_WITH_STREAM_ID)
+ // output("_hal_ListenerParsePacket: received ext data packet from unexpected packet tpe (0x%08X)\n", htonl(p->header) & VITA_HEADER_PACKET_TYPE_MASK);
+
+// lockBits locks;
+
+ switch(htonl(p->stream_id) & STREAM_BITS_MASK)
+ {
+ case STREAM_BITS_WAVEFORM | STREAM_BITS_IN:
+
+ //output("Received a STREAM_BITS_WAVEFORM | STREAM_BITS_IN buffer!!! wooo!!!!");
+// if ( s->buf_desc_ptr == NULL)
+// {
+// HAL_update_count(htonl(p->stream_id), htonl(p->class_id_h), htonl(p->class_id_l),length,HAL_STATUS_NO_DESC, INPUT, WFM, sender->sin_addr.s_addr, sender->sin_port);
+// }
+// else
+// {
+ _hal_ListenerProcessWaveformPacket(p, p->stream_id, length, sender);
+// }
+
+ break;
+
+ default:
+ // HAL_update_count(htonl(p->stream_id), htonl(p->class_id_h), htonl(p->class_id_l),length,HAL_STATUS_UNK_STREAM, INPUT, XXX, sender->sin_addr.s_addr, sender->sin_port);
+ output("Undefined stream in %08X", p->stream_id);
+ break;
+ }
+}
+
+void hal_Listener_Init(void)
+{
+ output("Vita Listener Init: Opening socket");
+
+ if((fpga_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
+ {
+ output("...failed! (socket call returned -1)\n");
+ return;
+ }
+
+ // set up destination address
+ struct sockaddr_in addr;
+
+ memset(&addr,0,sizeof(addr));
+ addr.sin_family = AF_INET;
+ addr.sin_addr.s_addr = htonl(INADDR_ANY); // this is where we could limit to one IP
+ addr.sin_port=htons(VITA_49_PORT);
+
+ // bind the socket to the port and/or IP
+ output("...binding");
+ if(bind(fpga_sock, (struct sockaddr *)&addr, sizeof(addr)) == -1)
+ {
+ output("...failed! (bind call returned -1)\n");
+ return;
+ }
+ output("\n");
+
+ _hal_listen_thread = (pthread_t) NULL;
+ pthread_create(&_hal_listen_thread, NULL, &_hal_ListenerLoop, NULL);
+
+// _hal_counter_thread = NULL;
+// _hal_counter_thread = thread_add(locks, "HALSTATS", "Monitors System I/O", _hal_counter_loop, SCHED_OTHER, 0);
+// if (action == THREAD_START)
+// {
+// thread_start(locks, _hal_counter_thread, NULL);
+// }
+
+}
+
+
diff --git a/DSP_API/SmartSDR_Interface/hal_listener.h b/DSP_API/SmartSDR_Interface/hal_listener.h
new file mode 100644
index 0000000..635f826
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/hal_listener.h
@@ -0,0 +1,115 @@
+///*! \file hal_listener.h
+// * \brief Listener for VITA-49 packets
+// *
+// * \copyright Copyright 2012-2013 FlexRadio Systems. All Rights Reserved.
+// * Unauthorized use, duplication or distribution of this software is
+// * strictly prohibited by law.
+// *
+// * \date Mar 28, 2012
+// * \author Eric & Steve
+// */
+
+/* *****************************************************************************
+ *
+ * Copyright (C) 2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+#ifndef _LISTENER_H
+#define _LISTENER_H
+
+#include "../common.h"
+// #include "hal_display.h"
+// #include "display_list.h"
+#include "datatypes.h"
+
+#define HAL_RX_BUFFER_SIZE 128
+#define HAL_TX_BUFFER_SIZE HAL_RX_BUFFER_SIZE
+#define HAL_SAMPLE_SIZE sizeof(Complex);
+
+enum STREAM_DIRECTION
+{
+ INPUT = 1,
+ OUTPUT = 2
+};
+typedef enum STREAM_DIRECTION StreamDirection;
+
+enum STREAM_TYPEX
+{
+ FFT = 1,
+ MMX = 2,
+ IQD = 3,
+ AUD = 4,
+ MET = 5,
+ DSC = 6,
+ TXD = 7,
+ PAN = 8,
+ WFL = 9,
+ WFM = 10,
+ XXX = 99
+};
+typedef enum STREAM_TYPEX ShortStreamType;
+//
+//typedef struct _stream_counters
+//{
+// uint32 stream_id;
+// StreamDirection direction;
+// ShortStreamType stream_type;
+// uint32 class_id_h;
+// uint32 class_id_l;
+// uint32 size;
+// uint32 count;
+// uint32 status;
+// float speed;
+// BOOL printed;
+// uint32 ip;
+// uint16 port;
+//} stream_count_type, *StreamCount;
+
+void hal_Listener_Init(void);
+//DisplayClient hal_ListenerGetFFTClient();
+//void hal_showStreamReport(void);
+//float hal_getStreamRate(uint32 stread_id);
+//void HAL_update_count(uint32 stream_id, uint32 class_id_h, uint32 class_id_l, uint32 size, uint32 status, StreamDirection direction, ShortStreamType strm_type, uint32 ip, uint16 port);
+
+
+
+#define HAL_STATUS_PROCESSED 1
+#define HAL_STATUS_INVALID_OUI 2
+#define HAL_STATUS_NO_DESC 3
+#define HAL_STATUS_UNSUPPORTED_SAMP 4
+#define HAL_STATUS_UNSUPPORTED_FFT 5
+#define HAL_STATUS_BAD_TYPE 6
+#define HAL_STATUS_FFT_NO_STREAM 7
+#define HAL_STATUS_IQ_NO_STREAM 8
+#define HAL_STATUS_OUTPUT_OK 9
+#define HAL_STATUS_DSP_NO_STREAM 10
+#define HAL_STATUS_DAX_NO_STREAM 11
+#define HAL_STATUS_DAX_SIZE_WRONG 12
+#define HAL_STATUS_DAX_WRONG_CHAN 13
+#define HAL_STATUS_TX_SKIP 14
+#define HAL_STATUS_TX_ZERO 15
+#define HAL_STATUS_UNK_STREAM 16
+
+
+/* Waveform defines */
+#define HAL_STATUS_WFM_SIZE_WRONG 17
+#define HAL_STATUS_WFM_NO_STREAM 18
+
+
+#endif // _LISTENER_H
diff --git a/DSP_API/SmartSDR_Interface/hal_vita.c b/DSP_API/SmartSDR_Interface/hal_vita.c
new file mode 100644
index 0000000..3325857
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/hal_vita.c
@@ -0,0 +1,67 @@
+///*! \file hal_vita.c
+// * \brief Structure to support VITA-49 packets
+// *
+// * \copyright Copyright 2012-2013 FlexRadio Systems. All Rights Reserved.
+// * Unauthorized use, duplication or distribution of this software is
+// * strictly prohibited by law.
+// *
+// * \date 29-MAR-2012
+// * \author Eric & Steve
+// */
+
+/* *****************************************************************************
+ *
+ * Copyright (C) 2012-2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+#include
+#include // htonl
+
+#include "common.h"
+#include "hal_vita.h"
+
+uint32 hal_VitaIFPacketPayloadSize(VitaIFData packet)
+{
+ uint32 header = htonl(packet->header);
+ uint32 bytes = (header & VITA_HEADER_PACKET_SIZE_MASK)*4; // packet size is in 32-bit words
+
+ switch(header & VITA_HEADER_PACKET_TYPE_MASK)
+ {
+ case VITA_PACKET_TYPE_IF_DATA: // do nothing
+ break;
+ case VITA_PACKET_TYPE_IF_DATA_WITH_STREAM_ID:
+ bytes -= 4; // account for stream ID
+ break;
+ default: // wrong kind of packet here
+ //output("Called with wrong type of packet (%X)\n", header>>28);
+ break;
+ }
+
+ bytes -= 4; // account for header
+
+ if(header & VITA_HEADER_C_MASK) bytes -= 8; // account for class ID
+ if(header & VITA_HEADER_T_MASK) bytes -= 4; // account for trailer
+
+ if((header & VITA_HEADER_TSI_MASK) != VITA_TSI_NONE)
+ bytes -= 4;
+
+ if((header & VITA_HEADER_TSF_MASK) != VITA_TSF_NONE)
+ bytes -= 8;
+
+ return bytes;
+}
diff --git a/DSP_API/SmartSDR_Interface/hal_vita.h b/DSP_API/SmartSDR_Interface/hal_vita.h
new file mode 100644
index 0000000..8658170
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/hal_vita.h
@@ -0,0 +1,39 @@
+/* *****************************************************************************
+ * vita.h
+ *
+ * Describes VITA 49 structures
+ *
+ * \date 28-MAR-2012
+ * \author Eric Wachsmann, KE5DTO
+ *
+ * *****************************************************************************
+ *
+ * Copyright (C) 2012-2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+#ifndef _HAL_VITA_H
+#define _HAL_VITA_H
+
+#include "datatypes.h"
+#include "vita.h"
+
+//! gets the size of the payload in bytes based on the header
+uint32 hal_VitaIFPacketPayloadSize(VitaIFData packet);
+
+#endif /* _HAL_VITA_H */
diff --git a/DSP_API/SmartSDR_Interface/io_utils.c b/DSP_API/SmartSDR_Interface/io_utils.c
new file mode 100644
index 0000000..5e1a313
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/io_utils.c
@@ -0,0 +1,58 @@
+///*! \file io_utils.c
+// * \brief Module that contains various IO utilities
+// *
+// * \copyright Copyright 2011-2012 FlexRadio Systems. All Rights Reserved.
+// * Unauthorized use, duplication or distribution of this software is
+// * strictly prohibited by law.
+// *
+// * \date 9-NOV-2011
+// * \author Terry Gerdes, AB5K
+// * \author Stephen Hicks, N5AC
+// */
+
+/* *****************************************************************************
+ *
+ * Copyright (C) 2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "common.h"
+
+uint32 net_get_ip()
+{
+ struct ifaddrs* ifAddrStruct = NULL;
+ struct ifaddrs* ifa = NULL;
+ uint32 ip = 0;
+
+ getifaddrs(&ifAddrStruct);
+
+ ifa = ifAddrStruct->ifa_next->ifa_next->ifa_next->ifa_next; // skip to 4th interface
+ ip = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr;
+
+ freeifaddrs(ifAddrStruct);
+
+ return ip;
+}
diff --git a/DSP_API/SmartSDR_Interface/io_utils.h b/DSP_API/SmartSDR_Interface/io_utils.h
new file mode 100644
index 0000000..4a987e3
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/io_utils.h
@@ -0,0 +1,50 @@
+///*! \file io_utils.h
+// * \brief \\TODO Add summary description of this module
+// *
+// * Copyright 2011 FlexRadio Systems. All Rights Reserved.
+// *
+// * Unauthorized use, duplication or distribution of this software is
+// * strictly prohibited by law.
+// *
+// * \date Nov 9, 2011
+// * \author Terry - AB5K
+// *
+// * Date: 23-AUG-2011
+// *
+// *
+// */
+
+/* *****************************************************************************
+ *
+ * Copyright (C) 2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+#ifndef IO_UTILS_H_
+#define IO_UTILS_H_
+
+#include
+#include "datatypes.h"
+
+/* ------------------------------------------------------------------------ *
+ * Prototypes *
+ * ------------------------------------------------------------------------ */
+
+uint32 net_get_ip();
+
+#endif /* IO_UTILS_H_ */
diff --git a/DSP_API/SmartSDR_Interface/sched_waveform.c b/DSP_API/SmartSDR_Interface/sched_waveform.c
new file mode 100644
index 0000000..1137d25
--- /dev/null
+++ b/DSP_API/SmartSDR_Interface/sched_waveform.c
@@ -0,0 +1,703 @@
+///*! \file sched_waveform.c
+// * \brief Schedule Wavefrom Streams
+// *
+// * \copyright Copyright 2012-2014 FlexRadio Systems. All Rights Reserved.
+// * Unauthorized use, duplication or distribution of this software is
+// * strictly prohibited by law.
+// *
+// * \date 29-AUG-2014
+// * \author Ed Gonzalez
+// *
+// */
+
+/* *****************************************************************************
+ *
+ * Copyright (C) 2014 FlexRadio Systems.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * Contact Information:
+ * email: gplflexradiosystems.com
+ * Mail: FlexRadio Systems, Suite 1-150, 4616 W. Howard LN, Austin, TX 78728
+ *
+ * ************************************************************************** */
+
+#include
+#include
+#include