aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-08 18:54:09 +0300
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-08 19:01:40 +0300
commit94806cee7bc21c13cbe0fb5d0b8a8c890c8ae1d3 (patch)
treed505c4660531721f0b59e999bf7cb592569b47c0
parentosmo-bts-trx: move AMR CMI lookup tables to the respective files (diff)
downloadOsmoBTS-94806cee7bc21c13cbe0fb5d0b8a8c890c8ae1d3.tar.xz
OsmoBTS-94806cee7bc21c13cbe0fb5d0b8a8c890c8ae1d3.zip
osmo-bts-trx: rx_tchh_fn(): fix indexes in the AMR CMI lookup table
In change [1] I didn't take into account that the TCH/H burst buffer is 6 bursts wide, and that we're decoding 2 bursts late: +---+---+---+---+---+---+ | a | b | c | d | e | f | Burst 'a' received first, 'f' last +---+---+---+---+---+---+ ^^^^^^^^^^^^^^^ Speech frame (bursts 'a' .. 'd') ^^^^^^^^^^^^^^^^^^^^^^^ FACCH frame (bursts 'a' .. 'f') The lookup table for TCH/H was calculated with the assumption that in rx_tchh_fn() the 'bi->fn' indicates TDMA frame number for burst 'd', but in reality it holds the frame number of burst 'f'. Change-Id: I4f22cf49fd52ed26f8017f76461059a701c181e1 Fixes: [1] I46def864729c8f9063af201750456771ea5558d5 Related: SYS#5916
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchh.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 17b3a3b3..f0d8ff68 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -45,15 +45,23 @@
#include <sched_utils.h>
#include <loops.h>
-/* 3GPP TS 45.009, table 3.2.1.3-{2,4}: AMR on Uplink TCH/H */
+/* 3GPP TS 45.009, table 3.2.1.3-{2,4}: AMR on Uplink TCH/H.
+ *
+ * +---+---+---+---+---+---+
+ * | a | b | c | d | e | f | Burst 'a' received first
+ * +---+---+---+---+---+---+
+ * ^^^^^^^^^^^^^^^^^^^^^^^ FACCH frame (bursts 'a' .. 'f')
+ * ^^^^^^^^^^^^^^^ Speech frame (bursts 'a' .. 'd')
+ *
+ * TDMA frame number of burst 'f' is always used as the table index. */
static const uint8_t sched_tchh_ul_amr_cmi_map[26] = {
- [6] = 1, /* TCH/H(0): first=0 / last=6 */
- [15] = 1, /* TCH/H(0): first=8 / last=15 */
- [23] = 1, /* TCH/H(0): first=17 / last=23 */
+ [10] = 1, /* TCH/H(0): a=0 / d=6 / f=10 */
+ [19] = 1, /* TCH/H(0): a=8 / d=15 / f=19 */
+ [2] = 1, /* TCH/H(0): a=17 / d=23 / f=2 */
- [7] = 1, /* TCH/H(1): first=1 / last=7 */
- [16] = 1, /* TCH/H(1): first=9 / last=16 */
- [24] = 1, /* TCH/H(1): first=18 / last=24 */
+ [11] = 1, /* TCH/H(1): a=1 / d=7 / f=11 */
+ [20] = 1, /* TCH/H(1): a=9 / d=16 / f=20 */
+ [3] = 1, /* TCH/H(1): a=18 / d=24 / f=3 */
};
/*! \brief a single TCH/H burst was received by the PHY, process it */