fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/27699 )

Change subject: osmo-bts-trx: rx_tchh_fn(): fix indexes in the AMR CMI lookup 
table
......................................................................

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(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved



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 https://gerrit.osmocom.org/c/osmo-bts/+/27699
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I4f22cf49fd52ed26f8017f76461059a701c181e1
Gerrit-Change-Number: 27699
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to