summaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm/protocol/gsm_08_08.h
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-09-14 09:13:36 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2018-09-14 16:24:10 +0200
commit2fd4fe6aa109c8df50baac465f0393a303a64dd2 (patch)
treebe28676b87da9447921c15b56f23597584ef389f /include/osmocom/gsm/protocol/gsm_08_08.h
parent4b081b1d8862114f59af433b943dea86ce47ac71 (diff)
gsm0808: add function to convert amr gsm0408 setings to gsm0808
Add a function to convert struct gsm48_multi_rate_conf, which holds the codec settings for AMR, to S0-S15 bit representation as defined in 3GPP TS 48.008 3.2.2.49 Change-Id: I4e656731b16621736c7a2f4e64d9ce63b1064e98 Related: OS#3548
Diffstat (limited to 'include/osmocom/gsm/protocol/gsm_08_08.h')
-rw-r--r--include/osmocom/gsm/protocol/gsm_08_08.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h
index 94338178..8431ace5 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -503,6 +503,20 @@ enum gsm0808_speech_codec_defaults {
GSM0808_SC_CFG_DEFAULT_OHR_AMR_WB = 0x01,
};
+/*! Default speech codec configurations broken down by reate.
+ * See also: 3GPP TS 28.062, Table 7.11.3.1.3-2: Preferred Configurations for
+ * the Adaptive Multi-Rate Codec Types. */
+enum gsm0808_speech_codec_rate_defaults {
+ GSM0808_SC_CFG_DEFAULT_AMR_4_75 = 0xff03,
+ GSM0808_SC_CFG_DEFAULT_AMR_5_15 = 0x0000,
+ GSM0808_SC_CFG_DEFAULT_AMR_5_90 = 0xff06,
+ GSM0808_SC_CFG_DEFAULT_AMR_6_70 = 0x3e08,
+ GSM0808_SC_CFG_DEFAULT_AMR_7_40 = 0x0c12,
+ GSM0808_SC_CFG_DEFAULT_AMR_7_95 = 0xc020,
+ GSM0808_SC_CFG_DEFAULT_AMR_10_2 = 0x3040,
+ GSM0808_SC_CFG_DEFAULT_AMR_12_2 = 0xc082
+};
+
/* 3GPP TS 48.008 3.2.2.103 Speech Codec List */
#define SPEECH_CODEC_MAXLEN 255
struct gsm0808_speech_codec_list {