summaryrefslogtreecommitdiff
path: root/gr-vocoder/include/gnuradio
diff options
context:
space:
mode:
Diffstat (limited to 'gr-vocoder/include/gnuradio')
-rw-r--r--gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt27
-rw-r--r--gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt.orig53
-rw-r--r--gr-vocoder/include/gnuradio/vocoder/codec2.h10
-rw-r--r--gr-vocoder/include/gnuradio/vocoder/freedv_api.h68
-rw-r--r--gr-vocoder/include/gnuradio/vocoder/freedv_rx_ss.h63
-rw-r--r--gr-vocoder/include/gnuradio/vocoder/freedv_tx_ss.h59
6 files changed, 275 insertions, 5 deletions
diff --git a/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt b/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt
index 60f75e791..65ec5238a 100644
--- a/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt
+++ b/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2016 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -32,10 +32,31 @@ install(FILES
g723_24_encode_sb.h
g723_40_decode_bs.h
g723_40_encode_sb.h
- gsm_fr_decode_ps.h
- gsm_fr_encode_sp.h
ulaw_decode_bs.h
ulaw_encode_sb.h
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/vocoder
+)
+if(LIBCODEC2_FOUND)
+install(FILES
+ codec2.h
+ codec2_decode_ps.h
+ codec2_encode_sp.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/vocoder
+)
+endif(LIBCODEC2_FOUND)
+if(LIBCODEC2_HAS_FREEDV_API)
+install(FILES
+ freedv_api.h
+ freedv_rx_ss.h
+ freedv_tx_ss.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/vocoder
COMPONENT "vocoder_devel"
)
+endif(LIBCODEC2_HAS_FREEDV_API)
+if(LIBGSM_FOUND)
+install(FILES
+ gsm_fr_decode_ps.h
+ gsm_fr_encode_sp.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/vocoder
+)
+endif(LIBGSM_FOUND)
diff --git a/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt.orig b/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt.orig
new file mode 100644
index 000000000..172f18a73
--- /dev/null
+++ b/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt.orig
@@ -0,0 +1,53 @@
+# Copyright 2012,2013,2016 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio 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, or (at your option)
+# any later version.
+#
+# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+########################################################################
+# Install header files
+########################################################################
+install(FILES
+ api.h
+ alaw_decode_bs.h
+ alaw_encode_sb.h
+ cvsd_decode_bs.h
+ cvsd_encode_sb.h
+ g721_decode_bs.h
+ g721_encode_sb.h
+ g723_24_decode_bs.h
+ g723_24_encode_sb.h
+ g723_40_decode_bs.h
+ g723_40_encode_sb.h
+ ulaw_decode_bs.h
+ ulaw_encode_sb.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/vocoder
+)
+if(LIBCODEC2_FOUND)
+install(FILES
+ codec2.h
+ codec2_decode_ps.h
+ codec2_encode_sp.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/vocoder
+)
+endif(LIBCODEC2_FOUND)
+if(LIBGSM_FOUND)
+install(FILES
+ gsm_fr_decode_ps.h
+ gsm_fr_encode_sp.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/vocoder
+)
+endif(LIBGSM_FOUND)
diff --git a/gr-vocoder/include/gnuradio/vocoder/codec2.h b/gr-vocoder/include/gnuradio/vocoder/codec2.h
index a3c222520..afa53d5ac 100644
--- a/gr-vocoder/include/gnuradio/vocoder/codec2.h
+++ b/gr-vocoder/include/gnuradio/vocoder/codec2.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2014 Free Software Foundation, Inc.
+ * Copyright 2014,2016 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -26,7 +26,7 @@
#include <gnuradio/vocoder/api.h>
extern "C" {
-#include "../lib/codec2/codec2.h"
+#include <codec2/codec2.h>
}
namespace gr {
@@ -42,6 +42,12 @@ namespace gr {
MODE_1400 = CODEC2_MODE_1400,
MODE_1300 = CODEC2_MODE_1300,
MODE_1200 = CODEC2_MODE_1200,
+#ifdef CODEC2_MODE_700
+ MODE_700 = CODEC2_MODE_700,
+#endif
+#ifdef CODEC2_MODE_700B
+ MODE_700B = CODEC2_MODE_700B,
+#endif
};
private:
diff --git a/gr-vocoder/include/gnuradio/vocoder/freedv_api.h b/gr-vocoder/include/gnuradio/vocoder/freedv_api.h
new file mode 100644
index 000000000..230da4e10
--- /dev/null
+++ b/gr-vocoder/include/gnuradio/vocoder/freedv_api.h
@@ -0,0 +1,68 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2016 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio 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, or (at your option)
+ * any later version.
+ *
+ * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _VOCODER_FREEDV_H_
+#define _VOCODER_FREEDV_H_
+
+#include <gnuradio/vocoder/api.h>
+
+extern "C" {
+#include <codec2/codec2.h>
+#include <codec2/freedv_api.h>
+#include <codec2/modem_stats.h>
+}
+
+namespace gr {
+ namespace vocoder {
+
+ class VOCODER_API freedv_api {
+ public:
+
+ enum freedv_modes {
+#ifdef FREEDV_MODE_1600
+ MODE_1600 = FREEDV_MODE_1600,
+#endif
+#ifdef FREEDV_MODE_700
+ MODE_700 = FREEDV_MODE_700,
+#endif
+#ifdef FREEDV_MODE_700B
+ MODE_700B = FREEDV_MODE_700B,
+#endif
+#ifdef FREEDV_MODE_2400A
+ MODE_2400A = FREEDV_MODE_2400A,
+#endif
+#ifdef FREEDV_MODE_2400B
+ MODE_2400B = FREEDV_MODE_2400B,
+#endif
+#ifdef FREEDV_MODE_800XA
+ MODE_800XA = FREEDV_MODE_800XA,
+#endif
+ };
+
+ private:
+
+ };
+
+ } /* namespace vocoder */
+} /* namespace gr */
+
+#endif /* _VOCODER_FREEDV_H_ */
diff --git a/gr-vocoder/include/gnuradio/vocoder/freedv_rx_ss.h b/gr-vocoder/include/gnuradio/vocoder/freedv_rx_ss.h
new file mode 100644
index 000000000..a6568dee7
--- /dev/null
+++ b/gr-vocoder/include/gnuradio/vocoder/freedv_rx_ss.h
@@ -0,0 +1,63 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2016 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio 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, or (at your option)
+ * any later version.
+ *
+ * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_VOCODER_FREEDV_RX_H
+#define INCLUDED_VOCODER_FREEDV_RX_H
+
+#include <gnuradio/vocoder/api.h>
+#include <gnuradio/vocoder/freedv_api.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace vocoder {
+
+ /*!
+ * \brief FreeDV demodulator
+ * \ingroup audio_blk
+ *
+ * Input: 16-bit short values of an audio signal with sampling rate 8 kHz.
+ *
+ * Output: 16-bit short values of an audio signal with sampling rate 8 kHz.
+ *
+ * See also gr::vocoder::freedv_tx_ss.
+ */
+ class VOCODER_API freedv_rx_ss : virtual public gr::block
+ {
+ public:
+ typedef boost::shared_ptr<freedv_rx_ss> sptr;
+
+ /*!
+ * \brief Make FreeDV modem demodulator block.
+ *
+ * \param mode Operating Mode designation
+ * \param squelch_thresh FreeDV modem squelch threshold value
+ */
+ static sptr make(int mode=freedv_api::MODE_1600, float squelch_thresh=-100.0);
+
+ virtual void set_squelch_thresh(float squelch_thresh) = 0;
+ virtual float squelch_thresh() = 0;
+ };
+
+ } /* namespace vocoder */
+} /* namespace gr */
+
+#endif /* INCLUDED_VOCODER_FREEDV_RX_H */
diff --git a/gr-vocoder/include/gnuradio/vocoder/freedv_tx_ss.h b/gr-vocoder/include/gnuradio/vocoder/freedv_tx_ss.h
new file mode 100644
index 000000000..0e80d78bf
--- /dev/null
+++ b/gr-vocoder/include/gnuradio/vocoder/freedv_tx_ss.h
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2016 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio 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, or (at your option)
+ * any later version.
+ *
+ * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_VOCODER_FREEDV_TX_H
+#define INCLUDED_VOCODER_FREEDV_TX_H
+
+#include <gnuradio/vocoder/api.h>
+#include <gnuradio/vocoder/freedv_api.h>
+#include <gnuradio/sync_block.h>
+
+namespace gr {
+ namespace vocoder {
+
+ /*!
+ * \brief FreeDV modulator
+ * \ingroup audio_blk
+ *
+ * Input: Speech (audio) signal as 16-bit shorts, sampling rate 8 kHz.
+ *
+ * Output: Signal (audio) as 16-bit shorts, sampling rate 8 kHz.
+ *
+ */
+ class VOCODER_API freedv_tx_ss : virtual public gr::sync_block
+ {
+ public:
+ typedef boost::shared_ptr<freedv_tx_ss> sptr;
+
+ /*!
+ * \brief Make FreeDV Modem modulator block.
+ *
+ * \param mode Operating Mode designation
+ * \param msg_txt Low Rate message text (callsign, location)
+ */
+ static sptr make(int mode=freedv_api::MODE_1600,const std::string msg_txt="GNU Radio");
+ };
+
+ } /* namespace vocoder */
+} /* namespace gr */
+
+#endif /* INCLUDED_VOCODER_FREEDV_TX_H */