summaryrefslogtreecommitdiffstats
path: root/src/gsm/gsm0808_utils.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2018-09-16 21:02:25 +0000
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2018-09-16 21:02:25 +0000
commitdd8c73cc6da6e8bdc027bc9f05126aad60a71f72 (patch)
treec756469f26e6255ad50166daec2092888bdbd621 /src/gsm/gsm0808_utils.c
parent2fd4fe6aa109c8df50baac465f0393a303a64dd2 (diff)
Revert "gsm0808: add function to convert amr gsm0408 setings to gsm0808"
This reverts commit 2fd4fe6aa109c8df50baac465f0393a303a64dd2. As shown in https://jenkins.osmocom.org/jenkins/view/master/job/master-libosmocore/475/a2=default,a3=default,arch=amd64,label=osmocom-master-debian9/console This commit breaks gsm0808_test with: stderr: --- expout 2018-09-16 22:37:31.382280438 +0200 +++ /n/s/dev/make/libosmocore/tests/testsuite.dir/at-groups/21/stdout 2018-09-16 22:37:31.426281372 +0200 @@ -78,9 +78,9 @@ Input: m4_75= 0 smod= 0 m5_15= 0 spare= 0 - m5_90= 0 icmi= 0 + m5_90= 0 icmi= 1 m6_70= 0 nscb= 0 - m7_40= 0 ver= 0 + m7_40= 0 ver= 6 m7_95= 0 m10_2= 0 m12_2= 0 @@ -92,9 +92,9 @@ Input: m4_75= 1 smod= 0 m5_15= 0 spare= 0 - m5_90= 0 icmi= 0 + m5_90= 0 icmi= 1 m6_70= 0 nscb= 0 - m7_40= 0 ver= 0 + m7_40= 0 ver= 6 m7_95= 0 m10_2= 0 m12_2= 0 @@ -106,9 +106,9 @@ Input: m4_75= 0 smod= 0 m5_15= 1 spare= 0 - m5_90= 0 icmi= 0 + m5_90= 0 icmi= 1 [...] Change-Id: I9e0d405e303ed86d23703ca6362e958dddb2f861
Diffstat (limited to 'src/gsm/gsm0808_utils.c')
-rw-r--r--src/gsm/gsm0808_utils.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c
index 4b2a5f56..73f02341 100644
--- a/src/gsm/gsm0808_utils.c
+++ b/src/gsm/gsm0808_utils.c
@@ -1161,49 +1161,6 @@ int gsm0808_speech_codec_from_chan_type(struct gsm0808_speech_codec *sc,
return 0;
}
-/*! Determine a set of AMR speech codec configuration bits (S0-S15) from a
- * given GSM 04.08 AMR configuration struct.
- * \param[in] cfg AMR configuration in GSM 04.08 format.
- * \param[in] hint if the resulting configuration shall be used with a FR or HR TCH.
- * \returns configuration bits (S0-S15) */
-uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(struct gsm48_multi_rate_conf *cfg,
- bool fr)
-{
- uint16_t s15_s0 = 0;
-
- /* Check each rate bit in the AMR multirate configuration and pick the
- * matching default configuration as specified in 3GPP TS 28.062,
- * Table 7.11.3.1.3-2. */
- if (cfg->m4_75)
- s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_4_75;
- if (cfg->m5_15)
- s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_5_15;
- if (cfg->m5_90)
- s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_5_90;
- if (cfg->m6_70)
- s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_6_70;
- if (cfg->m7_40)
- s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_7_40;
- if (cfg->m7_95)
- s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_7_95;
- if (cfg->m10_2)
- s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_10_2;
- if (cfg->m12_2)
- s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_12_2;
-
- /* Note: 3GPP TS 48.008, chapter 3GPP TS 48.008 states that for AMR
- * some of the configuration bits must be coded as zeros. The applied
- * bitmask matches the default codec settings. See also the definition
- * of enum gsm0808_speech_codec_defaults in gsm_08_08.h and
- * 3GPP TS 28.062, Table 7.11.3.1.3-2. */
- if (fr)
- s15_s0 &= GSM0808_SC_CFG_DEFAULT_FR_AMR;
- else
- s15_s0 &= GSM0808_SC_CFG_DEFAULT_HR_AMR;
-
- return s15_s0;
-}
-
/*! Print a human readable name of the cell identifier to the char buffer.
* This is useful both for struct gsm0808_cell_id and struct gsm0808_cell_id_list2.
* See also gsm0808_cell_id_name() and gsm0808_cell_id_list_name().