Attention is currently required from: pespin.
falconia has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38323?usp=email )
Change subject: TRAU frame output EDATA: set sync pattern bits ......................................................................
Patch Set 2:
(2 comments)
File src/trau/trau_frame.c:
https://gerrit.osmocom.org/c/libosmo-abis/+/38323/comment/989e4901_6fe2c951?... : PS1, Line 680: memset(trau_bits, 0, 16);
did you check if it makes sense that this function expects the trau_bits to be 0 initialized? Eg exi […]
This memset is not 0-initialization, it is the sync pattern. See the frame structure table in TS 48.060 section 5.3.2: the sync pattern consists of the first 16 bits being all zeros, then a single one. "Regular" data and speech frames have more sync pattern bits, but E-TRAU (or EDATA) frames have a reduced sync pattern. The other encoding functions under `osmo_trau_frame_encode` call `encode_sync16` helper, but because we have to produce the reduced sync pattern here, I am doing it directly.
https://gerrit.osmocom.org/c/libosmo-abis/+/38323/comment/6ed8fe88_9f3d96f8?... : PS1, Line 681: trau_bits[17] = 1;
isn't this overwritten by the memcpy below?
Oops, I was setting the wrong bit - good catch! Fixed in the new patch revision.