pass dynamically configured AMR rates to BSS and RNC [1/3]

These changes will allow dynamically negotiating AMR rates between 2G
and 3G, and between full-rate and half-rate, spanning from 2G and 3G RAN
all the way across to SDP over MNCC / SIP and back.

To ran_msg_assignment, add a full codecs list (sdp_audio_codecs).
So far, there was only the gsm0808_channel_type with a list of
permitted-speech entries, which is not a complete representation.

This patch only adds the list, the two users of this are added in
separate patches:

[2/3] In ran_msg_a.c for 2G:

Before this, we pass a gsm0808_channel_type to ran_msg_assignment, and
from *that* we derive a gsm0808_speech_codec_list -- this loses the AMR
rate config bits. So far, we always transmitted the default cfg bits
defined in gsm0808_speech_codec_defaults, enabling all supported S0-S15
AMR rate combinations. Instead, we'll directly derive the available AMR
rates from the list of SDP codecs resulting from the codecs filter.

[3/3] In ran_msg_iu.c for 3G:

Before this, we compose a fixed set of RAB SDU subflows, i.e. for
exactly and only AMR 12k2. Now, we'll ask for RAB subflows corresponding
to the AMR codec's mode-set fmtp present in the codec list.

Change-Id: Ia9f4ad7f3646556aadc632bc5ffa477941626c5f
This commit is contained in:
Neels Hofmeyr 2024-02-01 05:15:30 +01:00
parent 87c6243b3d
commit 03d015e786
2 changed files with 2 additions and 0 deletions

View File

@ -103,6 +103,7 @@ struct ran_clear_command {
struct ran_assignment_command {
const struct osmo_sockaddr_str *cn_rtp;
const struct gsm0808_channel_type *channel_type;
const struct sdp_audio_codecs *codecs;
enum nsap_addr_enc rab_assign_addr_enc;
bool osmux_present;
uint8_t osmux_cid;

View File

@ -700,6 +700,7 @@ void msc_a_tx_assignment_cmd(struct msc_a *msc_a)
.assignment_command = {
.cn_rtp = &msc_a->cc.call_leg->rtp[RTP_TO_RAN]->local,
.channel_type = &channel_type,
.codecs = &cc_trans->cc.local.audio_codecs,
.osmux_present = msc_a->cc.call_leg->rtp[RTP_TO_RAN]->use_osmux,
.osmux_cid = msc_a->cc.call_leg->rtp[RTP_TO_RAN]->local_osmux_cid,
.call_id_present = true,