[MERGED] libosmocore[master]: gsm0808: add default speech codec configuration

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Jun 22 17:08:18 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: gsm0808: add default speech codec configuration
......................................................................


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
---
M include/osmocom/gsm/protocol/gsm_08_08.h
1 file changed, 21 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h
index 9e00d23..d165330 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -449,6 +449,27 @@
 	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 {

-- 
To view, visit https://gerrit.osmocom.org/2829
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9dc0165d76a022b2c1b7418bc3133407e61b7261
Gerrit-PatchSet: 9
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list