aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2022-11-29 20:46:52 +0100
committerHarald Welte <laforge@osmocom.org>2022-11-30 15:35:15 +0100
commit9d90eb99607143499ef5483f3c41934f0922d1de (patch)
tree1b876899a7221b3e3e11d2afa9c8216930ef3bd4
parent3d8426e4c4fd951476b648570cf7ec91e72d1e5d (diff)
trau_sync: Add the V.110 sync pattern
ITU-T V.110 is used in GSM CSD (Circuit Switched Data). The frames are rather similar to TRAU frames, so we can use the trau_sync code for it. This commit adds the related definition. Related: OS#4395 Change-Id: I3aab5c3f494f6ea2b11f3cf69fb09bc77ea941d8
-rw-r--r--include/osmocom/trau/trau_sync.h1
-rw-r--r--src/trau/trau_sync.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/include/osmocom/trau/trau_sync.h b/include/osmocom/trau/trau_sync.h
index bd99586..ffda02a 100644
--- a/include/osmocom/trau/trau_sync.h
+++ b/include/osmocom/trau/trau_sync.h
@@ -8,6 +8,7 @@ enum osmo_tray_sync_pat_id {
OSMO_TRAU_SYNCP_8_AMR_LOW,
OSMO_TRAU_SYNCP_8_AMR_6K7,
OSMO_TRAU_SYNCP_8_AMR_7K4,
+ OSMO_TRAU_SYNCP_V110,
};
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 dba9cd1..b36e7c1 100644
--- a/src/trau/trau_sync.c
+++ b/src/trau/trau_sync.c
@@ -145,6 +145,19 @@ static struct sync_pattern sync_patterns[] = {
},
.byte_len = 20,
},
+ [OSMO_TRAU_SYNCP_V110] = {
+ /* See Table 2 of ITU-T V.110 */
+ .name = "V110",
+ .byte_pattern = {
+ 0x00, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x80,
+ },
+ .byte_mask = {
+ 0xff, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x80,
+ },
+ .byte_len = 10,
+ },
};
#if 0