fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33035 )


Change subject: BTS_Tests: f_est_dchan(): add support for CSD channel modes
......................................................................

BTS_Tests: f_est_dchan(): add support for CSD channel modes

Change-Id: I066657941dd751183aa5e937a6bfe9ab7837d46b
Related: OS#1572, OS#4396
---
M bts/BTS_Tests.ttcn
M library/L1CTL_Types.ttcn
2 files changed, 42 insertions(+), 18 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/35/33035/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index a0d2cfe..8dcfb01 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -2542,24 +2542,35 @@
                var uint8_t amr_start_codec := 0;
                var BIT8 amr_codecs_bitmask := '00000000'B;

-               if (ischosen(g_pars.chan_mode.u.sign) and 
g_pars.chan_mode.u.sign == RSL_CMOD_NO_RESOURCE) {
-                       tch_mode := L1CTL_CHAN_MODE_SIGN;
-               } else if (ischosen(g_pars.chan_mode.u.speech)) {
-                       select (g_pars.chan_mode.u.speech) {
-                       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;
-                                                 amr_codecs_bitmask := 
g_pars.mr_conf.codec_modes;
-                                               }
-                       case else {
-                               log("RSL channel mode := ", 
g_pars.chan_mode.u.speech,
-                                   " is not supported by the L1, falling back 
to signalling");
-                               tch_mode := L1CTL_CHAN_MODE_SIGN;
-                               }
-                       }
-               } else {
+               select (g_pars.chan_mode) {
+               case (tr_RSL_ChanMode_SIGN)
+                       { tch_mode := L1CTL_CHAN_MODE_SIGN; }
+               /* Speech modes */
+               case (tr_RSL_ChanMode((RSL_CHRT_TCH_F, RSL_CHRT_TCH_H), 
RSL_CMOD_SP_GSM1))
+                       { tch_mode := L1CTL_CHAN_MODE_SPEECH_V1; }
+               case (tr_RSL_ChanMode((RSL_CHRT_TCH_F, RSL_CHRT_TCH_H), 
RSL_CMOD_SP_GSM2))
+                       { tch_mode := L1CTL_CHAN_MODE_SPEECH_V2; }
+               case (tr_RSL_ChanMode((RSL_CHRT_TCH_F, RSL_CHRT_TCH_H), 
RSL_CMOD_SP_GSM3))
+                       { tch_mode := L1CTL_CHAN_MODE_SPEECH_V3;
+                         amr_codecs_bitmask := g_pars.mr_conf.codec_modes; }
+               /* Data modes */
+               case (tr_RSL_ChanMode_DATA(RSL_CHRT_TCH_F, /* TCH/F14.4 */
+                                          (RSL_CMOD_CSD_T_14k4, 
RSL_CMOD_CSD_NT_14k5)))
+                       { tch_mode := L1CTL_CHAN_MODE_DATA_14k5; }
+               case (tr_RSL_ChanMode_DATA(RSL_CHRT_TCH_F, /* TCH/F9.6 */
+                                          (RSL_CMOD_CSD_T_9k6, 
RSL_CMOD_CSD_NT_12k0)))
+                       { tch_mode := L1CTL_CHAN_MODE_DATA_12k0; }
+               case (tr_RSL_ChanMode_DATA((RSL_CHRT_TCH_F, RSL_CHRT_TCH_H), /* 
TCH/[FH]4.8 */
+                                          (RSL_CMOD_CSD_T_4k8, 
RSL_CMOD_CSD_NT_6k0)))
+                       { tch_mode := L1CTL_CHAN_MODE_DATA_6k0; }
+               case (tr_RSL_ChanMode_DATA((RSL_CHRT_TCH_F, RSL_CHRT_TCH_H), /* 
TCH/[FH]2.4 */
+                                          (RSL_CMOD_CSD_T_2k4, 
RSL_CMOD_CSD_T_1k2,
+                                           RSL_CMOD_CSD_T_600, 
RSL_CMOD_CSD_T_1200_75)))
+                       { tch_mode := L1CTL_CHAN_MODE_DATA_3k6; }
+               case else {
                        log("RSL channel mode is not supported by the L1, 
falling back to signalling");
                        tch_mode := L1CTL_CHAN_MODE_SIGN;
+                       }
                }

                f_L1CTL_TCH_MODE(L1CTL,
diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn
index 192091e..fe56459 100644
--- a/library/L1CTL_Types.ttcn
+++ b/library/L1CTL_Types.ttcn
@@ -127,8 +127,11 @@
                L1CTL_CHAN_MODE_SIGN            ('00000000'B),  /* Signalling */
                L1CTL_CHAN_MODE_SPEECH_V1       ('00000001'B),  /* FR or HR 
codec */
                L1CTL_CHAN_MODE_SPEECH_V2       ('00100001'B),  /* EFR codec */
-               L1CTL_CHAN_MODE_SPEECH_V3       ('01000001'B)   /* AMR codec */
-               /* Other modes are not supported for now */
+               L1CTL_CHAN_MODE_SPEECH_V3       ('01000001'B),  /* AMR codec */
+               L1CTL_CHAN_MODE_DATA_14k5       ('00001111'B),  /* CSD: 
TCH/F14.4 */
+               L1CTL_CHAN_MODE_DATA_12k0       ('00000011'B),  /* CSD: 
TCH/F9.6 */
+               L1CTL_CHAN_MODE_DATA_6k0        ('00001011'B),  /* CSD: 
TCH/{FH}4.8 */
+               L1CTL_CHAN_MODE_DATA_3k6        ('00010011'B)   /* CSD: 
TCH/{FH}2.4 */
        } with { variant "FIELDLENGTH(8)" };

        type enumerated L1ctlLoopMode {

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33035
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I066657941dd751183aa5e937a6bfe9ab7837d46b
Gerrit-Change-Number: 33035
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to