aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-03-17 18:46:46 +0300
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-03-18 03:53:08 +0300
commit35e601a3223be1b5b6616479c95f77c263afbbc7 (patch)
tree51509a2589590f383cd2b46f8f0f1e56bdc94d05 /include
parent523598e655dca76da1adcd79d58a54f9b6df8a07 (diff)
osmo-bts-trx: rx_tchh_fn(): use proper meas averaging mode
Compared to TCH/F, TCH/H is a bit special in a way that: * speech frames are interleaved over 4 consecutive bursts, * while FACCH frames are interleaved over 6 consecutive bursts. This is why in rx_tchh_fn() we allocate a buffer large enough to store up to 6 bursts. Let's say we have that buffer filled up completely with all 6 bursts (from 'a' to 'f'). Now attempting to decode them may yield either a speech frame or a FACCH frame: +---+---+---+---+---+---+ | a | b | c | d | e | f | Burst 'a' received first, 'f' last +---+---+---+---+---+---+ ^^^^^^^^^^^^^^^ Speech frame (bursts 'a' .. 'd') ^^^^^^^^^^^^^^^^^^^^^^^ FACCH frame (bursts 'a' .. 'f') For FACCH we use measurement averaging mode SCHED_MEAS_AVG_M_S6N6, so that 6 last samples are averaged - so far so good. For speech we use SCHED_MEAS_AVG_M_S4N4, so that 4 last samples corresponding to bursts 'c', 'd', 'e', 'f' are averaged - this is wrong. We actually need to average the *first* 4 samples corresponding to bursts 'a', 'b', 'c', 'd' in the case of speech. Let's add and use a new averaging mode SCHED_MEAS_AVG_M_S6N4 for that. Change-Id: Iea6f4e5471550f4c2b57aaebeac83c80e879489d
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/scheduler.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index 8643edd6..1e1a2d72 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -306,10 +306,12 @@ int trx_sched_ul_burst(struct l1sched_ts *l1ts, struct trx_ul_burst_ind *bi);
/* Averaging mode for trx_sched_meas_avg() */
enum sched_meas_avg_mode {
- /* last 4 bursts (default for xCCH, TCH/H, PTCCH and PDTCH) */
+ /* last 4 bursts (default for xCCH, PTCCH and PDTCH) */
SCHED_MEAS_AVG_M_S4N4,
/* last 8 bursts (default for TCH/F and FACCH/F) */
SCHED_MEAS_AVG_M_S8N8,
+ /* first 4 of last 6 bursts (default for TCH/H) */
+ SCHED_MEAS_AVG_M_S6N4,
/* last 6 bursts (default for FACCH/H) */
SCHED_MEAS_AVG_M_S6N6,
/* first 4 of last 8 bursts */