fixeria has uploaded this change for review.

View Change

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
---
M src/osmo-bts-trx/sched_lchan_tchh.c
1 file changed, 15 insertions(+), 7 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/99/27699/1
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 17b3a3b..f0d8ff6 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 */

To view, visit change 27699. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I4f22cf49fd52ed26f8017f76461059a701c181e1
Gerrit-Change-Number: 27699
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-MessageType: newchange