summaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-07-29 11:38:15 +0200
committerHarald Welte <laforge@gnumonks.org>2009-07-29 11:38:15 +0200
commit470abb773b45749cc5551f55275659c86602102f (patch)
treebfcb065d4e59f8e81f89846a900e093957fa992c /openbsc/src
parent849427d89513bbadca594035e03d73e2bcf2ac09 (diff)
add support for more RSL channel modes
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/abis_rsl.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index 56c3f711b..ca09665f1 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -637,7 +637,7 @@ int rsl_chan_activate_lchan(struct gsm_lchan *lchan, u_int8_t act_type,
return abis_rsl_sendmsg(msg);
}
-/* Chapter 8.4.9 */
+/* Chapter 8.4.9: Modify channel mode on BTS side */
int rsl_chan_mode_modify_req(struct gsm_lchan *lchan)
{
struct abis_rsl_dchan_hdr *dh;
@@ -662,6 +662,25 @@ int rsl_chan_mode_modify_req(struct gsm_lchan *lchan)
case GSM48_CMODE_SPEECH_EFR:
cm.chan_rate = RSL_CMOD_SP_GSM2;
break;
+ case GSM48_CMODE_SPEECH_AMR:
+ cm.chan_rate = RSL_CMOD_SP_GSM3;
+ break;
+ default:
+ DEBUGP(DRSL, "Unimplemented channel modification\n");
+ return -1;
+ }
+ break;
+ case GSM_LCHAN_TCH_H:
+ cm.spd_ind = RSL_CMOD_SPD_SPEECH;
+ cm.chan_rt = RSL_CMOD_CRT_TCH_Lm;
+ switch (lchan->tch_mode) {
+ case GSM48_CMODE_SPEECH_V1:
+ cm.chan_rate = RSL_CMOD_SP_GSM1;
+ break;
+ /* Half-rate has no V2 */
+ case GSM48_CMODE_SPEECH_AMR:
+ cm.chan_rate = RSL_CMOD_SP_GSM3;
+ break;
default:
DEBUGP(DRSL, "Unimplemented channel modification\n");
return -1;