laforge has uploaded this change for review.

View Change

trau_sync: Add sync pattern for FA protocol of 3GPP TS 43.045

The FA protocol is used to carry (modified) T.30 protocol (Fax G3)
information over synchronous CSD bearers in GSM. It uses 64bit
framing with a well-known sync pattern.

Let's use the trau_sync infrastructure to synchronize to that framing.

Change-Id: Ie2206e120f456d10b4f98d8aeb34fd8a499cb22c
---
M include/osmocom/trau/trau_sync.h
M src/trau/trau_sync.c
2 files changed, 29 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/82/33282/1
diff --git a/include/osmocom/trau/trau_sync.h b/include/osmocom/trau/trau_sync.h
index 36388eb..542a329 100644
--- a/include/osmocom/trau/trau_sync.h
+++ b/include/osmocom/trau/trau_sync.h
@@ -15,6 +15,7 @@
OSMO_TRAU_SYNCP_16_ER_CCU,
OSMO_TRAU_SYNCP_64_ER_CCU,
OSMO_TRAU_SYNCP_64_ER_CCU_MCS9,
+ OSMO_TRAU_SYNCP_FA, /* TS 43.045 FA (Fax Adaptation) sync frame */
};

typedef void (*frame_out_cb_t)(void *user_data, const ubit_t *bits, unsigned int num_bits);
diff --git a/src/trau/trau_sync.c b/src/trau/trau_sync.c
index 60bfad7..e3b458a 100644
--- a/src/trau/trau_sync.c
+++ b/src/trau/trau_sync.c
@@ -274,6 +274,19 @@
},
.byte_len = 160,
},
+ [OSMO_TRAU_SYNCP_FA] = {
+ /* See Section 5.2.2.1 of 3GPP TS 43.045 */
+ .name = "FA",
+ .byte_pattern = {
+ 0x3E, 0x37, 0x50, 0x96,
+ 0xC1, 0xC8, 0xAF, 0x69,
+ },
+ .byte_mask = {
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ },
+ .byte_len = 8,
+ },
};

static void expand_sync_pattern(struct sync_pattern *pat)

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

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie2206e120f456d10b4f98d8aeb34fd8a499cb22c
Gerrit-Change-Number: 33282
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-MessageType: newchange