laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/30716 )
Change subject: trau_sync: add Ericsson RBS GPRS TRAU synchronization pattern (16kbps) ......................................................................
trau_sync: add Ericsson RBS GPRS TRAU synchronization pattern (16kbps)
For GPRS TRAU frames (Ericsson calls them GSL frames), Ericsson introduces a proprietary synchronization pattern. There are slightly different patterns used for synchronization and data, however the intersection of both still provides reliable synchronization. There is no need to switch the pattern depending on the frame type.
Change-Id: I8398f8bbfc51530e37c4328f25155b774394e779 Related: OS#5198 --- M include/osmocom/trau/trau_sync.h M src/trau/trau_sync.c 2 files changed, 18 insertions(+), 26 deletions(-)
Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified
diff --git a/include/osmocom/trau/trau_sync.h b/include/osmocom/trau/trau_sync.h index c40727c..a912db6 100644 --- a/include/osmocom/trau/trau_sync.h +++ b/include/osmocom/trau/trau_sync.h @@ -12,6 +12,7 @@ OSMO_TRAU_SYNCP_8_AMR_6K7, OSMO_TRAU_SYNCP_8_AMR_7K4, OSMO_TRAU_SYNCP_V110, + OSMO_TRAU_SYNCP_16_ER_CCU, };
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 814ed88..9c7303f 100644 --- a/src/trau/trau_sync.c +++ b/src/trau/trau_sync.c @@ -158,35 +158,26 @@ }, .byte_len = 10, }, -}; - -#if 0 -static struct sync_pattern rbs_ccu_sync_ind_16_pattern = { - .name ="RBS_CCU_SYNC_IND_16", - .byte_pattern = { - 0x00, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x01, 0x00, - 0x01, 0x00, 0x01, 0x00, - }, - .byte_mask = { - 0xff, 0xff, 0x01, 0x00, - 0x01, 0x00, 0x01, 0x00, - 0x01, 0x00, 0x01, 0x00, + [OSMO_TRAU_SYNCP_16_ER_CCU] = { + .name = "Ericsson CCU 16 kbps", + .byte_pattern = { + 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + .byte_mask = { + 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + .byte_len = 40, }, };
-static struct sync_pattern rbs_ccu_data_ind_16_pattern = { - .name ="RBS_CCU_DATA_IND_16", - .byte_pattern = { - 0x00, 0x00, 0x01, 0x00, - }, - .byte_mask = { - 0xff, 0xff, 0x01, 0x00, - }, -}; -#endif - - static void expand_sync_pattern(struct sync_pattern *pat) { osmo_pbit2ubit(pat->ubit_pattern, pat->byte_pattern, pat->byte_len*8);