aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-06-02 11:25:28 +0200
committerHarald Welte <laforge@gnumonks.org>2017-06-22 17:08:15 +0000
commita9b92769482585b17467008fa0d78085d7b10820 (patch)
tree3352b7beb463c86d3af2b5751da2896db868e4a6
parentbb8396690ec36a912c2134087be8ec61166e4ad2 (diff)
gsm0808: add default speech codec configuration
In an AoIP scenario, the speech codec list field specifies the codecs used in the RTP interface. This patch adds a table with default codec configurations that match the codec configurations that are also used on the air interface. Change-Id: I9dc0165d76a022b2c1b7418bc3133407e61b7261
-rw-r--r--include/osmocom/gsm/protocol/gsm_08_08.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h
index 9e00d23f..d1653309 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -449,6 +449,27 @@ struct gsm0808_speech_codec {
uint16_t cfg;
};
+/*! \brief Default speech codec configurations: Some codecs specified with
+ * struct gsm0808_speech_codec, require a configuration (cfg). The following
+ * default configuration will configure the codec (RTP) to match the
+ * configuration that is used on the air interface (Um).
+ *
+ * Default values for FR_AMR, HR_AMR and OHR_AMR:
+ * See also: 3GPP TS 28.062, Table 7.11.3.1.3-2: Preferred
+ * Configurations for the Adaptive Multi-Rate Codec Types
+ *
+ * Default values for FR_AMR_WB, OFR_AMR_WB and OHR_AMR_WB:
+ * See also: 3GPP TS 26.103, Table 5.7-1: Allowed Configurations
+ * for the Adaptive Multi-Rate - Wideband Codec Types */
+enum gsm0808_speech_codec_defaults {
+ GSM0808_SC_CFG_DEFAULT_FR_AMR = 0xffff,
+ GSM0808_SC_CFG_DEFAULT_HR_AMR = 0x073f,
+ GSM0808_SC_CFG_DEFAULT_OHR_AMR = 0xffff,
+ GSM0808_SC_CFG_DEFAULT_FR_AMR_WB = 0x01,
+ GSM0808_SC_CFG_DEFAULT_OFR_AMR_WB = 0x3f,
+ GSM0808_SC_CFG_DEFAULT_OHR_AMR_WB = 0x01,
+};
+
/* 3GPP TS 48.008 3.2.2.103 Speech Codec List */
#define SPEECH_CODEC_MAXLEN 255
struct gsm0808_speech_codec_list {