library/RSL_Types: RSL_SpeechAlgo: support CSD

Prepare to test CSD in BSC_Tests.ttcn. After sending a BSSAP assignment
request to the BSC with channel type data, the BSC will send a channel
activation via RSL to the BTS (which is emulated by the testsuite).

Without CSD support in the RSL template, the testsuite is unable to
decode the message, prints "Data remained at the end of the stream
after successful decoding" and the test fails.

Related: OS#4393
Change-Id: Ief2d95c7e9d71afb26fa74da755294226c8e158d
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 1859eed..e1281bb 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -871,7 +871,7 @@
 		ch_act.ies := ch_act.ies & { valueof(t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info :=
 encr_info})) };
 	}
-	if (mode.coding_alg_rate == RSL_CMOD_SP_GSM3) {
+	if (ischosen(mode.u.speech) and mode.u.speech == RSL_CMOD_SP_GSM3) {
 		ch_act.ies := ch_act.ies & { valueof(t_RSL_IE(RSL_IE_MR_CONFIG,
 							      RSL_IE_Body:{multirate_cfg := g_pars.mr_conf})) };
 	}
@@ -2542,18 +2542,24 @@
 		var uint8_t amr_start_codec := 0;
 		var BIT8 amr_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;
-					  amr_codecs_bitmask := g_pars.mr_conf.codec_modes;
-					}
-		case else {
-			log("RSL channel mode := ", g_pars.chan_mode.coding_alg_rate,
-			    " is not supported by the L1, falling back to signalling");
+		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 {
+			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,