fixeria submitted this change.
osmo-bts-trx: amr_loop: do not miss C/I samples
Keep collecting C/I samples even if the MS has not yet applied
previously requested codec mode. The C/I ratio is expected to
stay more or less the same, no matter which codec mode is used.
Change-Id: Ieb5473ead7200f652b5d0e339e4e252d6567482d
Related: SYS#5917, OS#4984
---
M src/osmo-bts-trx/amr_loop.c
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/osmo-bts-trx/amr_loop.c b/src/osmo-bts-trx/amr_loop.c
index 1771d7a..ce89091 100644
--- a/src/osmo-bts-trx/amr_loop.c
+++ b/src/osmo-bts-trx/amr_loop.c
@@ -44,10 +44,6 @@
if (!chan_state->amr_loop)
return;
- /* wait for MS to use the requested codec */
- if (mi != chan_state->dl_cmr)
- return;
-
/* count per-block C/I samples for further averaging */
if (lchan->type == GSM_LCHAN_TCH_H) {
chan_state->lqual_cb_num += 2;
@@ -57,6 +53,10 @@
chan_state->lqual_cb_sum += lqual_cb;
}
+ /* wait for MS to use the requested codec */
+ if (mi != chan_state->dl_cmr)
+ return;
+
/* count frames */
if (chan_state->lqual_cb_num < 48)
return;
To view, visit change 27778. To unsubscribe, or for help writing mail filters, visit settings.