diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2019-01-22 11:29:06 +0100 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2019-02-21 10:17:37 +0100 |
commit | bb66d1095bdbe2c8eceaa9ea32d3c64cdfc835a9 (patch) | |
tree | c0c09f5b4e2a77ee5033cefb8526038a69e61a73 /tests/codec_pref | |
parent | fad4bbc517ef2a55988f0fd7874d98dbc5303b14 (diff) |
assignment_fsm: fix channel allocator preferences
When the MSC allocates a channel through the ASSIGNMENT REQUEST, it may
ask for a TCH/H and a TCH/F at the same time and tell which of the two
types it prefers.
The process of channel allocation currently selects, based on the BTS,
MSC and MS capabilites exactly one apropriate codec/rate (e.g. TCH/H)
and then tries to allocate it. If that allocation fails, there is no way
to try the second choice and the assignment fails.
For example: The MSC asks for TCH/F and TCH/H, prefering TCH/F, then the
channel allocator will try TCH/F and if it fails (all TCH/F are
currently in use), then TCH/H is never tried.
Since the BSC currently only trys the first best codec/rate that is
supported it also ignores the preference.
Lets fix those problems by including the preference information and both
possible codec/rate settings into the channel allocation decision.
Change-Id: I5239e05c1cfbcb8af28f43373a58fa6c2d216c51
Related: OS#3503
Diffstat (limited to 'tests/codec_pref')
-rw-r--r-- | tests/codec_pref/codec_pref_test.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/codec_pref/codec_pref_test.c b/tests/codec_pref/codec_pref_test.c index 534b99ef7..bb5468a4c 100644 --- a/tests/codec_pref/codec_pref_test.c +++ b/tests/codec_pref/codec_pref_test.c @@ -380,9 +380,7 @@ static int test_match_codec_pref(const struct gsm0808_channel_type *ct, const st { int rc; unsigned int i; - bool full_rate; - enum gsm48_chan_mode chan_mode; - uint16_t s15_s0; + struct channel_mode_and_rate ch_mode_rate = { }; printf("Determining channel mode and rate:\n"); @@ -407,9 +405,9 @@ static int test_match_codec_pref(const struct gsm0808_channel_type *ct, const st printf(" codec->efr=%u\n", bts->codec.efr); printf(" codec->amr=%u\n", bts->codec.amr); - rc = match_codec_pref(&chan_mode, &full_rate, &s15_s0, ct, scl, msc, bts); + rc = match_codec_pref(&ch_mode_rate, ct, scl, msc, bts, RATE_PREF_NONE); printf(" * result: rc=%i, full_rate=%i, s15_s0=%04x, chan_mode=%s\n", - rc, full_rate, s15_s0, gsm48_chan_mode_name(chan_mode)); + rc, ch_mode_rate.full_rate, ch_mode_rate.s15_s0, gsm48_chan_mode_name(ch_mode_rate.chan_mode)); printf("\n"); |