Commit
102db326ed13b739dc8f0e7e7e560dcb05fc8962
by falconTRAU encode: fix handling of OSMO_TRAU16_FT_IDLE
GSM 08.60 sections 3.4 and 3.5.5 (renumbered to 5.4 and 5.5.5 in
3GPP TS 48.060) define a special frame type called Idle Speech Frame.
It is not clear if any historical BSS vendor actually implemented
these special frames - Nokia documentation explicitly mentions how
they were deemed unnecessary and omitted from implementation - but
libosmotrau includes support for this frame type.
Looking at the referenced spec sections, we can see the designers'
intent: the idle speech frame is just like FRv1 speech frames,
but with different UL/DL frame type codes in C1..C5 and with all
Dn bits replaced with constant-1 filler. Following this design
intent on the part of GSM spec authors, the philophically correct
behavior for osmo_trau_frame_encode() with regard to this frame type
should be to handle it exactly the same as OSMO_TRAU16_FT_FR
(support both DL and UL output, timing alignment in DL, possibility
of changing C6..C21 and T-bits), but don't look at fr->d_bits[],
fill constant 1s in their place instead.
However, the behavior of the encoding function for this frame type
prior to the present change was not like this at all: instead it
would emit a constant (once and for all) frame of 320 bits that was
always for DL no matter which direction was requested, would not
allow time alignment, and would not allow any C-bits to be controlled
by upper layers.
At the present time there is no code anywhere in Osmocom that feeds
OSMO_TRAU16_FT_IDLE to osmo_trau_frame_encode() - thus we don't have
to maintain backward bug compatibility, and we can fix this design bug.
Change-Id: Ibcc9e8628a56c6f089264c9d6b0dd27a1d5a7b60