fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmocom-bb/+/32918 )
Change subject: trxcon/l1sched: cosmetic: get rid of amr_is_cmr/fn_is_cmi
......................................................................
trxcon/l1sched: cosmetic: get rid of amr_is_cmr/fn_is_cmi
Change-Id: Ic8df73326befa387daead0a0dcbb8c9a1461021e
Related: OS#4396
---
M src/host/trxcon/src/sched_lchan_tchf.c
M src/host/trxcon/src/sched_lchan_tchh.c
2 files changed, 25 insertions(+), 18 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/18/32918/1
diff --git a/src/host/trxcon/src/sched_lchan_tchf.c
b/src/host/trxcon/src/sched_lchan_tchf.c
index 1a00a93..3674bb7 100644
--- a/src/host/trxcon/src/sched_lchan_tchf.c
+++ b/src/host/trxcon/src/sched_lchan_tchf.c
@@ -66,7 +66,6 @@
size_t l2_len;
int amr = 0;
uint8_t ft;
- bool amr_is_cmr;
/* Set up pointers */
mask = &lchan->rx_burst_mask;
@@ -122,20 +121,19 @@
1, 1, &n_errors, &n_bits_total);
break;
case GSM48_CMODE_SPEECH_AMR: /* AMR */
- /* the first FN 4,13,21 defines that CMI is included in frame,
- * the first FN 0,8,17 defines that CMR/CMC is included in frame.
- * NOTE: A frame ends 7 FN after start.
- */
- amr_is_cmr = !sched_tchf_dl_amr_cmi_map[bi->fn % 26];
-
/* we store tch_data + 2 header bytes, the amr variable set to
* 2 will allow us to skip the first 2 bytes in case we did
* receive an FACCH frame instead of a voice frame (we do not
* know this before we actually decode the frame) */
amr = 2;
rc = gsm0503_tch_afs_decode_dtx(l2 + amr, buffer,
- amr_is_cmr, lchan->amr.codec, lchan->amr.codecs, &lchan->amr.dl_ft,
- &lchan->amr.dl_cmr, &n_errors, &n_bits_total,
&lchan->amr.last_dtx);
+ !sched_tchf_dl_amr_cmi_map[bi->fn % 26],
+ lchan->amr.codec,
+ lchan->amr.codecs,
+ &lchan->amr.dl_ft,
+ &lchan->amr.dl_cmr,
+ &n_errors, &n_bits_total,
+ &lchan->amr.last_dtx);
/* only good speech frames get rtp header */
if (rc != GSM_MACBLOCK_LEN && rc >= 4) {
diff --git a/src/host/trxcon/src/sched_lchan_tchh.c
b/src/host/trxcon/src/sched_lchan_tchh.c
index 303d59e..04a8bff 100644
--- a/src/host/trxcon/src/sched_lchan_tchh.c
+++ b/src/host/trxcon/src/sched_lchan_tchh.c
@@ -243,7 +243,6 @@
size_t l2_len;
int amr = 0;
uint8_t ft;
- bool fn_is_cmi;
/* Set up pointers */
mask = &lchan->rx_burst_mask;
@@ -307,17 +306,17 @@
&n_errors, &n_bits_total);
break;
case GSM48_CMODE_SPEECH_AMR: /* AMR */
- /* the first FN FN 4,13,21 or 5,14,22 defines that CMI is
- * included in frame, the first FN FN 0,8,17 or 1,9,18 defines
- * that CMR/CMC is included in frame. */
- fn_is_cmi = sched_tchh_dl_amr_cmi_map[bi->fn % 26];
-
/* See comment in function rx_tchf_fn() */
amr = 2;
rc = gsm0503_tch_ahs_decode_dtx(l2 + amr, buffer,
- !sched_tchh_dl_facch_map[bi->fn % 26],
- !fn_is_cmi, lchan->amr.codec, lchan->amr.codecs, &lchan->amr.dl_ft,
- &lchan->amr.dl_cmr, &n_errors, &n_bits_total,
&lchan->amr.last_dtx);
+ !sched_tchh_dl_facch_map[bi->fn % 26],
+ !sched_tchh_dl_amr_cmi_map[bi->fn % 26],
+ lchan->amr.codec,
+ lchan->amr.codecs,
+ &lchan->amr.dl_ft,
+ &lchan->amr.dl_cmr,
+ &n_errors, &n_bits_total,
+ &lchan->amr.last_dtx);
/* only good speech frames get rtp header */
if (rc != GSM_MACBLOCK_LEN && rc >= 4) {
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/32918
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ic8df73326befa387daead0a0dcbb8c9a1461021e
Gerrit-Change-Number: 32918
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange