Add new TRAU frame sync code

This code is able to detect and sync against a variety of TRAU
frame sync patterns.  Focus is so far on those patterns present on
16k sub-slots, but 8k sub-slots are expected to be supported soon,
too.

A new codebase for this is required as the old OsmoNITB code had
conflated a 16k sub-slot multiplexer with TRAU frame synchronization,
so there was no way to separate those two parts and hence no way to
support 8k sub-slots.

Change-Id: Ia6fe6228b0b8b9a27999f37ce1115ed5558881ea
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bd95cf5..dcd9a4f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -7,7 +7,8 @@
 		  ipa_proxy_test	\
 		  subchan_demux/subchan_demux_test \
 		  ipa_recv/ipa_recv_test \
-		  rtp_test/rtp_test
+		  rtp_test/rtp_test \
+		  trau_sync/trau_sync_test
 
 e1inp_ipa_bsc_test_SOURCES = e1inp_ipa_bsc_test.c
 e1inp_ipa_bsc_test_LDADD = $(top_builddir)/src/libosmoabis.la \
@@ -36,6 +37,10 @@
 rtp_test_rtp_test_LDADD = $(top_builddir)/src/libosmotrau.la \
 			$(LIBOSMOCORE_LIBS)
 
+trau_sync_trau_sync_test_SOURCES = trau_sync/trau_sync_test.c
+trau_sync_trau_sync_test_LDADD = $(top_builddir)/src/libosmotrau.la \
+			$(LIBOSMOCORE_LIBS)
+
 
 # boilerplate for the tests
 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
@@ -59,7 +64,8 @@
 EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) \
 	subchan_demux/subchan_demux_test.ok \
 	ipa_recv/ipa_recv_test.ok \
-	rtp_test/rtp_test.ok
+	rtp_test/rtp_test.ok \
+	trau_sync/trau_sync_test.ok trau_sync/trau_sync_test.err
 
 TESTSUITE = $(srcdir)/testsuite