summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/gsm/gsm0808_utils.h2
-rw-r--r--include/osmocom/gsm/protocol/gsm_08_08.h14
2 files changed, 15 insertions, 1 deletions
diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h
index 53f145c5..dedb0298 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -130,7 +130,7 @@ 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(const struct gsm48_multi_rate_conf *cfg, bool fr);
-void gsm48_mr_cfg_from_gsm0808_sc_cfg(struct gsm48_multi_rate_conf *cfg, uint16_t s15_s0);
+int gsm48_mr_cfg_from_gsm0808_sc_cfg(struct gsm48_multi_rate_conf *cfg, uint16_t s15_s0);
/*! \returns 3GPP TS 08.08 ยง3.2.2.5 Class of a given Cause */
static inline enum gsm0808_cause_class gsm0808_cause_class(enum gsm0808_cause cause)
diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h
index 67dc6ee1..aa01ee5c 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -553,6 +553,20 @@ enum gsm0808_speech_codec_rate_defaults {
GSM0808_SC_CFG_DEFAULT_AMR_12_2 = 0xc082
};
+/*! Single 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 {
+ GSM0808_SC_CFG_AMR_4_75 = 0x0001,
+ GSM0808_SC_CFG_AMR_4_75_5_90_7_40_12_20 = 0x0002,
+ GSM0808_SC_CFG_AMR_5_90 = 0x0004,
+ GSM0808_SC_CFG_AMR_6_70 = 0x0008,
+ GSM0808_SC_CFG_AMR_7_40 = 0x0010,
+ GSM0808_SC_CFG_AMR_7_95 = 0x0020,
+ GSM0808_SC_CFG_AMR_10_2 = 0x0040,
+ GSM0808_SC_CFG_AMR_12_2 = 0x0080,
+};
+
/* 3GPP TS 48.008 3.2.2.103 Speech Codec List */
#define SPEECH_CODEC_MAXLEN 255
struct gsm0808_speech_codec_list {