From c9a4f697d38b35680938f20928544a734739b185 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 21 Sep 2018 14:21:50 +0200 Subject: codec_pref: handle S0-S15 in ASSIGNMENT REQUEST Opposed to all other codecs that are common in GSM, AMR requires a codec configuration that is expressed by a bitmask (S0 to S15) in the speech codec list in the ASSIGNMENT REQUEST. Also the BSC acknowledges those configuration in the ASSIGNMENT COMPLETE message. At the moment osmo-bsc ignores all incoming configuration bits. The bits in the ASSIGNMENT COMPLETE speech codec (choosen) field are hardcoded. - Store the configuration bits while parsing the ASSIGNMENT COMPLETE - Create an intersection with the configuration that is actually supported by the BSS - Return the resulting (chosen) configuration bits with the assignment complete message. - Use the (highest of the) agreed codec rates in RSL channel activation. Change-Id: I2d8ded51b3eb4c003fe2da6f2d6f48d001b73737 Related: OS#3529 --- src/osmo-bsc/handover_fsm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/osmo-bsc/handover_fsm.c') diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index 9d558bcb5..0ba506137 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -522,6 +522,7 @@ void handover_start_inter_bsc_in(struct gsm_subscriber_connection *conn, int match_idx; enum gsm48_chan_mode mode; bool full_rate; + uint16_t s15_s0; struct osmo_fsm_inst *fi; handover_fsm_alloc(conn); @@ -560,8 +561,7 @@ void handover_start_inter_bsc_in(struct gsm_subscriber_connection *conn, bts->nr, req->cell_id_target_name); /* Figure out channel type */ - if (match_codec_pref(&mode, &full_rate, &req->ct, &req->scl, msc->audio_support, - msc->audio_length, &bts->codec)) { + if (match_codec_pref(&mode, &full_rate, &s15_s0, &req->ct, &req->scl, msc, bts)) { LOG_HO(conn, LOGL_DEBUG, "BTS %u has no matching channel codec (%s, speech codec list len = %u)", bts->nr, gsm0808_channel_type_name(&req->ct), req->scl.len); @@ -606,6 +606,7 @@ void handover_start_inter_bsc_in(struct gsm_subscriber_connection *conn, .activ_for = FOR_HANDOVER, .for_conn = conn, .chan_mode = mode, + .s15_s0 = s15_s0, .requires_voice_stream = chan_mode_is_tch(mode), .msc_assigned_cic = req->msc_assigned_cic, }; -- cgit v1.2.3