summaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/gsm/gsm0808_utils.h1
-rw-r--r--include/osmocom/gsm/protocol/gsm_08_08.h14
2 files changed, 15 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h
index 242bce94..0a7429e9 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -104,6 +104,7 @@ int gsm0808_dec_cell_id(struct gsm0808_cell_id *ci, const uint8_t *elem, uint8_t
int gsm0808_chan_type_to_speech_codec(uint8_t perm_spch);
int gsm0808_speech_codec_from_chan_type(struct gsm0808_speech_codec *sc,
uint8_t perm_spch);
+uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(struct gsm48_multi_rate_conf *cfg, bool fr);
/*! Return 3GPP TS 48.008 3.2.2.49 Current Channel Type 1 from enum gsm_chan_t. */
static inline uint8_t gsm0808_current_channel_type_1(enum gsm_chan_t type)
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 {