falconia has uploaded this change for review.

View Change

osmo_trau_frame_decode_8k: check all sync bits

The decoding of unknown TRAU-8k frames (the direction and 8 kbit/s
submux are wrong, but nothing else) begins by trial-and-error
checking of 4 possible GSM 08.61 sync patterns. In the case of
classic HR speech/data and AMR-low sync patterns, not all bits
were checked.

Change-Id: I47b055b4d3b92f018508fd7baa0784dfcabe6262
---
M src/trau/trau_frame.c
1 file changed, 2 insertions(+), 2 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/30/38130/1
diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c
index 509021d..9cb8a66 100644
--- a/src/trau/trau_frame.c
+++ b/src/trau/trau_frame.c
@@ -1376,7 +1376,7 @@
return false;
if (bits[16] != 0 || bits[17] != 1)
return false;
- for (i = 24; i < 20 * 8; i += 16) {
+ for (i = 24; i < 20 * 8; i += 8) {
if (bits[i] != 1)
return false;
}
@@ -1398,7 +1398,7 @@
return false;
if (bits[24] != 0 || bits[25] != 1)
return false;
- for (i = 32; i < 20 * 8; i += 16) {
+ for (i = 32; i < 20 * 8; i += 8) {
if (bits[i] != 1)
return false;
}

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

Gerrit-MessageType: newchange
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I47b055b4d3b92f018508fd7baa0784dfcabe6262
Gerrit-Change-Number: 38130
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon@freecalypso.org>