pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29266 )
Change subject: Pass AMR codec info over L1CTL ......................................................................
Pass AMR codec info over L1CTL
Related: SYS#5987 Depends: osmocom-bb.git Change-Id Ia20bc96e39726a919a556c83c8be48cb31af7331 Change-Id: I3db7f6a4b7819b16ada83862f2a5409db4fa21f9 --- M bts/BTS_Tests.ttcn M library/L1CTL_PortType.ttcn M library/L1CTL_Types.ttcn 3 files changed, 21 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/29266/1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index f9361a0..7733545 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -2510,12 +2510,16 @@ /* Send TCH Mode Request to the L1 if needed */ if (match(g_pars.chan_mode.spd_ind, (RSL_SPDI_SPEECH, RSL_SPDI_DATA))) { var L1ctlTchMode tch_mode; + var uint8_t start_codec := 0; + var BIT8 codecs_bitmask := '00000000'B;
select (g_pars.chan_mode.coding_alg_rate) { case (RSL_CMOD_NO_RESOURCE) { tch_mode := L1CTL_CHAN_MODE_SIGN; } case (RSL_CMOD_SP_GSM1) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V1; } case (RSL_CMOD_SP_GSM2) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V2; } - case (RSL_CMOD_SP_GSM3) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V3; } + case (RSL_CMOD_SP_GSM3) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V3; + codecs_bitmask := '00000100'B; /* AMR TCH/AFS5.9 */ + } case else { log("RSL channel mode := ", g_pars.chan_mode.coding_alg_rate, " is not supported by the L1, falling back to signalling"); @@ -2523,7 +2527,10 @@ } }
- f_L1CTL_TCH_MODE(L1CTL, tch_mode); + f_L1CTL_TCH_MODE(L1CTL, + ts_L1CTL_TCH_MODE_REQ(tch_mode, + start_codec := start_codec, + codecs_bitmask := codecs_bitmask)); }
g_first_meas_res := true; diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index ed235d3..80fa074 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -106,9 +106,10 @@ } }
- function f_L1CTL_TCH_MODE(L1CTL_PT pt, L1ctlTchMode tch_mode) { + function f_L1CTL_TCH_MODE(L1CTL_PT pt, + template (value) L1ctlUlMessage tch_mode_req_tmpl := ts_L1CTL_TCH_MODE_REQ) { timer T := 2.0; - pt.send(ts_L1CTL_TCH_MODE_REQ(tch_mode)); + pt.send(tch_mode_req_tmpl); T.start; alt { [] pt.receive(tr_L1CTL_MsgType(L1CTL_TCH_MODE_CONF)) { } diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index 6bfebb3..acb7776 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -181,7 +181,8 @@ type record L1ctlTchModeConf { L1ctlTchMode tch_mode, L1ctlAudioMode audio_mode, - OCT2 padding + uint8_t start_codec, + BIT8 codecs_bitmask } with { variant "" };
type record L1ctlDataInd { @@ -284,7 +285,8 @@ L1ctlTchMode tch_mode, L1ctlAudioMode audio_mode, L1ctlLoopMode loop_mode, - OCT1 padding + uint8_t start_codec, + BIT8 codecs_bitmask } with { variant "" };
type record L1ctlRachReq { @@ -532,7 +534,9 @@ template (value) L1ctlUlMessage ts_L1CTL_TCH_MODE_REQ(template (value) L1ctlTchMode tch_mode := L1CTL_CHAN_MODE_SIGN, template (value) L1ctlAudioMode audio_mode := t_L1CTL_AudioModeFwd, - template (value) L1ctlLoopMode loop_mode := L1CTL_LOOP_MODE_OPEN) := { + template (value) L1ctlLoopMode loop_mode := L1CTL_LOOP_MODE_OPEN, + template (value) uint8_t start_codec := 0, + template (value) BIT8 codecs_bitmask := '00000000'B) := { header := ts_L1ctlHeader(L1CTL_TCH_MODE_REQ), ul_info := omit, ul_info_tbf := omit, @@ -542,7 +546,8 @@ tch_mode := tch_mode, audio_mode := audio_mode, loop_mode := loop_mode, - padding := '00'O + start_codec := start_codec, + codecs_bitmask := codecs_bitmask } } };