aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-11-13 19:15:09 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-11-13 19:15:09 +0100
commit669705c6edb5cfbcb2f0ca672612777d1e819aa6 (patch)
tree18738791ae76f22a2dedf2007c202bfaad72d69b
parentfc1c5de54746857cc7b21e44b83b042792b3ddaa (diff)
Restructure: Move filters from common code to 'libfilter'
-rw-r--r--.gitignore1
-rw-r--r--configure.ac1
-rw-r--r--src/Makefile.am2
-rw-r--r--src/amps/Makefile.am1
-rw-r--r--src/anetz/Makefile.am1
-rw-r--r--src/bnetz/Makefile.am1
-rw-r--r--src/cnetz/Makefile.am1
-rw-r--r--src/cnetz/scrambler.h2
-rw-r--r--src/common/Makefile.am1
-rw-r--r--src/common/emphasis.c2
-rw-r--r--src/common/fm_modulation.h2
-rw-r--r--src/common/samplerate.h2
-rw-r--r--src/jtacs/Makefile.am1
-rw-r--r--src/libfilter/Makefile.am6
-rw-r--r--src/libfilter/iir_filter.c (renamed from src/common/iir_filter.c)2
-rw-r--r--src/libfilter/iir_filter.h (renamed from src/common/iir_filter.h)0
-rw-r--r--src/nmt/Makefile.am1
-rw-r--r--src/r2000/Makefile.am1
-rw-r--r--src/tacs/Makefile.am1
-rw-r--r--src/test/Makefile.am5
-rw-r--r--src/test/test_emphasis.c2
-rw-r--r--src/test/test_filter.c2
-rw-r--r--src/test/test_performance.c2
-rw-r--r--src/tv/Makefile.am1
-rw-r--r--src/tv/bas.c2
-rw-r--r--src/tv/main.c4
26 files changed, 34 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index 6a87413..961b61b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,7 @@ compile
.libs
.dirstamp
m4
+src/libfilter/libfilter.a
src/common/libcommon.a
src/common/libmobile.a
src/common/libimage.a
diff --git a/configure.ac b/configure.ac
index 93176b3..cea6660 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,6 +75,7 @@ AS_IF([test "x$with_soapy" == "xyes"],[AC_MSG_NOTICE( Compiling with SoapySDR su
AS_IF([test "x$somethingmagick" == "xyes"],[AC_MSG_NOTICE( Compiling with ImageMagick )],[AC_MSG_NOTICE( ImageMagick not supported )])
AC_OUTPUT(
+ src/libfilter/Makefile
src/common/Makefile
src/anetz/Makefile
src/bnetz/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index a248673..378d449 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,3 @@
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = common anetz bnetz cnetz nmt amps tacs jtacs r2000 tv test
+SUBDIRS = libfilter common anetz bnetz cnetz nmt amps tacs jtacs r2000 tv test
diff --git a/src/amps/Makefile.am b/src/amps/Makefile.am
index c94f2c1..43e4887 100644
--- a/src/amps/Makefile.am
+++ b/src/amps/Makefile.am
@@ -28,6 +28,7 @@ amps_LDADD = \
libamps.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/anetz/Makefile.am b/src/anetz/Makefile.am
index 48e7489..b742481 100644
--- a/src/anetz/Makefile.am
+++ b/src/anetz/Makefile.am
@@ -14,6 +14,7 @@ anetz_LDADD = \
$(top_builddir)/src/common/libgermanton.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/bnetz/Makefile.am b/src/bnetz/Makefile.am
index 059f455..38adde6 100644
--- a/src/bnetz/Makefile.am
+++ b/src/bnetz/Makefile.am
@@ -16,6 +16,7 @@ bnetz_LDADD = \
$(top_builddir)/src/common/libgermanton.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/cnetz/Makefile.am b/src/cnetz/Makefile.am
index 9d5c86b..ee678e7 100644
--- a/src/cnetz/Makefile.am
+++ b/src/cnetz/Makefile.am
@@ -20,6 +20,7 @@ cnetz_LDADD = \
$(top_builddir)/src/common/libgermanton.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/cnetz/scrambler.h b/src/cnetz/scrambler.h
index f06e4ac..d38edc5 100644
--- a/src/cnetz/scrambler.h
+++ b/src/cnetz/scrambler.h
@@ -1,4 +1,4 @@
-#include "../common/iir_filter.h"
+#include "../libfilter/iir_filter.h"
typedef struct scrambler {
double carrier_phaseshift65536;/* carrier phase shift per sample */
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index 6005e56..7a59d64 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -10,7 +10,6 @@ libcommon_a_SOURCES = \
wave.c \
goertzel.c \
jitter.c \
- iir_filter.c \
dtmf.c \
samplerate.c \
emphasis.c \
diff --git a/src/common/emphasis.c b/src/common/emphasis.c
index 5a1453e..08f944a 100644
--- a/src/common/emphasis.c
+++ b/src/common/emphasis.c
@@ -22,7 +22,7 @@
#include <string.h>
#include <math.h>
#include "sample.h"
-#include "iir_filter.h"
+#include "../libfilter/iir_filter.h"
#include "emphasis.h"
#include "debug.h"
diff --git a/src/common/fm_modulation.h b/src/common/fm_modulation.h
index d0bdaa1..68f0bcd 100644
--- a/src/common/fm_modulation.h
+++ b/src/common/fm_modulation.h
@@ -1,4 +1,4 @@
-#include "../common/iir_filter.h"
+#include "../libfilter/iir_filter.h"
enum fm_mod_state {
MOD_STATE_OFF, /* transmitter off, no IQ vector */
diff --git a/src/common/samplerate.h b/src/common/samplerate.h
index 4fbf680..8f8ea87 100644
--- a/src/common/samplerate.h
+++ b/src/common/samplerate.h
@@ -1,4 +1,4 @@
-#include "iir_filter.h"
+#include "../libfilter/iir_filter.h"
typedef struct samplerate {
double factor;
diff --git a/src/jtacs/Makefile.am b/src/jtacs/Makefile.am
index 7074176..b4e6fdf 100644
--- a/src/jtacs/Makefile.am
+++ b/src/jtacs/Makefile.am
@@ -14,6 +14,7 @@ jtacs_LDADD = \
../amps/libamps.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/libfilter/Makefile.am b/src/libfilter/Makefile.am
new file mode 100644
index 0000000..2a387ee
--- /dev/null
+++ b/src/libfilter/Makefile.am
@@ -0,0 +1,6 @@
+AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
+
+noinst_LIBRARIES = libfilter.a
+
+libfilter_a_SOURCES = \
+ iir_filter.c
diff --git a/src/common/iir_filter.c b/src/libfilter/iir_filter.c
index 3d1e15c..2f6bb1d 100644
--- a/src/common/iir_filter.c
+++ b/src/libfilter/iir_filter.c
@@ -22,7 +22,7 @@
#include <string.h>
#include <stdlib.h>
#include <math.h>
-#include "sample.h"
+#include "../common/sample.h"
#include "iir_filter.h"
#define PI M_PI
diff --git a/src/common/iir_filter.h b/src/libfilter/iir_filter.h
index a5956c8..a5956c8 100644
--- a/src/common/iir_filter.h
+++ b/src/libfilter/iir_filter.h
diff --git a/src/nmt/Makefile.am b/src/nmt/Makefile.am
index 0c567be..923dfde 100644
--- a/src/nmt/Makefile.am
+++ b/src/nmt/Makefile.am
@@ -24,6 +24,7 @@ nmt_LDADD = \
libdmssms.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/r2000/Makefile.am b/src/r2000/Makefile.am
index 5beee48..d17a392 100644
--- a/src/r2000/Makefile.am
+++ b/src/r2000/Makefile.am
@@ -14,6 +14,7 @@ radiocom2000_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/tacs/Makefile.am b/src/tacs/Makefile.am
index ec7163c..190e9a2 100644
--- a/src/tacs/Makefile.am
+++ b/src/tacs/Makefile.am
@@ -15,6 +15,7 @@ tacs_LDADD = \
../amps/libamps.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index d310415..1c86d46 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -15,6 +15,7 @@ test_filter_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
@@ -37,6 +38,7 @@ test_emphasis_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
@@ -49,6 +51,7 @@ test_dms_LDADD = \
$(top_builddir)/src/nmt/libdmssms.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
@@ -61,6 +64,7 @@ test_sms_LDADD = \
$(top_builddir)/src/nmt/libdmssms.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
@@ -72,6 +76,7 @@ test_performance_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/test/test_emphasis.c b/src/test/test_emphasis.c
index f404cdd..b02c106 100644
--- a/src/test/test_emphasis.c
+++ b/src/test/test_emphasis.c
@@ -3,7 +3,7 @@
#include <math.h>
#include <string.h>
#include "../common/sample.h"
-#include "../common/iir_filter.h"
+#include "../libfilter/iir_filter.h"
#include "../common/emphasis.h"
#include "../common/debug.h"
diff --git a/src/test/test_filter.c b/src/test/test_filter.c
index dc8ca7d..10b1393 100644
--- a/src/test/test_filter.c
+++ b/src/test/test_filter.c
@@ -3,7 +3,7 @@
#include <math.h>
#include <string.h>
#include "../common/sample.h"
-#include "../common/iir_filter.h"
+#include "../libfilter/iir_filter.h"
#include "../common/debug.h"
#define level2db(level) (20 * log10(level))
diff --git a/src/test/test_performance.c b/src/test/test_performance.c
index dbc6b5c..175185c 100644
--- a/src/test/test_performance.c
+++ b/src/test/test_performance.c
@@ -4,7 +4,7 @@
#include <string.h>
#include <sys/time.h>
#include "../common/sample.h"
-#include "../common/iir_filter.h"
+#include "../libfilter/iir_filter.h"
#include "../common/fm_modulation.h"
#include "../common/debug.h"
diff --git a/src/tv/Makefile.am b/src/tv/Makefile.am
index ffee6fd..b6d20de 100644
--- a/src/tv/Makefile.am
+++ b/src/tv/Makefile.am
@@ -16,6 +16,7 @@ osmotv_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/common/libimage.a \
$(top_builddir)/src/common/libcommon.a \
+ $(top_builddir)/src/libfilter/libfilter.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
$(SOAPY_LIBS) \
diff --git a/src/tv/bas.c b/src/tv/bas.c
index fb8c70b..86df443 100644
--- a/src/tv/bas.c
+++ b/src/tv/bas.c
@@ -21,7 +21,7 @@
#include <stdint.h>
#include <math.h>
#include "../common/sample.h"
-#include "../common/iir_filter.h"
+#include "../libfilter/iir_filter.h"
#include "bas.h"
#include "vcr.h"
#include "fubk.h"
diff --git a/src/tv/main.c b/src/tv/main.c
index a107d53..115d97d 100644
--- a/src/tv/main.c
+++ b/src/tv/main.c
@@ -28,7 +28,7 @@ enum paging_signal;
#include <signal.h>
#include <math.h>
#include "../common/sample.h"
-#include "../common/iir_filter.h"
+#include "../libfilter/iir_filter.h"
#include "../common/fm_modulation.h"
#include "../common/wave.h"
#include "../common/img.h"
@@ -260,7 +260,7 @@ static int handle_options(int argc, char **argv)
return skip_args;
}
-static void tx_bas(sample_t *sample_bas, __attribute__((__unused__)) sample_t *sample_tone, uint8_t *power_tone, int samples)
+static void tx_bas(sample_t *sample_bas, __attribute__((__unused__)) sample_t *sample_tone, __attribute__((__unused__)) uint8_t *power_tone, int samples)
{
/* catch signals */
signal(SIGINT, sighandler);